Skip to content

fix: OPTIC-1287: Project config validation should ignore xml comments #6613

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

Merged
merged 11 commits into from
Nov 12, 2024

Conversation

bmartel
Copy link
Contributor

@bmartel bmartel commented Nov 6, 2024

PR fulfills these requirements

  • Commit message(s) and PR title follows the format [fix|feat|ci|chore|doc]: TICKET-ID: Short description of change made ex. fix: DEV-XXXX: Removed inconsistent code usage causing intermittent errors
  • Tests for the changes have been added/updated (for bug fixes/features)
  • Docs have been added/updated (for bug fixes/features)
  • Best efforts were made to ensure docs/code are concise and coherent (checked for spelling/grammatical errors, commented out code, debug logs etc.)
  • Self-reviewed and ran all changes on a local instance (for bug fixes/features)

Change has impacts in these area(s)

(check all that apply)

  • Product design
  • Backend (Database)
  • Backend (API)
  • Frontend

Describe the reason for change

When using xml comments which may contain code samples that have a name property like<!--document.querySelector('[name="field"]')--> that also occurs in the label config xml <Taxonomy name="field"> it would fail to validate stating that Config cannot contain non-unique names. This is not correct as the values do not occur within the Label config portion of the xml.

Does this PR introduce a breaking change?

(check only one)

  • Yes, and covered entirely by feature flag(s)
  • Yes, and covered partially by feature flag(s)
  • No
  • Not sure (briefly explain the situation below)

What level of testing was included in the change?

(check all that apply)

  • e2e
  • integration
  • unit

Which logical domain(s) does this change affect?

Project Config Validation

@github-actions github-actions bot added the fix label Nov 6, 2024
Copy link

netlify bot commented Nov 6, 2024

Deploy Preview for heartex-docs canceled.

Name Link
🔨 Latest commit 62903f5
🔍 Latest deploy log https://app.netlify.com/sites/heartex-docs/deploys/672e0da879a3d30008a3116d

Copy link

netlify bot commented Nov 6, 2024

Deploy Preview for label-studio-docs-new-theme canceled.

Name Link
🔨 Latest commit 62903f5
🔍 Latest deploy log https://app.netlify.com/sites/label-studio-docs-new-theme/deploys/672e0da8f480570008f48f64

Copy link

codecov bot commented Nov 7, 2024

Codecov Report

Attention: Patch coverage is 73.91304% with 6 lines in your changes missing coverage. Please review.

Project coverage is 76.66%. Comparing base (de77967) to head (62903f5).
Report is 8 commits behind head on develop.

Files with missing lines Patch % Lines
label_studio/core/label_config.py 73.91% 6 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #6613      +/-   ##
===========================================
+ Coverage    76.63%   76.66%   +0.02%     
===========================================
  Files          169      169              
  Lines        13838    13844       +6     
===========================================
+ Hits         10605    10613       +8     
+ Misses        3233     3231       -2     
Flag Coverage Δ
pytests 76.66% <73.91%> (+0.02%) ⬆️

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.

@bmartel bmartel changed the title fix: OPTIC-1287: Project config validation should not consider xml comments fix: OPTIC-1287: Project config validation should ignore xml comments Nov 7, 2024
@bmartel bmartel requested a review from makseq November 7, 2024 15:55
@bmartel bmartel requested a review from makseq November 8, 2024 12:59
@bmartel bmartel merged commit db057ef into develop Nov 12, 2024
42 of 43 checks passed
fredheir pushed a commit to ResetNetwork/label-studio that referenced this pull request Jan 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants