Skip to content
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

fix: LEAP-897: Fix incorrect usage of name attr in visual tags #5745

Merged
merged 12 commits into from
Apr 24, 2024

Conversation

juliosgarbi
Copy link
Contributor

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

This PR addresses a bug where annotations fail to save when users incorrectly assign a name attribute to visual tags that are also referenced by a Control tag. This issue was uncovered during scenarios where visual tags had name attributes and Control tags had toName assign to the name from the visual tag but exhibited no immediate error, leading to unsuccessful annotation saving.

What does this fix?

The application should validate the use of the name attribute on visual or experience tags and display an error if misused, to prevent incorrect configurations and ensure data integrity.

Screenshot 2024-04-17 at 16 24 40

Actual Behavior:

No error is displayed when a name attribute is added incorrectly, and annotations are not saved.

Impact:

This bug prevents users from completing annotations correctly, potentially causing data loss or corruption in projects relying on this functionality.

Solution:

Updated the tag validation logic to check for incorrect name attribute usage on visual tags, ensuring that an error is displayed to the user before saving annotations.

Additional Changes:

Included updates to configValidator unit tests to cover these scenarios and other scenarios that was broke.

What level of testing was included in the change?

(check all that apply)

  • e2e
  • integration
  • unit

Copy link

netlify bot commented Apr 17, 2024

Deploy Preview for heartex-docs canceled.

Name Link
🔨 Latest commit 1faa4ad
🔍 Latest deploy log https://app.netlify.com/sites/heartex-docs/deploys/66291ff8ef04d9000725543a

@github-actions github-actions bot added the fix label Apr 17, 2024
Copy link

netlify bot commented Apr 17, 2024

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

Name Link
🔨 Latest commit 1faa4ad
🔍 Latest deploy log https://app.netlify.com/sites/label-studio-docs-new-theme/deploys/66291ff87643220008bb7bb9

@hlomzik
Copy link
Collaborator

hlomzik commented Apr 19, 2024

/git merge

Workflow run
Successfully merged: 45 files changed, 815 insertions(+), 790 deletions(-)

@juliosgarbi
Copy link
Contributor Author

juliosgarbi commented Apr 23, 2024

/git merge develop

Workflow run
Successfully merged: 16 files changed, 847 insertions(+), 112 deletions(-)

Copy link

codecov bot commented Apr 23, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 75.92%. Comparing base (066f74b) to head (1faa4ad).
Report is 3 commits behind head on develop.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #5745   +/-   ##
========================================
  Coverage    75.92%   75.92%           
========================================
  Files          158      158           
  Lines        13359    13359           
========================================
  Hits         10143    10143           
  Misses        3216     3216           
Flag Coverage Δ
pytests 75.92% <ø> (ø)

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.

@juliosgarbi
Copy link
Contributor Author

juliosgarbi commented Apr 24, 2024

/git merge develop

Workflow run
Successfully merged: 6 files changed, 27 insertions(+), 9 deletions(-)

@juliosgarbi juliosgarbi enabled auto-merge (squash) April 24, 2024 14:48
@juliosgarbi juliosgarbi merged commit fce3668 into develop Apr 24, 2024
37 checks passed
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