-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
base: develop
Are you sure you want to change the base?
Conversation
✅ Deploy Preview for label-studio-docs-new-theme ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for label-studio-storybook ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for heartex-docs ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
🔍 Existing Issues For ReviewYour pull request is modifying functions with the following pre-existing issues: 📄 File: label_studio/io_storages/base_models.py
Did you find this useful? React with a 👍 or 👎 |
There was a problem hiding this 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
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Codecov ReportAttention: Patch coverage is
|
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.
No description provided.