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

refactor: improve error handling of CustomizedImageList #2792

Merged
merged 1 commit into from
Nov 7, 2024

Conversation

agatha197
Copy link
Contributor

@agatha197 agatha197 commented Oct 31, 2024

Changes:
Improves error handling when deleting customized images by:

  • Adding specific error checks for forget_image_by_id and untag_image_from_registry operations
  • Displaying individual error messages from the error array with 2.5s duration
  • Only showing success message and refreshing the environment when all operations complete successfully

Checklist:

  • Mention to the original issue
  • Documentation
  • Minium required manager version
  • Specific setting for review
  • Minimum requirements to check during review
  • Test case(s) to demonstrate the difference of before/after

Test Cases:

  1. Delete an image with forget_image_by_id failure
  2. Delete an image with untag_image_from_registry failure
  3. Delete an image with multiple GraphQL errors
  4. Delete an image successfully

Copy link

graphite-app bot commented Oct 31, 2024

Your org requires the Graphite merge queue for merging into main

Add the label “flow:merge-queue” to the PR and Graphite will automatically add it to the merge queue when it’s ready to merge. Or use the label “flow:hotfix” to add to the merge queue as a hot fix.

You must have a Graphite account and log in to Graphite in order to use the merge queue. Sign up using this link.

Copy link
Contributor Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @agatha197 and the rest of your teammates on Graphite Graphite

@github-actions github-actions bot added the size:M 30~100 LoC label Oct 31, 2024
@agatha197 agatha197 added this to the 24.09 milestone Oct 31, 2024
Copy link

github-actions bot commented Oct 31, 2024

Coverage report for ./react

St.
Category Percentage Covered / Total
🔴 Statements 4.82% 349/7244
🔴 Branches 4.41% 220/4991
🔴 Functions 2.8% 67/2389
🔴 Lines 4.71% 334/7085

Test suite run success

96 tests passing in 12 suites.

Report generated by 🧪jest coverage report action from 4c04c85

Copy link
Contributor

@ironAiken2 ironAiken2 left a comment

Choose a reason for hiding this comment

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

Is there a way to cause a failure for forget_image_by_id or untag_image_from_registry?

Copy link
Contributor Author

it was possible before lablup/backend.ai#3004 is merged 😅

@agatha197 agatha197 force-pushed the refactor/improve-error-handling branch from bcec629 to def93d2 Compare November 5, 2024 14:50
@agatha197 agatha197 changed the title refactor: improve error handling of MyEnvironment refactor: improve error handling of `` Nov 5, 2024
@agatha197 agatha197 changed the title refactor: improve error handling of `` refactor: improve error handling of CustomizedImageList Nov 5, 2024
Copy link
Member

@yomybaby yomybaby left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link

graphite-app bot commented Nov 7, 2024

Merge activity

**Changes:**
Improves error handling when deleting customized images by:
- Adding specific error checks for `forget_image_by_id` and `untag_image_from_registry` operations
- Displaying individual error messages from the error array with 2.5s duration
- Only showing success message and refreshing the environment when all operations complete successfully

**Checklist:**
- [ ] Mention to the original issue
- [ ] Documentation
- [ ] Minium required manager version
- [ ] Specific setting for review
- [ ] Minimum requirements to check during review
- [ ] Test case(s) to demonstrate the difference of before/after

**Test Cases:**
1. Delete an image with `forget_image_by_id` failure
2. Delete an image with `untag_image_from_registry` failure
3. Delete an image with multiple GraphQL errors
4. Delete an image successfully
@yomybaby yomybaby force-pushed the refactor/improve-error-handling branch from def93d2 to 4c04c85 Compare November 7, 2024 03:15
@graphite-app graphite-app bot merged commit 4c04c85 into main Nov 7, 2024
6 checks passed
@graphite-app graphite-app bot deleted the refactor/improve-error-handling branch November 7, 2024 03:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size:M 30~100 LoC
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants