-
Notifications
You must be signed in to change notification settings - Fork 394
fix: [UIE-10094] Buckets query race condition #13319
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
Conversation
|
@cpathipa would appreciate your eyes on the logic since I remember you working on some of this |
| ((isObjectStorageGen2Enabled && Boolean(endpoints)) || | ||
| (isObjMultiClusterEnabled && Boolean(regions)) || | ||
| Boolean(clusters)); | ||
| (isObjMultiClusterEnabled && |
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.
I see that's working so it might be what was needed, but do we need all of that?
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.
Yes.. this is the fix and because the logic is a bit complex we need these conditionals to be more more fine grained. Not that I like it, but that's what I came up with, without bigger refactors. Happy yo consider a better solution if you can think of one
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.
hmm
I see that regions already handles the condition isObjMultiClusterEnabled && !isObjectStorageGen2Enabled
const regions =
isObjMultiClusterEnabled && !isObjectStorageGen2Enabled
? allRegions?.filter((r) => r.capabilities.includes('Object Storage'))
: undefined;
so maybe we can do smth like this:
const queryEnabled =
enabled &&
(
(isObjectStorageGen2Enabled && Boolean(endpoints)) ||
Boolean(regions) ||
(!isObjMultiClusterEnabled && !isObjectStorageGen2Enabled && Boolean(clusters))
);
what do you think?
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.
This works - it's cleaner I agree. I need to confirm this works well in all cases but this should do it
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.
I even simplified the logic and just await any of the query. this fixes it
Cloud Manager UI test results🔺 28 failing tests on test run #7 ↗︎
Details
TroubleshootingUse this command to re-run the failing tests: pnpm cy:run -s "cypress/e2e/core/objectStorageMulticluster/bucket-create-multicluster.spec.ts,cypress/e2e/core/objectStorageGen2/bucket-object-gen2.spec.ts,cypress/e2e/core/objectStorageGen2/bucket-details-gen2.spec.ts,cypress/e2e/core/objectStorage/object-storage-errors.spec.ts,cypress/e2e/core/objectStorage/access-key.e2e.spec.ts,cypress/e2e/core/objectStorage/object-storage.e2e.spec.ts,cypress/e2e/core/objectStorageMulticluster/access-keys-multicluster.spec.ts,cypress/e2e/core/objectStorageMulticluster/object-storage-objects-multicluster.spec.ts,cypress/e2e/core/objectStorage/object-storage.smoke.spec.ts,cypress/e2e/core/objectStorageGen2/bucket-create-gen2.spec.ts,cypress/e2e/core/objectStorageMulticluster/bucket-delete-multicluster.spec.ts,cypress/e2e/core/objectStorage/enable-object-storage.spec.ts" |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Oh boy this was not expected. Since not being familiar enough with this feature I will close this for now and let the storage team find a more holistic refactor including a much needed cleanup - sorry @skulpok-akamai - i tried :D |
Description 📝
Customers have reported that upon loading Cloud Manager and navigating to the Object Storage page, Cloud Manager shows them the empty state landing page leading the customers to believe that all of their buckets are gone. Upon refreshing the page, the buckets load and appear as expected.
While it is hard to reproduce with the scenario above, one way to detect the bug consistently is to access that page through Cloud Manager auth callback redirect URL by signing out and back in.
🐛 The issue: a race condition with the complex logic to enable the query with our feature flags.
🔧 The fix: await any of the data source
Changes 🔄
Scope 🚢
Upon production release, changes in this PR will be visible to:
Preview 📷
Screen.Recording.2026-01-26.at.13.10.46.mov
Screen.Recording.2026-01-26.at.13.09.06.mov
How to test 🧪
Prerequisites
Any account with a bucket
Reproduction steps
See video "Before"
Verification steps
See video "After"
Author Checklists
As an Author, to speed up the review process, I considered 🤔
👀 Doing a self review
❔ Our contribution guidelines
🤏 Splitting feature into small PRs
➕ Adding a changeset
🧪 Providing/improving test coverage
🔐 Removing all sensitive information from the code and PR description
🚩 Using a feature flag to protect the release
👣 Providing comprehensive reproduction steps
📑 Providing or updating our documentation
🕛 Scheduling a pair reviewing session
📱 Providing mobile support
♿ Providing accessibility support
As an Author, before moving this PR from Draft to Open, I confirmed ✅