-
Notifications
You must be signed in to change notification settings - Fork 848
FIX: distinguish catalog-unavailable from unregistered in Initializers page #2464
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
Open
fei (feiiiiii5)
wants to merge
7
commits into
microsoft:main
Choose a base branch
from
feiiiiii5:fix/initializer-catalog-unavailable
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
2dc177d
FIX: distinguish catalog-unavailable from unregistered in Initializer…
feiiiiii5 5796799
FIX: disable Edit on initializer cards while the catalog is unavailable
feiiiiii5 d291d77
FIX: report catalog unavailability in the available-initializers dialog
feiiiiii5 bdc93eb
Merge branch 'main' into fix/initializer-catalog-unavailable
romanlutz 20a5d7c
MAINT: make initializer catalog state explicit and typed
feiiiiii5 749e65e
FIX: drop the loaded catalog when a refresh fails
feiiiiii5 acf7bb0
Merge branch 'main' into fix/initializer-catalog-unavailable
feiiiiii5 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
If a refresh fails after a successful load,
registeredInitializerskeeps the old entries whilecatalogStatusbecomeserror. That leaves stale metadata visible and the Add controls enabled even though catalog-dependent UI should be unavailable; could we clear the array here or make consumers ignore it unless the status isloaded, with a regression test for success followed by refresh failure?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.
Addressed in 749e65e (merged
mainas acf7bb0 so this sits on current main).Took the first option — the failure branch now drops the catalog instead of keeping the last good list:
Both symptoms you named follow from that one change, with no new gating logic:
findRegisteredInitializer, so an empty list makes the baseline/additional rows fall back toinitializerFallbackDescription('error')→ "Catalog metadata temporarily unavailable.", and theRequired env vars:line stops rendering (it is inside{initializer && ...}).registeredInitializers.length === 0guard fires, andinitializerNameresolves to'', sodisabled={creating || !initializerName}disables the button. A staleselectedInitializerNamecannot keep it enabled — the section unmounts whileloadingis true, so that local state resets on remount.Regression test:
should drop the loaded catalog and disable Add when a refresh fails after a successful load(loads successfully and asserts the real description + env vars + enabled Add first, then fails the secondlistRegisteredcall). Verified it fails on the pre-fix code — the stale "Registers targets." description is still rendered — and passes with the fix.Initializers folder: 79/79 passing (was 78 before this test),
tsc --noEmitclean,eslint --max-warnings 0clean, all re-run after the merge commit.