Skip to content
Merged
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.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"mode": "java_v0",
"api_changelog": true,
"api_changelog": false,
"sync": {
"allow_from_packages": [
"**/*.java",
Expand Down
2 changes: 1 addition & 1 deletion .codegen/_last_sha
Original file line number Diff line number Diff line change
@@ -1 +1 @@
7216eeb8c5e517080d626f64b36209fea64788b3
880d3221a1560a48172008865530ea224f5905a4
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Version changelog

## Release v0.159.0 (2026-10-02)

### API Changes
* Add `environment` field for `com.databricks.sdk.service.sandbox.SandboxSpec`.
* Add `TABLE_FOREIGN_DELTA_DELTASHARING` enum value for `com.databricks.sdk.service.catalog.SecurableKind`.
* [Breaking] Change `environmentVariablesKey` field for `com.databricks.sdk.service.jobs.JobEnvironmentVariables` to be required.
* Change `environmentVariablesKey` field for `com.databricks.sdk.service.jobs.JobEnvironmentVariables` to be required.

## Release v0.158.0 (2026-10-01)

### API Changes
Expand Down
2 changes: 1 addition & 1 deletion 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.158.0",
"version": "0.159.0",
"lockFileVersion": 1,
"dependencies": [
{
Expand Down
2 changes: 1 addition & 1 deletion 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.158.0</version>
<version>0.159.0</version>
</parent>
<artifactId>databricks-sdk-java</artifactId>
<name>Databricks SDK for Java</name>
Expand Down
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.158.0";
private static final String version = "0.159.0";

public static void withProduct(String product, String productVersion) {
UserAgent.product = product;
Expand Down

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

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

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

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

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
@@ -0,0 +1,46 @@
// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT.

package com.databricks.sdk.service.sandbox;

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

@Generated
public class EnvironmentSpec {
/**
* A Unity Catalog container artifact (e.g. `catalog.schema.folder.image:tag`) to run as the
* sandbox environment. When set, this image is used as the environment instead of resolving a
* managed image from `environment_version`.
*/
@JsonProperty("image_uri")
private String imageUri;

public EnvironmentSpec setImageUri(String imageUri) {
this.imageUri = imageUri;
return this;
}

public String getImageUri() {
return imageUri;
}

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

@Override
public int hashCode() {
return Objects.hash(imageUri);
}

@Override
public String toString() {
return new ToStringer(EnvironmentSpec.class).add("imageUri", imageUri).toString();
}
}

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
@@ -1,18 +1,23 @@
package com.databricks.sdk;

import static org.junit.jupiter.api.Assertions.*;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertNotEquals;
import static org.junit.jupiter.api.Assertions.assertNull;
import static org.junit.jupiter.api.Assertions.assertTrue;

import com.databricks.sdk.core.DatabricksConfig;
import com.databricks.sdk.core.HostType;
import com.databricks.sdk.core.http.Response;
import com.databricks.sdk.service.provisioning.Workspace;
import java.util.Collections;
import org.junit.jupiter.api.Test;

public class AccountClientTest {

@Test
public void testGetWorkspaceClientForTraditionalAccount() {
DatabricksConfig accountConfig =
new DatabricksConfig()
testConfig()
.setHost("https://accounts.cloud.databricks.com")
.setAccountId("test-account")
.setToken("test-token");
Expand All @@ -34,10 +39,7 @@ public void testGetWorkspaceClientForTraditionalAccount() {
public void testGetWorkspaceClientForUnifiedHost() {
String unifiedHost = "https://unified.databricks.com";
DatabricksConfig accountConfig =
new DatabricksConfig()
.setHost(unifiedHost)
.setAccountId("test-account")
.setToken("test-token");
testConfig().setHost(unifiedHost).setAccountId("test-account").setToken("test-token");

AccountClient accountClient = new AccountClient(accountConfig);

Expand All @@ -61,10 +63,7 @@ public void testGetWorkspaceClientForUnifiedHost() {
public void testGetWorkspaceClientForSpogHostDoesNotMutateAccountConfig() {
String spogHost = "https://mycompany.databricks.com";
DatabricksConfig accountConfig =
new DatabricksConfig()
.setHost(spogHost)
.setAccountId("test-account")
.setToken("test-token");
testConfig().setHost(spogHost).setAccountId("test-account").setToken("test-token");

AccountClient accountClient = new AccountClient(accountConfig);

Expand All @@ -91,4 +90,10 @@ public void testGetWorkspaceClientForSpogHostDoesNotMutateAccountConfig() {
assertEquals(spogHost, wc1.config().getHost());
assertEquals(spogHost, wc2.config().getHost());
}

private static DatabricksConfig testConfig() {
DatabricksConfig config = new DatabricksConfig();
config.setHttpClient(request -> new Response(request, 200, "OK", Collections.emptyMap(), "{}"));
return config;
}
}
Loading
Loading