Skip to content

FIX: report initializer catalog outages as unavailable, not unregistered - #2469

Closed
fei (feiiiiii5) wants to merge 4 commits into
microsoft:mainfrom
feiiiiii5:issue2442/catalog-unavailable-copy
Closed

FIX: report initializer catalog outages as unavailable, not unregistered#2469
fei (feiiiiii5) wants to merge 4 commits into
microsoft:mainfrom
feiiiiii5:issue2442/catalog-unavailable-copy

Conversation

@feiiiiii5

Copy link
Copy Markdown
Contributor

Purpose

Fixes #2442.

When /api/initializers/settings succeeds but the registered-Initializer catalog request transiently fails, the Initializers page kept the configured rows but described valid entries as Initializer is no longer registered. — presenting a temporary metadata availability failure as a definitive registration/configuration problem.

What changed

  • resolveRegisteredInitializer gains a catalogAvailable flag (default true, so existing call sites are unaffected). When the catalog could not be loaded, rows get an UnverifiedInitializer placeholder whose copy says the catalog is temporarily unavailable and that registration state cannot be confirmed. The "no longer registered" claim is now only made when a successful catalog response actually lacks the name.
  • Initializers.tsx tracks catalog availability across loads and refreshes and threads it through BaselineInitializers / AdditionalInitializers.

Validation

  • New unit tests for both placeholder paths (initializerLookup.test.ts): catalog-unavailable copy never contains "no longer registered"; available-catalog unknown names still produce the unregistered placeholder.
  • New component regression (Initializers.test.tsx): with settings succeeding and the catalog returning 5xx, the baseline row shows "temporarily unavailable" copy, does not show "no longer registered", and a Refresh after the catalog recovers restores the real description ("Registers targets.").
  • Full Initializers suite: 75 passed (8 suites); tsc --noEmit clean; ESLint clean on all touched files.

AI usage disclosure

  • This PR was developed with AI assistance. All code was human-reviewed and verified locally via the test suites listed above.

fei (feiiiiii5) and others added 3 commits August 23, 2026 07:45
…red (microsoft#2442)

When GET /api/initializers (the registered catalog) fails while
/api/initializers/settings succeeds, configured rows previously rendered
with 'Initializer is no longer registered.' — presenting a temporary
metadata outage as a definitive configuration problem.

resolveRegisteredInitializer now takes a catalogAvailable flag: when the
catalog could not be loaded, rows get an 'UnverifiedInitializer'
placeholder whose copy says the catalog is temporarily unavailable and
that registration state cannot be confirmed. A row is only described as
no longer registered when a successful catalog response actually lacks
the name.

Initializers tracks catalog availability across refreshes and threads it
through BaselineInitializers / AdditionalInitializers.

Signed-off-by: fei <204683769+feiiiiii5@users.noreply.github.com>
…ilable

When the catalog request fails, the row resolves to an UnverifiedInitializer
placeholder with no parameter schema, but Edit stayed enabled — saving from
that dialog replaced existing parameters (e.g. {"mode": "strict"}) with null.
Edit is now disabled until the catalog reloads, the card states why inline,
and Apply/Remove stay usable since they operate on stored parameters only.

Signed-off-by: fei <204683769+feiiiiii5@users.noreply.github.com>
@hannahwestra25 hannahwestra25 self-assigned this Aug 24, 2026
interface AdditionalInitializersProps {
items: AdditionalInitializerSetting[]
registeredInitializers: RegisteredInitializer[]
catalogAvailable?: boolean

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I’m thinking we could replace catalogAvailable with a catalog status union such as:

type CatalogStatus = 'loading' | 'loaded' | 'error'

We could then keep the catalog entries separately and have the lookup return RegisteredInitializer | undefined instead of constructing synthetic RegisteredInitializer objects:

const initializer = registeredInitializers.find(
  (item) => item.initializer_name === initializerName,
)

The renderers could handle each state explicitly: error shows the unavailable message without rendering catalog-derived metadata, loaded with no match shows “no longer registered,” and loaded with a match renders the real metadata. Browse, Add, and Edit could require loaded, while Apply and Remove remain available.

This would avoid interpreting placeholder empty arrays as “Required env vars: None” or “No declared parameters,” and would also prevent cached catalog data from enabling controls after a failed refresh. Could we also cover initial failure, recovery, and loaded-then-failed-refresh transitions?

@feiiiiii5

Copy link
Copy Markdown
Contributor Author

Agreed on all points — the status union is strictly better than the boolean. Plan: introduce CatalogStatus = 'loading' | 'loaded' | 'error', keep catalog entries separate, return RegisteredInitializer | undefined from the lookup, and drop the synthetic placeholder objects entirely. Renderers will branch explicitly (error → unavailable message without catalog-derived metadata; loaded+miss → 'no longer registered'; loaded+hit → real metadata), Browse/Add/Edit gate on loaded, Apply/Remove stay available. For transitions we'll cover initial failure → recovery and loaded → failed-refresh (stale cache must not re-enable controls after a failed refresh, which also answers your cached-data concern). Picking this up now.

@feiiiiii5

Copy link
Copy Markdown
Contributor Author

Closing in favor of #2464, which covers the same fix for #2442 and carries the full review history. My apologies for the duplicate — it was unintentional.

hannahwestra25 your status-union suggestion is implemented there in 20a5d7c: CatalogStatus = 'loading' | 'loaded' | 'error', the lookup returns RegisteredInitializer | undefined with the synthetic placeholders removed, and only a successfully loaded catalog renders the definitive "no longer registered" copy. Thanks for the review — the union is a strict improvement over the boolean.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Initializer catalog failure falsely marks configured entries as unregistered

2 participants