Skip to content

Call resolveHostMetadata on Config init#1542

Merged
hectorcast-db merged 4 commits intomainfrom
hectorcast-db/stack/port/resolve-host-metadata-on-init
Mar 16, 2026
Merged

Call resolveHostMetadata on Config init#1542
hectorcast-db merged 4 commits intomainfrom
hectorcast-db/stack/port/resolve-host-metadata-on-init

Conversation

@hectorcast-db
Copy link
Contributor

@hectorcast-db hectorcast-db commented Mar 16, 2026

🥞 Stacked PR

Use this link to review incremental changes.


Summary

Test plan

  • TestEnsureResolved_ResolvesHostMetadata_WhenUnifiedHost — verifies fields populated from metadata
  • TestEnsureResolved_HostMetadataFailure_NonFatal — 500 response, config still resolves
  • TestEnsureResolved_HostMetadata_NoOidcEndpoint_NonFatal — missing oidc_endpoint, no error
  • TestEnsureResolved_HostMetadata_MissingAccountIdWithPlaceholder_Warns — template needs account_id but missing
  • Existing resolveHostMetadata tests updated for new discovery URL format

NO_CHANGELOG=true

This pull request was AI-assisted by Isaac.

Port of Python SDK PR #1318 and discovery URL fix from PR #1332.
Extract applyHostMetadata() from resolveHostMetadata() for reuse.
Call host metadata resolution during EnsureResolved() for unified hosts,
with non-fatal error handling (warns on failure instead of failing).
The OIDC endpoint from metadata is now treated as the OIDC root, with
/.well-known/oauth-authorization-server appended to form the full
discovery URL.

Co-authored-by: Isaac
Instead of silently ignoring the error from fixHostIfNeeded(), log it
as a warning before skipping host metadata resolution.

Co-authored-by: Isaac
@hectorcast-db hectorcast-db changed the title Call resolveHostMetadata on Config init (non-fatal) Call resolveHostMetadata on Config init Mar 16, 2026
Copy link
Contributor

@tejaskochar-db tejaskochar-db left a comment

Choose a reason for hiding this comment

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

lgtm

@github-actions
Copy link

If integration tests don't run automatically, an authorized user can run them manually by following the instructions below:

Trigger:
go/deco-tests-run/sdk-go

Inputs:

  • PR number: 1542
  • Commit SHA: 20b6cd4abc1a3284d586c88f802c4b7df2678062

Checks will be approved automatically on success.

@hectorcast-db hectorcast-db added this pull request to the merge queue Mar 16, 2026
Merged via the queue into main with commit 42f84f1 Mar 16, 2026
15 checks passed
@hectorcast-db hectorcast-db deleted the hectorcast-db/stack/port/resolve-host-metadata-on-init branch March 16, 2026 14:03
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.

2 participants