Skip to content

Commit

Permalink
debug
Browse files Browse the repository at this point in the history
  • Loading branch information
rauchy committed Oct 17, 2024
1 parent 98d71ac commit 86f1657
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 9 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ jobs:
- name: Check formatting
run: mvn --errors spotless:check


unit-tests:
strategy:
fail-fast: false
Expand All @@ -53,6 +54,11 @@ jobs:
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2

# - name: Debug Build
# uses: stateful/vscode-server-action@v1
# with:
# timeout: 3000000

- name: Check Unit Tests
run: mvn --errors test

Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,15 @@ public String authType() {
}

public CliTokenSource tokenSourceFor(DatabricksConfig config, String resource) {
String azPath = config.getEnv().get("AZ_PATH");
if (azPath == null) {
azPath = "az";
}

List<String> cmd =
new ArrayList<>(
Arrays.asList(
"az", "account", "get-access-token", "--resource", resource, "--output", "json"));
azPath, "account", "get-access-token", "--resource", resource, "--output", "json"));
Optional<String> subscription = getSubscription(config);
if (subscription.isPresent()) {
// This will fail if the user has access to the workspace, but not to the subscription
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -374,17 +374,13 @@ public DatabricksConfig setAzureUseMsi(boolean azureUseMsi) {
return this;
}

/**
* @deprecated Use {@link #getAzureUseMsi()} instead.
*/
/** @deprecated Use {@link #getAzureUseMsi()} instead. */
@Deprecated()
public boolean getAzureUseMSI() {
return azureUseMsi;
}

/**
* @deprecated Use {@link #setAzureUseMsi(boolean)} instead.
*/
/** @deprecated Use {@link #setAzureUseMsi(boolean)} instead. */
@Deprecated
public DatabricksConfig setAzureUseMSI(boolean azureUseMsi) {
this.azureUseMsi = azureUseMsi;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ void azureCliWorkspaceHeaderPresent() {
StaticEnv env =
new StaticEnv()
.with("HOME", TestOSUtils.resource("/testdata/azure"))
.with("PATH", "testdata:/bin");
.with("PATH", "testdata:/bin")
.with("AZ_PATH", TestOSUtils.resource("./testdata/az"));
String azureWorkspaceResourceId =
"/subscriptions/123/resourceGroups/abc/providers/Microsoft.Databricks/workspaces/abc123";
DatabricksConfig config =
Expand All @@ -32,7 +33,8 @@ void azureCliUserWithManagementAccess() {
StaticEnv env =
new StaticEnv()
.with("HOME", TestOSUtils.resource("/testdata/azure"))
.with("PATH", "testdata:/bin");
.with("PATH", "testdata:/bin")
.with("AZ_PATH", TestOSUtils.resource("./testdata/az"));
String azureWorkspaceResourceId =
"/subscriptions/123/resourceGroups/abc/providers/Microsoft.Databricks/workspaces/abc123";
DatabricksConfig config =
Expand All @@ -51,6 +53,7 @@ void azureCliUserNoManagementAccess() {
new StaticEnv()
.with("HOME", TestOSUtils.resource("/testdata/azure"))
.with("PATH", "testdata:/bin")
.with("AZ_PATH", TestOSUtils.resource("./testdata/az"))
.with("FAIL_IF", "https://management.core.windows.net/");
String azureWorkspaceResourceId =
"/subscriptions/123/resourceGroups/abc/providers/Microsoft.Databricks/workspaces/abc123";
Expand Down

0 comments on commit 86f1657

Please sign in to comment.