Skip to content

Commit a6d4f8f

Browse files
Update SDK API to 129c9a58f8048f59e7d2829261ec88b7ec9f567f (#1837)
This PR updates the SDK to the latest API changes. NO_CHANGELOG=true Co-authored-by: databricks-ci-ghec-1[bot] <184311507+databricks-ci-ghec-1[bot]@users.noreply.github.com>
1 parent c48cde8 commit a6d4f8f

9 files changed

Lines changed: 77 additions & 25 deletions

File tree

.codegen/_openapi_sha

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
c5b617b9f1391e00475b4716c302c65792d6acdd
1+
129c9a58f8048f59e7d2829261ec88b7ec9f567f

.gitattributes

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ error_alias.go linguist-generated=true
55
experimental/mocks/mock_account_client.go linguist-generated=true
66
experimental/mocks/mock_workspace_client.go linguist-generated=true
77
experimental/mocks/service/agentbricks/mock_agent_bricks_interface.go linguist-generated=true
8+
experimental/mocks/service/aifunctions/mock_ai_functions_interface.go linguist-generated=true
89
experimental/mocks/service/aisearch/mock_ai_search_interface.go linguist-generated=true
910
experimental/mocks/service/apps/mock_apps_interface.go linguist-generated=true
1011
experimental/mocks/service/apps/mock_apps_settings_interface.go linguist-generated=true
@@ -72,6 +73,7 @@ experimental/mocks/service/database/mock_database_interface.go linguist-generate
7273
experimental/mocks/service/dataclassification/mock_data_classification_interface.go linguist-generated=true
7374
experimental/mocks/service/dataquality/mock_data_quality_interface.go linguist-generated=true
7475
experimental/mocks/service/disasterrecovery/mock_disaster_recovery_interface.go linguist-generated=true
76+
experimental/mocks/service/domains/mock_domains_interface.go linguist-generated=true
7577
experimental/mocks/service/environments/mock_create_workspace_base_environment_operation_interface.go linguist-generated=true
7678
experimental/mocks/service/environments/mock_environments_interface.go linguist-generated=true
7779
experimental/mocks/service/environments/mock_refresh_workspace_base_environment_operation_interface.go linguist-generated=true
@@ -114,12 +116,14 @@ experimental/mocks/service/marketplace/mock_provider_listings_interface.go lingu
114116
experimental/mocks/service/marketplace/mock_provider_personalization_requests_interface.go linguist-generated=true
115117
experimental/mocks/service/marketplace/mock_provider_provider_analytics_dashboards_interface.go linguist-generated=true
116118
experimental/mocks/service/marketplace/mock_provider_providers_interface.go linguist-generated=true
119+
experimental/mocks/service/ml/mock_backfill_features_operation_interface.go linguist-generated=true
117120
experimental/mocks/service/ml/mock_experiments_interface.go linguist-generated=true
118121
experimental/mocks/service/ml/mock_feature_engineering_interface.go linguist-generated=true
119122
experimental/mocks/service/ml/mock_feature_store_interface.go linguist-generated=true
120123
experimental/mocks/service/ml/mock_forecasting_interface.go linguist-generated=true
121124
experimental/mocks/service/ml/mock_materialized_features_interface.go linguist-generated=true
122125
experimental/mocks/service/ml/mock_model_registry_interface.go linguist-generated=true
126+
experimental/mocks/service/ml/mock_purge_feature_entities_operation_interface.go linguist-generated=true
123127
experimental/mocks/service/networking/mock_endpoints_interface.go linguist-generated=true
124128
experimental/mocks/service/oauth2/mock_account_federation_policy_interface.go linguist-generated=true
125129
experimental/mocks/service/oauth2/mock_custom_app_integration_interface.go linguist-generated=true
@@ -167,6 +171,7 @@ experimental/mocks/service/provisioning/mock_storage_interface.go linguist-gener
167171
experimental/mocks/service/provisioning/mock_vpc_endpoints_interface.go linguist-generated=true
168172
experimental/mocks/service/provisioning/mock_workspaces_interface.go linguist-generated=true
169173
experimental/mocks/service/qualitymonitorv2/mock_quality_monitor_v2_interface.go linguist-generated=true
174+
experimental/mocks/service/sandbox/mock_sandbox_interface.go linguist-generated=true
170175
experimental/mocks/service/serving/mock_serving_endpoints_data_plane_interface.go linguist-generated=true
171176
experimental/mocks/service/serving/mock_serving_endpoints_interface.go linguist-generated=true
172177
experimental/mocks/service/settings/mock_account_ip_access_lists_interface.go linguist-generated=true

NEXT_CHANGELOG.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,4 +42,6 @@
4242
* [Breaking] Remove `Owner` field for [catalog.ModelService](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/catalog#ModelService).
4343
* [Breaking] Remove `FirstTokenTimeout` and `TrafficSplitting` fields for [catalog.ModelServiceConfigRoutingConfig](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/catalog#ModelServiceConfigRoutingConfig).
4444
* [Breaking] Remove `RequestTagKey` and `RequestTagValue` fields for [catalog.RateLimit](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/catalog#RateLimit).
45-
* [Breaking] Remove `RateLimitKeyRequestTag` enum value for [catalog.RateLimitRateLimitKey](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/catalog#RateLimitRateLimitKey).
45+
* [Breaking] Remove `RateLimitKeyRequestTag` enum value for [catalog.RateLimitRateLimitKey](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/catalog#RateLimitRateLimitKey).
46+
* Add `Deny` field for [catalog.PolicyInfo](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/catalog#PolicyInfo).
47+
* Add `PolicyTypeDeny` enum value for [catalog.PolicyType](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/catalog#PolicyType).

service/catalog/model.go

Lines changed: 21 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

service/domains/model.go

Lines changed: 1 addition & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

service/pipelines/api.go

100755100644
Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

service/pipelines/interface.go

100755100644
Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

service/pipelines/model.go

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tagging.py

Lines changed: 39 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -650,9 +650,13 @@ def get_next_tag_info_from_nextchanges(package: Package) -> Optional[TagInfo]:
650650
``.codegen.json`` — matching the ``NEXT_CHANGELOG.md`` skip behavior.
651651
"""
652652
body = render_nextchanges(package.path)
653-
if body is None and not _load_codegen_config(package.path).get("allow_empty_changelog", False):
654-
print(f"No {_nextchanges_dir()}/ entries. No changes will be made to the changelog.")
655-
return None
653+
if body is None:
654+
if not _load_codegen_config(package.path).get("allow_empty_changelog", False):
655+
print(f"No {_nextchanges_dir()}/ entries. No changes will be made to the changelog.")
656+
return None
657+
if not _source_changed_since_last_release(package):
658+
print(f"No {_nextchanges_dir()}/ entries and no source changes since the last release; skipping.")
659+
return None
656660

657661
version = read_nextchanges_version(package)
658662
# write_changelog() keys off the "## Release v…" header, so include it.
@@ -710,12 +714,15 @@ def get_next_tag_info(package: Package) -> Optional[TagInfo]:
710714
# By default, packages whose NEXT_CHANGELOG.md has no populated
711715
# sections are skipped — there's nothing meaningful to release.
712716
# Repos like sdk-js which are still in development can opt in
713-
# by setting ``allow_empty_changelog: true`` in .codegen.json.
714-
if not re.search(r"###", next_changelog) and not _load_codegen_config(package.path).get(
715-
"allow_empty_changelog", False
716-
):
717-
print("All sections are empty. No changes will be made to the changelog.")
718-
return None
717+
# by setting ``allow_empty_changelog: true`` in .codegen.json — but
718+
# even then, only when the package's source actually changed.
719+
if not re.search(r"###", next_changelog):
720+
if not _load_codegen_config(package.path).get("allow_empty_changelog", False):
721+
print("All sections are empty. No changes will be made to the changelog.")
722+
return None
723+
if not _source_changed_since_last_release(package):
724+
print("All sections are empty and no source changes since the last release; skipping.")
725+
return None
719726

720727
version_match = re.search(rf"## Release v({Version.PATTERN})", next_changelog)
721728

@@ -832,9 +839,10 @@ def find_last_release_tag(package: Package) -> Optional[str]:
832839
def has_commits_since_tag(tag: str, path: str) -> bool:
833840
"""
834841
Returns True iff at least one commit reachable from HEAD but not from
835-
``tag`` touches ``path``. Used to detect that a sibling dependency has
836-
unreleased changes that would ship stale if we tagged a dependent
837-
without re-tagging the dependency.
842+
``tag`` touches ``path``. Detects both that a sibling dependency has
843+
unreleased changes that would ship stale (freshness) and, via
844+
``_source_changed_since_last_release``, whether a package has anything to
845+
release under allow_empty_changelog.
838846
839847
:raises Exception: If the git command fails.
840848
"""
@@ -846,6 +854,25 @@ def has_commits_since_tag(tag: str, path: str) -> bool:
846854
return bool(output)
847855

848856

857+
def _source_changed_since_last_release(package: Package) -> bool:
858+
"""
859+
True when the package has any commits since its last release tag. A
860+
never-released package (no tag) counts as changed. Gates the
861+
``allow_empty_changelog`` path so a package with no changelog entries
862+
releases only when something actually changed since it was last released.
863+
864+
Uses the same commit-based check as ``check_dependency_freshness`` — a
865+
package's release bookkeeping is committed *at* its release tag, not after
866+
it, so it never falls in the ``tag..HEAD`` window. Sharing the check keeps
867+
the two consistent: a package this skips is exactly one freshness will not
868+
flag as stale.
869+
"""
870+
tag = find_last_release_tag(package)
871+
if tag is None:
872+
return True
873+
return has_commits_since_tag(tag, package.path)
874+
875+
849876
def check_dependency_freshness(tag_infos: List[TagInfo], all_packages: List[Package]) -> None:
850877
"""
851878
Hard-fails when a package being released depends on a sibling package

0 commit comments

Comments
 (0)