Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .codegen/_last_sha
Original file line number Diff line number Diff line change
@@ -1 +1 @@
e0b8229e948c8063e05433bce268ff448ad20199
da7fcfc1c46b1bf871f3a25bb82e5c2ea62cdac0
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
# Version changelog

## Release v0.172.0 (2026-10-29)

### Bug Fixes
* Fix Databricks CLI authentication rejecting small wrappers around the CLI (e.g. launcher scripts or version manager shims) as the legacy Python CLI. Small files found in `PATH` are now only rejected if they are the entry point pip installs for the legacy Python CLI.

### API Changes
* Add `getBudgetSpendStatus()` and `listBudgetSpendStatuses()` methods for `accountClient.budgets()` service.
* Add `aiFunctionTask` field for `com.databricks.sdk.service.jobs.ResolvedValues`.
* Add `aiFunctionTaskOutput` field for `com.databricks.sdk.service.jobs.RunOutput`.
* Add `aiFunctionTask` field for `com.databricks.sdk.service.jobs.RunTask`.
* Add `aiFunctionTask` field for `com.databricks.sdk.service.jobs.SubmitTask`.
* Add `aiFunctionTask` field for `com.databricks.sdk.service.jobs.Task`.

## Release v0.171.0 (2026-10-26)

### API Changes
Expand Down
16 changes: 8 additions & 8 deletions databricks-sdk-java/lockfile.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"artifactId": "databricks-sdk-java",
"groupId": "com.databricks",
"version": "0.171.0",
"version": "0.172.0",
"lockFileVersion": 1,
"dependencies": [
{
Expand Down Expand Up @@ -894,14 +894,14 @@
{
"groupId": "commons-io",
"artifactId": "commons-io",
"version": "2.14.0",
"version": "2.22.0",
"checksumAlgorithm": "SHA-256",
"checksum": "e35d1df7232568ed4b81d9a9ed94a0159b3ff6cf1915cc21eef5cb55d7b157a2",
"checksum": "2b9a7b1f726fb86216dbd2c8321eabe0221dbd5b1be81c18e1cb53811b104758",
"scope": "compile",
"resolved": "https://repo.maven.apache.org/maven2/commons-io/commons-io/2.14.0/commons-io-2.14.0.jar",
"selectedVersion": "2.14.0",
"resolved": "https://repo.maven.apache.org/maven2/commons-io/commons-io/2.22.0/commons-io-2.22.0.jar",
"selectedVersion": "2.22.0",
"included": true,
"id": "commons-io:commons-io:2.14.0",
"id": "commons-io:commons-io:2.22.0",
"children": []
},
{
Expand All @@ -924,7 +924,7 @@
"checksum": "2b9a7b1f726fb86216dbd2c8321eabe0221dbd5b1be81c18e1cb53811b104758",
"scope": "compile",
"resolved": "https://repo.maven.apache.org/maven2/commons-io/commons-io/2.22.0/commons-io-2.22.0.jar",
"selectedVersion": "2.14.0",
"selectedVersion": "2.22.0",
"included": false,
"id": "commons-io:commons-io:2.22.0",
"parent": "org.apache.commons:commons-configuration2:2.15.1",
Expand Down Expand Up @@ -1460,7 +1460,7 @@
"metaData": {
"environment": {
"osName": "Linux",
"mavenVersion": "3.8.7",
"mavenVersion": "3.9.6",
"javaVersion": "21.0.12.1"
},
"config": {
Expand Down
4 changes: 2 additions & 2 deletions databricks-sdk-java/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>com.databricks</groupId>
<artifactId>databricks-sdk-parent</artifactId>
<version>0.171.0</version>
<version>0.172.0</version>
</parent>
<artifactId>databricks-sdk-java</artifactId>
<name>Databricks SDK for Java</name>
Expand Down Expand Up @@ -69,7 +69,7 @@
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.14.0</version>
<version>2.22.0</version>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public String getValue() {
// TODO: check if reading from
// /META-INF/maven/com.databricks/databrics-sdk-java/pom.properties
// or getClass().getPackage().getImplementationVersion() is enough.
private static final String version = "0.171.0";
private static final String version = "0.172.0";

public static void withProduct(String product, String productVersion) {
UserAgent.product = product;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import com.databricks.sdk.core.logging.LoggerFactory;
import com.databricks.sdk.support.InternalApi;
import java.io.IOException;
import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
Expand All @@ -18,6 +19,13 @@
public class OSUtils {
private static final Logger LOG = LoggerFactory.getLogger(OSUtils.class);

// Files at least this large are assumed to be the Go CLI and are not read.
private static final long DATABRICKS_CLI_MIN_SIZE = 1024 * 1024;

// Identifies the legacy CLI's pip entry point script. The imported name is omitted because it
// changed from `cli` to `main` in 0.17.8.
private static final String LEGACY_CLI_MARKER = "from databricks_cli.cli import ";

/**
* Returns the name of the current operating system.
*
Expand Down Expand Up @@ -62,9 +70,18 @@ public static String findExecutable(List<String> paths, String name) {
LOG.debug("Unable to get size of databricks cli, continuing", e);
continue;
}
if (size < 1024 * 1024) {
LOG.debug("Databricks CLI version <0.100.0 detected");
continue;
if (size < DATABRICKS_CLI_MIN_SIZE) {
byte[] content;
try {
content = Files.readAllBytes(path);
} catch (IOException e) {
LOG.debug("Unable to read databricks cli, continuing", e);
continue;
}
if (new String(content, StandardCharsets.ISO_8859_1).contains(LEGACY_CLI_MARKER)) {
LOG.debug("Databricks CLI version <0.100.0 detected");
continue;
}
}
String pathStr = path.toString();
LOG.debug("Found executable named '" + name + "' in PATH: " + pathStr);
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,124 @@
// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT.

package com.databricks.sdk.service.billing;

import com.databricks.sdk.support.Generated;
import com.databricks.sdk.support.ToStringer;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.Objects;

/**
* The calling user's spend against a single blocking threshold. Values may be omitted if live spend
* or threshold data is temporarily unavailable.
*/
@Generated
public class AlertSpendStatus {
/**
* Percentage of the threshold consumed, as a decimal string rounded down to one decimal place
* (for example, "68.4" means 68.4%). May exceed 100 when spend is over the threshold. Returns
* "0.0" if there's no spend, and is omitted if the threshold is $0. For shared thresholds, this
* is the only value returned; the absolute `spend` and `threshold` dollar amounts are withheld.
*/
@JsonProperty("percent_consumed")
private String percentConsumed;

/**
* Whether the threshold is evaluated per individual user
* (`ALERT_CONFIGURATION_SCOPE_TYPE_PER_USER`) or on the shared spend across all users
* (`ALERT_CONFIGURATION_SCOPE_TYPE_SHARED`).
*/
@JsonProperty("scope_type")
private AlertConfigurationScopeType scopeType;

/**
* The calling user's live spend against this threshold, in USD at list price. Returns "0" if the
* caller has no usage. Omitted for shared thresholds, where only `percent_consumed` is returned.
*/
@JsonProperty("spend")
private String spend;

/**
* The calling user's effective threshold, in USD at list price. The effective threshold is the
* actual threshold amount that applies to the user, after adjusting for any user or group
* overrides. Omitted for shared thresholds, where only `percent_consumed` is returned.
*/
@JsonProperty("threshold")
private String threshold;

/** The time window the threshold applies to, for example `MONTH`. */
@JsonProperty("time_period")
private AlertConfigurationTimePeriod timePeriod;

public AlertSpendStatus setPercentConsumed(String percentConsumed) {
this.percentConsumed = percentConsumed;
return this;
}

public String getPercentConsumed() {
return percentConsumed;
}

public AlertSpendStatus setScopeType(AlertConfigurationScopeType scopeType) {
this.scopeType = scopeType;
return this;
}

public AlertConfigurationScopeType getScopeType() {
return scopeType;
}

public AlertSpendStatus setSpend(String spend) {
this.spend = spend;
return this;
}

public String getSpend() {
return spend;
}

public AlertSpendStatus setThreshold(String threshold) {
this.threshold = threshold;
return this;
}

public String getThreshold() {
return threshold;
}

public AlertSpendStatus setTimePeriod(AlertConfigurationTimePeriod timePeriod) {
this.timePeriod = timePeriod;
return this;
}

public AlertConfigurationTimePeriod getTimePeriod() {
return timePeriod;
}

@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
AlertSpendStatus that = (AlertSpendStatus) o;
return Objects.equals(percentConsumed, that.percentConsumed)
&& Objects.equals(scopeType, that.scopeType)
&& Objects.equals(spend, that.spend)
&& Objects.equals(threshold, that.threshold)
&& Objects.equals(timePeriod, that.timePeriod);
}

@Override
public int hashCode() {
return Objects.hash(percentConsumed, scopeType, spend, threshold, timePeriod);
}

@Override
public String toString() {
return new ToStringer(AlertSpendStatus.class)
.add("percentConsumed", percentConsumed)
.add("scopeType", scopeType)
.add("spend", spend)
.add("threshold", threshold)
.add("timePeriod", timePeriod)
.toString();
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT.

package com.databricks.sdk.service.billing;

import com.databricks.sdk.support.Generated;
import com.databricks.sdk.support.ToStringer;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.Collection;
import java.util.Objects;

/** The calling user's live spend against the blocking thresholds of a single budget. */
@Generated
public class BudgetSpendStatus {
/**
* The calling user's spend against each blocking threshold on this budget, one entry per scope
* type and time period. A blocking threshold is a threshold that, once reached, blocks further
* requests through Unity Gateway.
*/
@JsonProperty("alert_spend_statuses")
private Collection<AlertSpendStatus> alertSpendStatuses;

/**
* The resource name of this budget spend status, of the form
* `accounts/{account_id}/budget-spend-statuses/{budget_id}`.
*/
@JsonProperty("name")
private String name;

public BudgetSpendStatus setAlertSpendStatuses(Collection<AlertSpendStatus> alertSpendStatuses) {
this.alertSpendStatuses = alertSpendStatuses;
return this;
}

public Collection<AlertSpendStatus> getAlertSpendStatuses() {
return alertSpendStatuses;
}

public BudgetSpendStatus setName(String name) {
this.name = name;
return this;
}

public String getName() {
return name;
}

@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
BudgetSpendStatus that = (BudgetSpendStatus) o;
return Objects.equals(alertSpendStatuses, that.alertSpendStatuses)
&& Objects.equals(name, that.name);
}

@Override
public int hashCode() {
return Objects.hash(alertSpendStatuses, name);
}

@Override
public String toString() {
return new ToStringer(BudgetSpendStatus.class)
.add("alertSpendStatuses", alertSpendStatuses)
.add("name", name)
.toString();
}
}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading