Skip to content

fix: BROS-23: Don't fail on parsing errors in storage #7567

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from

Conversation

niklub
Copy link
Collaborator

@niklub niklub commented May 19, 2025

No description provided.

Copy link

netlify bot commented May 19, 2025

Deploy Preview for label-studio-docs-new-theme ready!

Name Link
🔨 Latest commit 4ac6159
🔍 Latest deploy log https://app.netlify.com/projects/label-studio-docs-new-theme/deploys/682b38094854d400089e3561
😎 Deploy Preview https://deploy-preview-7567--label-studio-docs-new-theme.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Copy link

netlify bot commented May 19, 2025

Deploy Preview for label-studio-storybook ready!

Name Link
🔨 Latest commit 4ac6159
🔍 Latest deploy log https://app.netlify.com/projects/label-studio-storybook/deploys/682b3809f9eb0900083f0d2c
😎 Deploy Preview https://deploy-preview-7567--label-studio-storybook.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Copy link

netlify bot commented May 19, 2025

Deploy Preview for heartex-docs ready!

Name Link
🔨 Latest commit 4ac6159
🔍 Latest deploy log https://app.netlify.com/projects/heartex-docs/deploys/682b38099f6e3700085bb240
😎 Deploy Preview https://deploy-preview-7567--heartex-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Copy link

sentry-io bot commented May 19, 2025

🔍 Existing Issues For Review

Your pull request is modifying functions with the following pre-existing issues:

📄 File: label_studio/io_storages/base_models.py

Function Unhandled Issue
_scan_and_create_links ValueError: Error loading JSON from file "IMAGES/LOWCOSTAI/detection/test/images/00000.png". io...
Event Count: 1.0k

Did you find this useful? React with a 👍 or 👎

@github-actions github-actions bot added the fix label May 19, 2025
@niklub niklub requested review from matt-bernstein and Copilot May 19, 2025 13:46
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR refactors storage parsing to use structured logging and prevents the import process from failing on JSON decoding errors by skipping malformed files.

  • Updated debug logs from f-strings to parameterized logging
  • Changed JSON parse errors from raising exceptions to logging a warning and continuing
Comments suppressed due to low confidence (1)

label_studio/io_storages/base_models.py:442

  • The new error‐handling path for JSON decoding errors skips invalid entries but lacks test coverage. Add a unit test to verify that malformed JSON files are logged as warnings and then skipped.
continue

niklub and others added 2 commits May 19, 2025 14:54
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copy link

codecov bot commented May 19, 2025

Codecov Report

Attention: Patch coverage is 60.00000% with 2 lines in your changes missing coverage. Please review.

Project coverage is 77.81%. Comparing base (132661d) to head (4ac6159).
Report is 4 commits behind head on develop.

⚠️ Parser warning

The parser emitted a warning. Please review your JUnit XML file:

Warning while parsing testcase attributes: Limit of string is 1000 chars, for name, we got 1222 at 1:45997 in /home/runner/work/label-studio/label-studio/label_studio/functional.xml
Files with missing lines Patch % Lines
label_studio/io_storages/base_models.py 60.00% 2 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #7567      +/-   ##
===========================================
- Coverage    77.81%   77.81%   -0.01%     
===========================================
  Files          197      197              
  Lines        15887    15888       +1     
===========================================
  Hits         12363    12363              
- Misses        3524     3525       +1     
Flag Coverage Δ
pytests 77.81% <60.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant