Skip to content

Remove unified flag usage and fix tests for server-side OIDC resolution#1331

Open
hectorcast-db wants to merge 10 commits intomainfrom
hectorcast-db/stack/unified-for-real
Open

Remove unified flag usage and fix tests for server-side OIDC resolution#1331
hectorcast-db wants to merge 10 commits intomainfrom
hectorcast-db/stack/unified-for-real

Conversation

@hectorcast-db
Copy link
Contributor

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

🥞 Stacked PR

Use this link to review incremental changes.


Summary

  • Remove experimental_is_unified_host flag and ClientType.UNIFIED usages — all hosts now go through the same metadata resolution path
  • Simplify databricks_oidc_endpoints to use discovery_url from host metadata instead of client-side URL construction
  • Add per-test HostMetadata overrides for tests that need a valid discovery_url
  • Remove 5 redundant OIDC endpoint tests that only round-tripped mocked metadata
  • Remove 3 tests for deleted unified flag behavior
  • Update remaining tests to match new behavior (metadata always resolved, is_account_client no longer raises on unified hosts)

NOTE: This PR does not remove yet the flag itself, since the feature is still on experimental mode.

Test plan

  • All 165 remaining tests pass
  • Verified removed tests were redundant (covered by test_databricks_oidc_endpoints_uses_discovery_url)

This pull request was AI-assisted by Isaac.

Update test_config.py to reflect that OIDC endpoint selection is now
handled server-side via host metadata. Add per-test HostMetadata
overrides where needed, remove tests that were just round-tripping
mocked metadata, and delete tests for removed unified flag behavior.

Co-authored-by: Isaac
@hectorcast-db hectorcast-db changed the title remove unified flag usage Fix tests for server-side OIDC endpoint resolution Mar 13, 2026
@hectorcast-db hectorcast-db changed the title Fix tests for server-side OIDC endpoint resolution Remove unified flag usage and fix tests for server-side OIDC resolution Mar 13, 2026
The host metadata oidc_endpoint is the OIDC root, not the full
discovery URL. Append the well-known path when constructing
discovery_url, and strip trailing slashes to avoid double slashes.

Co-authored-by: Isaac
…orkspace_id

Verifies that Config with experimental_is_unified_host resolves
account_id and workspace_id from the host metadata endpoint.

Co-authored-by: Isaac
Add vscode_pytest module check so _load_debug_env_if_runs_from_ide
works when running tests from Cursor/VS Code, not just JetBrains.

Co-authored-by: Isaac
if audience is None and cfg.client_type == ClientType.ACCOUNT:
audience = cfg.account_id
if audience is None and cfg.client_type != ClientType.ACCOUNT:
if audience is None:
Copy link
Contributor Author

@hectorcast-db hectorcast-db Mar 13, 2026

Choose a reason for hiding this comment

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

For account level hosts, audience is set during host metadata resolution.

Remove the two CLI token source tests that asserted the flag was passed,
as we are dropping --experimental-is-unified-host from the CLI args.

Co-authored-by: Isaac
@hectorcast-db hectorcast-db force-pushed the hectorcast-db/stack/unified-for-real branch from fbfa4cc to a9af8c6 Compare March 13, 2026 15:14
@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-py

Inputs:

  • PR number: 1331
  • Commit SHA: a9af8c68a16d1ddacd02091eab315542e6762ce1

Checks will be approved automatically on success.

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.

1 participant