Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] GitHub OIDC publishing #386

Merged
merged 3 commits into from
Oct 5, 2023
Merged

[WIP] GitHub OIDC publishing #386

merged 3 commits into from
Oct 5, 2023

Conversation

mgyucht
Copy link
Contributor

@mgyucht mgyucht commented Oct 5, 2023

Changes

By using OIDC publishing, we can remove unnecessary secrets from our repository, reducing risk of secrets being leaked as well as minimizing work needed to rotate them.

This PR also adds a test release action that releases this project to the test PyPI index at test.pypi.org.

Separately, I've configured the test PyPI index for this package to allow OIDC with the release-test environment. After confirming, I'll do the same with the prod PyPI index with the release environment.

Tests

Can't test from this PR. Once merged, I'll run the test workflow and make a second PR with any bugfixes & the updated release workflow.

@codecov-commenter
Copy link

codecov-commenter commented Oct 5, 2023

Codecov Report

Attention: 1575 lines in your changes are missing coverage. Please review.

Files Coverage Δ
databricks/sdk/azure.py 100.00% <100.00%> (ø)
databricks/sdk/mixins/files.py 74.52% <100.00%> (+0.26%) ⬆️
databricks/sdk/retries.py 100.00% <100.00%> (ø)
databricks/sdk/service/catalog.py 50.23% <ø> (-2.84%) ⬇️
databricks/sdk/service/compute.py 50.92% <ø> (-2.93%) ⬇️
databricks/sdk/service/iam.py 41.85% <ø> (-6.36%) ⬇️
databricks/sdk/service/ml.py 47.36% <ø> (-2.47%) ⬇️
databricks/sdk/service/sql.py 52.75% <ø> (-3.27%) ⬇️
databricks/sdk/version.py 100.00% <100.00%> (ø)
databricks/sdk/__init__.py 74.21% <90.90%> (+0.88%) ⬆️
... and 13 more

... and 2 files with indirect coverage changes

📢 Thoughts on this report? Let us know!.

@mgyucht mgyucht requested a review from tanmay-db October 5, 2023 09:23
@mgyucht mgyucht added this pull request to the merge queue Oct 5, 2023
Merged via the queue into main with commit 16f7bc0 Oct 5, 2023
@mgyucht mgyucht deleted the github-oidc-publishing branch October 5, 2023 10:18
@mgyucht mgyucht mentioned this pull request Oct 5, 2023
1 task
github-merge-queue bot pushed a commit that referenced this pull request Oct 5, 2023
## Changes
In #386, I added a
workflow for testing OIDC auth to TestPyPI. This failed due to an
existing package:
https://github.com/databricks/databricks-sdk-py/actions/runs/6418567925/job/17426619417.

This PR fixes that issue by adding `skip-existing: true` and at the same
time changes the production publishing pipeline to use OIDC as well.

## Tests
- [x] Updated test pipeline succeeds:
https://github.com/databricks/databricks-sdk-py/actions/runs/6418660406/job/17426893715
pietern added a commit that referenced this pull request Oct 12, 2023
* Added Python 3.12 to project classifiers ([#381](#381)).
* Fix serialization issues for generated resources ([#382](#382)).
* Fix select spark version in staging ([#388](#388)).
* Adjust token expiry window to 40 seconds because of Azure ([#392](#392)).
* Add retries on `RPC token bucket limit has been exceeded` ([#395](#395)).
* Regenerate to fix template drift ([#398](#398)).
* Update OpenAPI spec to 12 Oct 2023 ([#399](#399)).

Internal:

* GitHub OIDC publishing ([#386](#386)).
* Move Release Pipeline to OIDC ([#387](#387)).

API Changes:

 * Changed `download()` method for [a.billable_usage](https://databricks-sdk-py.readthedocs.io/en/latest/account/billable_usage.html) account-level service to start returning `databricks.sdk.service.billing.DownloadResponse` dataclass.
 * Added `databricks.sdk.service.billing.DownloadResponse` dataclass.
 * Changed `delete()` method for [a.account_storage_credentials](https://databricks-sdk-py.readthedocs.io/en/latest/account/account_storage_credentials.html) account-level service with new required argument order.
 * Changed `get()` method for [a.account_storage_credentials](https://databricks-sdk-py.readthedocs.io/en/latest/account/account_storage_credentials.html) account-level service with new required argument order.
 * Changed `update()` method for [a.account_storage_credentials](https://databricks-sdk-py.readthedocs.io/en/latest/account/account_storage_credentials.html) account-level service with new required argument order.
 * Added `get_bindings()` method for [w.workspace_bindings](https://databricks-sdk-py.readthedocs.io/en/latest/workspace/workspace_bindings.html) workspace-level service.
 * Added `update_bindings()` method for [w.workspace_bindings](https://databricks-sdk-py.readthedocs.io/en/latest/workspace/workspace_bindings.html) workspace-level service.
 * Removed `name` field for `databricks.sdk.service.catalog.AccountsUpdateStorageCredential`.
 * Added `storage_credential_name` field for `databricks.sdk.service.catalog.AccountsUpdateStorageCredential`.
 * Removed `name` field for `databricks.sdk.service.catalog.DeleteAccountStorageCredentialRequest`.
 * Added `storage_credential_name` field for `databricks.sdk.service.catalog.DeleteAccountStorageCredentialRequest`.
 * Removed `name` field for `databricks.sdk.service.catalog.GetAccountStorageCredentialRequest`.
 * Added `storage_credential_name` field for `databricks.sdk.service.catalog.GetAccountStorageCredentialRequest`.
 * Added `owner` field for `databricks.sdk.service.catalog.UpdateConnection`.
 * Added `databricks.sdk.service.catalog.GetBindingsRequest` dataclass.
 * Added `databricks.sdk.service.catalog.UpdateWorkspaceBindingsParameters` dataclass.
 * Added `databricks.sdk.service.catalog.WorkspaceBinding` dataclass.
 * Added `databricks.sdk.service.catalog.WorkspaceBindingBindingType` dataclass.
 * Added `databricks.sdk.service.catalog.WorkspaceBindingsResponse` dataclass.
 * Added `spec` field for `databricks.sdk.service.compute.ClusterDetails`.
 * Added `apply_policy_default_values` field for `databricks.sdk.service.compute.ClusterSpec`.
 * Removed `aws_attributes` field for `databricks.sdk.service.compute.EditInstancePool`.
 * Removed `azure_attributes` field for `databricks.sdk.service.compute.EditInstancePool`.
 * Removed `disk_spec` field for `databricks.sdk.service.compute.EditInstancePool`.
 * Removed `enable_elastic_disk` field for `databricks.sdk.service.compute.EditInstancePool`.
 * Removed `gcp_attributes` field for `databricks.sdk.service.compute.EditInstancePool`.
 * Removed `preloaded_docker_images` field for `databricks.sdk.service.compute.EditInstancePool`.
 * Removed `preloaded_spark_versions` field for `databricks.sdk.service.compute.EditInstancePool`.
 * Added `deployment` field for `databricks.sdk.service.jobs.CreateJob`.
 * Added `ui_state` field for `databricks.sdk.service.jobs.CreateJob`.
 * Added `deployment` field for `databricks.sdk.service.jobs.JobSettings`.
 * Added `ui_state` field for `databricks.sdk.service.jobs.JobSettings`.
 * Removed `condition_task` field for `databricks.sdk.service.jobs.RunOutput`.
 * Added `webhook_notifications` field for `databricks.sdk.service.jobs.Task`.
 * Added `databricks.sdk.service.jobs.CreateJobUiState` dataclass.
 * Added `databricks.sdk.service.jobs.JobDeployment` dataclass.
 * Added `databricks.sdk.service.jobs.JobDeploymentKind` dataclass.
 * Added `databricks.sdk.service.jobs.JobSettingsUiState` dataclass.
 * Added `workload_type` field for `databricks.sdk.service.serving.ServedModelInput`.
 * Added `workload_type` field for `databricks.sdk.service.serving.ServedModelOutput`.
 * Removed [a.account_network_policy](https://databricks-sdk-py.readthedocs.io/en/latest/account/account_network_policy.html) account-level service.
 * Changed `list()` method for [w.ip_access_lists](https://databricks-sdk-py.readthedocs.io/en/latest/workspace/ip_access_lists.html) workspace-level service to return `databricks.sdk.service.settings.ListIpAccessListResponse` dataclass.
 * Removed `databricks.sdk.service.settings.AccountNetworkPolicyMessage` dataclass.
 * Removed `databricks.sdk.service.settings.DeleteAccountNetworkPolicyRequest` dataclass.
 * Removed `databricks.sdk.service.settings.DeleteAccountNetworkPolicyResponse` dataclass.
 * Removed `ip_access_lists` field for `databricks.sdk.service.settings.GetIpAccessListResponse`.
 * Added `ip_access_list` field for `databricks.sdk.service.settings.GetIpAccessListResponse`.
 * Removed `databricks.sdk.service.settings.ReadAccountNetworkPolicyRequest` dataclass.
 * Removed `databricks.sdk.service.settings.UpdateAccountNetworkPolicyRequest` dataclass.
 * Added `databricks.sdk.service.settings.ListIpAccessListResponse` dataclass.

OpenAPI SHA: 493a76554afd3afdd15dc858773d01643f80352a, Date: 2023-10-12
@pietern pietern mentioned this pull request Oct 12, 2023
github-merge-queue bot pushed a commit that referenced this pull request Oct 12, 2023
* Added Python 3.12 to project classifiers
([#381](#381)).
* Fix serialization issues for generated resources
([#382](#382)).
* Fix select spark version in staging
([#388](#388)).
* Adjust token expiry window to 40 seconds because of Azure
([#392](#392)).
* Add retries on `RPC token bucket limit has been exceeded`
([#395](#395)).
* Regenerate to fix template drift
([#398](#398)).
* Update OpenAPI spec to 12 Oct 2023
([#399](#399)).

Internal:

* GitHub OIDC publishing
([#386](#386)).
* Move Release Pipeline to OIDC
([#387](#387)).

API Changes:

* Changed `download()` method for
[a.billable_usage](https://databricks-sdk-py.readthedocs.io/en/latest/account/billable_usage.html)
account-level service to start returning
`databricks.sdk.service.billing.DownloadResponse` dataclass.
 * Added `databricks.sdk.service.billing.DownloadResponse` dataclass.
* Changed `delete()` method for
[a.account_storage_credentials](https://databricks-sdk-py.readthedocs.io/en/latest/account/account_storage_credentials.html)
account-level service with new required argument order.
* Changed `get()` method for
[a.account_storage_credentials](https://databricks-sdk-py.readthedocs.io/en/latest/account/account_storage_credentials.html)
account-level service with new required argument order.
* Changed `update()` method for
[a.account_storage_credentials](https://databricks-sdk-py.readthedocs.io/en/latest/account/account_storage_credentials.html)
account-level service with new required argument order.
* Added `get_bindings()` method for
[w.workspace_bindings](https://databricks-sdk-py.readthedocs.io/en/latest/workspace/workspace_bindings.html)
workspace-level service.
* Added `update_bindings()` method for
[w.workspace_bindings](https://databricks-sdk-py.readthedocs.io/en/latest/workspace/workspace_bindings.html)
workspace-level service.
* Removed `name` field for
`databricks.sdk.service.catalog.AccountsUpdateStorageCredential`.
* Added `storage_credential_name` field for
`databricks.sdk.service.catalog.AccountsUpdateStorageCredential`.
* Removed `name` field for
`databricks.sdk.service.catalog.DeleteAccountStorageCredentialRequest`.
* Added `storage_credential_name` field for
`databricks.sdk.service.catalog.DeleteAccountStorageCredentialRequest`.
* Removed `name` field for
`databricks.sdk.service.catalog.GetAccountStorageCredentialRequest`.
* Added `storage_credential_name` field for
`databricks.sdk.service.catalog.GetAccountStorageCredentialRequest`.
* Added `owner` field for
`databricks.sdk.service.catalog.UpdateConnection`.
 * Added `databricks.sdk.service.catalog.GetBindingsRequest` dataclass.
* Added
`databricks.sdk.service.catalog.UpdateWorkspaceBindingsParameters`
dataclass.
 * Added `databricks.sdk.service.catalog.WorkspaceBinding` dataclass.
* Added `databricks.sdk.service.catalog.WorkspaceBindingBindingType`
dataclass.
* Added `databricks.sdk.service.catalog.WorkspaceBindingsResponse`
dataclass.
* Added `spec` field for
`databricks.sdk.service.compute.ClusterDetails`.
* Added `apply_policy_default_values` field for
`databricks.sdk.service.compute.ClusterSpec`.
* Removed `aws_attributes` field for
`databricks.sdk.service.compute.EditInstancePool`.
* Removed `azure_attributes` field for
`databricks.sdk.service.compute.EditInstancePool`.
* Removed `disk_spec` field for
`databricks.sdk.service.compute.EditInstancePool`.
* Removed `enable_elastic_disk` field for
`databricks.sdk.service.compute.EditInstancePool`.
* Removed `gcp_attributes` field for
`databricks.sdk.service.compute.EditInstancePool`.
* Removed `preloaded_docker_images` field for
`databricks.sdk.service.compute.EditInstancePool`.
* Removed `preloaded_spark_versions` field for
`databricks.sdk.service.compute.EditInstancePool`.
 * Added `deployment` field for `databricks.sdk.service.jobs.CreateJob`.
 * Added `ui_state` field for `databricks.sdk.service.jobs.CreateJob`.
* Added `deployment` field for
`databricks.sdk.service.jobs.JobSettings`.
 * Added `ui_state` field for `databricks.sdk.service.jobs.JobSettings`.
* Removed `condition_task` field for
`databricks.sdk.service.jobs.RunOutput`.
* Added `webhook_notifications` field for
`databricks.sdk.service.jobs.Task`.
 * Added `databricks.sdk.service.jobs.CreateJobUiState` dataclass.
 * Added `databricks.sdk.service.jobs.JobDeployment` dataclass.
 * Added `databricks.sdk.service.jobs.JobDeploymentKind` dataclass.
 * Added `databricks.sdk.service.jobs.JobSettingsUiState` dataclass.
* Added `workload_type` field for
`databricks.sdk.service.serving.ServedModelInput`.
* Added `workload_type` field for
`databricks.sdk.service.serving.ServedModelOutput`.
* Removed
[a.account_network_policy](https://databricks-sdk-py.readthedocs.io/en/latest/account/account_network_policy.html)
account-level service.
* Changed `list()` method for
[w.ip_access_lists](https://databricks-sdk-py.readthedocs.io/en/latest/workspace/ip_access_lists.html)
workspace-level service to return
`databricks.sdk.service.settings.ListIpAccessListResponse` dataclass.
* Removed `databricks.sdk.service.settings.AccountNetworkPolicyMessage`
dataclass.
* Removed
`databricks.sdk.service.settings.DeleteAccountNetworkPolicyRequest`
dataclass.
* Removed
`databricks.sdk.service.settings.DeleteAccountNetworkPolicyResponse`
dataclass.
* Removed `ip_access_lists` field for
`databricks.sdk.service.settings.GetIpAccessListResponse`.
* Added `ip_access_list` field for
`databricks.sdk.service.settings.GetIpAccessListResponse`.
* Removed
`databricks.sdk.service.settings.ReadAccountNetworkPolicyRequest`
dataclass.
* Removed
`databricks.sdk.service.settings.UpdateAccountNetworkPolicyRequest`
dataclass.
* Added `databricks.sdk.service.settings.ListIpAccessListResponse`
dataclass.

OpenAPI SHA: 493a76554afd3afdd15dc858773d01643f80352a, Date: 2023-10-12
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.

3 participants