Skip to content

Conversation

@kanterov
Copy link
Collaborator

@kanterov kanterov commented Aug 8, 2025

Changes

Python code generation doesn't remove deprecated fields anymore unless they were deprecated during Private Preview. A few fields are manually excluded because they have been deprecated for many years and have never functioned.

Remove ForceNotDeprecated annotation because it isn't needed anymore.

Why

During updates, removing deprecated fields immediately can be surprising because there is no prior notice. There are also bundles that rely on the usage of deprecated fields.

Tests

By looking at diffs in the generated code

@@ -1,5 +1,12 @@
package annotation

type PythonKeepDeprecated string
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

qq - is there a limitation in this schema that prevents use of boolean here? (I'm not familiar with this code, so just asking).

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@denik for booleans, we will have to use a boolean pointer to have 3 states: nil (unset), false, and true. I think enums are cleaner for that.

@kanterov kanterov force-pushed the python-keep-deprecated branch from df62309 to a21573d Compare August 22, 2025 08:06
@kanterov kanterov temporarily deployed to test-trigger-is August 22, 2025 08:06 — with GitHub Actions Inactive
@eng-dev-ecosystem-bot
Copy link
Collaborator

eng-dev-ecosystem-bot commented Aug 22, 2025

Run: 17323263361

Env ✅​pass 🙈​skip
✅​ aws linux 308 504
✅​ aws windows 309 503
✅​ aws-ucws linux 421 401
✅​ aws-ucws windows 422 400
✅​ azure linux 308 503
✅​ azure windows 309 502
✅​ azure-ucws linux 421 400
✅​ azure-ucws windows 422 399
✅​ gcp linux 307 505
✅​ gcp windows 308 504

@kanterov kanterov temporarily deployed to test-trigger-is August 22, 2025 10:49 — with GitHub Actions Inactive
@kanterov kanterov temporarily deployed to test-trigger-is August 29, 2025 08:51 — with GitHub Actions Inactive
@kanterov kanterov force-pushed the python-keep-deprecated branch from 09649c4 to 2ad16b3 Compare August 29, 2025 09:14
@kanterov kanterov temporarily deployed to test-trigger-is August 29, 2025 09:14 — with GitHub Actions Inactive
@kanterov kanterov force-pushed the python-keep-deprecated branch from 2ad16b3 to 20e1856 Compare August 29, 2025 09:20
@kanterov kanterov temporarily deployed to test-trigger-is August 29, 2025 09:20 — with GitHub Actions Inactive
@kanterov kanterov temporarily deployed to test-trigger-is August 29, 2025 12:01 — with GitHub Actions Inactive
@kanterov kanterov temporarily deployed to test-trigger-is August 29, 2025 12:02 — with GitHub Actions Inactive
@kanterov
Copy link
Collaborator Author

@pietern @denik updated the code following our discussion. If we exclude deprecated private fields, there are only a few examples manually excluded that shouldn't make it into SDK v1.

@kanterov kanterov requested a review from denik August 29, 2025 12:59
@kanterov kanterov changed the title [Python] Keep newly deprecated fields in Python code [Python] Keep deprecated fields in Python code Sep 1, 2025
"""
Remove fields that were deprecated during Private Preview.
"""

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you have examples of these?

They should rather be removed from the spec entirely.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, there are many of them. Should we remove them from the JSON schema altogether? For example, in jobs.TriggerSettings:

                    "table": {
                      "description": "Old table trigger settings name. Deprecated in favor of `table_update`.",
                      "$ref": "#/$defs/github.com/databricks/databricks-sdk-go/service/jobs.TableUpdateTriggerConfiguration",
                      "x-databricks-preview": "PRIVATE",
                      "deprecationMessage": "This field is deprecated",
                      "doNotSuggest": true,
                      "deprecated": true
                    },
                    "table_update": {
                      "$ref": "#/$defs/github.com/databricks/databricks-sdk-go/service/jobs.TableUpdateTriggerConfiguration",
                      "x-databricks-preview": "PRIVATE",
                      "doNotSuggest": true
                    }

I think following the principle, we should remove them from SDK v1

@kanterov kanterov added this pull request to the merge queue Sep 2, 2025
Merged via the queue into main with commit e640ffd Sep 2, 2025
19 checks passed
@kanterov kanterov deleted the python-keep-deprecated branch September 2, 2025 08:06
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.

5 participants