Skip to content

Sync Azure environment resolution logic with Go SDK#667

Open
hectorcast-db wants to merge 2 commits intomainfrom
hectorcast-db/sync-env-with-go
Open

Sync Azure environment resolution logic with Go SDK#667
hectorcast-db wants to merge 2 commits intomainfrom
hectorcast-db/sync-env-with-go

Conversation

@hectorcast-db
Copy link
Contributor

What changes are proposed in this pull request?

Summary

Unified the Azure environment resolution logic between getAzureEnvironment() and getDatabricksEnvironment() to ensure consistent behavior and sync with the Go SDK implementation.

Problem

Previously, getAzureEnvironment() and getDatabricksEnvironment() had separate, independent logic for resolving Azure environments, which could lead to inconsistent results:

  • getAzureEnvironment() always defaulted to "PUBLIC" and directly called AzureEnvironment.getEnvironment()
  • getDatabricksEnvironment() had its own Azure environment matching logic that was only triggered when host == null

This divergence meant that config.getAzureEnvironment() and config.getDatabricksEnvironment().getAzureEnvironment() could return different values for the same configuration.

Changes

  1. Unified environment resolution: getAzureEnvironment() now delegates to getDatabricksEnvironment().getAzureEnvironment() instead of maintaining separate logic

  2. Expanded Azure environment matching condition: Updated getDatabricksEnvironment() to trigger Azure environment matching when:

    • azureWorkspaceResourceId is set AND
    • Either host is null OR azureEnvironment is explicitly set

    This allows users to explicitly override the environment even when a host is configured.

  3. Updated test: Modified DatabricksAuthManualTest.azureCliUserWithManagementAccess to explicitly set azureEnvironment("PUBLIC") to reflect the new unified behavior.

Testing

  • All 1067 tests passing ✅
  • Verified Azure CLI authentication works correctly with explicit environment setting
  • Confirmed consistent behavior between getAzureEnvironment() and getDatabricksEnvironment().getAzureEnvironment()

@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-java

Inputs:

  • PR number: 667
  • Commit SHA: ccb19facbad292beeb2abff1243bb83ebe835955

Checks will be approved automatically on success.

@hectorcast-db hectorcast-db deployed to test-trigger-is February 17, 2026 14:06 — with GitHub Actions Active
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