Skip to content

Conversation

alexott
Copy link
Contributor

@alexott alexott commented Jul 24, 2025

With introduction of support for multiple Git credentials the error message did change a bit, so the force option may not work in all cases.

Resolves #4871

Changes

Tests

  • make test run locally
  • relevant change in docs/ folder
  • covered with integration tests in internal/acceptance
  • using Go SDK
  • using TF Plugin Framework
  • has entry in NEXT_CHANGELOG.md file

With introduction of support for multiple Git credentials the error message did change a
bit, so the `force` option may not work in all cases.

Resolves #4871
@alexott alexott requested review from a team as code owners July 24, 2025 06:37
@alexott alexott requested review from parthban-db and removed request for a team July 24, 2025 06:37
@alexott alexott temporarily deployed to test-trigger-is July 24, 2025 06:37 — with GitHub Actions Inactive
@alexott alexott temporarily deployed to test-trigger-is July 24, 2025 06:38 — with GitHub Actions Inactive
@alexott alexott requested a review from renaudhartert-db July 24, 2025 06:44
@alexott alexott temporarily deployed to test-trigger-is July 24, 2025 12:14 — with GitHub Actions Inactive
@alexott alexott requested a review from renaudhartert-db July 24, 2025 12:15
@alexott alexott temporarily deployed to test-trigger-is July 24, 2025 12:15 — with GitHub Actions Inactive
func isOnlyOneGitCredentialError(err error) bool {
errStr := err.Error()
return errors.Is(err, apierr.ErrResourceConflict) ||
(strings.Contains(errStr, "Only one Git credential is supported ") && strings.Contains(errStr, " at this time"))
Copy link
Contributor

Choose a reason for hiding this comment

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

this is the old error message. Are you intending to parse the new one for SPs + multiple git creds? https://sourcegraph.prod.databricks-corp.com/databricks-eng/universe/-/blob/projects/main/scala/credentials/messages/GitCredentialsMessages.scala?L10

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The main question here is - can we rely only on HTTP 409, or do we still need to rely on error messages?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The case for single credential for SP is handled now via errors.Is(err, apierr.ErrResourceConflict)

Co-authored-by: Grant Eaton <101603396+GrantIsEaton@users.noreply.github.com>
@alexott alexott requested a review from tanmay-db July 28, 2025 10:54
@alexott alexott temporarily deployed to test-trigger-is July 30, 2025 16:23 — with GitHub Actions Inactive
@alexott alexott temporarily deployed to test-trigger-is July 30, 2025 16:24 — with GitHub Actions Inactive
@alexott alexott temporarily deployed to test-trigger-is July 30, 2025 16:32 — with GitHub Actions Inactive
Copy link

If integration tests don't run automatically, an authorized user can run them manually by following the instructions below:

Trigger:
go/deco-tests-run/terraform

Inputs:

  • PR number: 4873
  • Commit SHA: 5ccbf9c3da3b1598701703a0817fd92296c48426

Checks will be approved automatically on success.

@alexott alexott temporarily deployed to test-trigger-is July 30, 2025 16:33 — with GitHub Actions Inactive
@rauchy rauchy added this pull request to the merge queue Aug 5, 2025
Merged via the queue into main with commit 3bcbda3 Aug 5, 2025
12 checks passed
@rauchy rauchy deleted the issue-4871 branch August 5, 2025 07:51
deco-sdk-tagging bot added a commit that referenced this pull request Aug 6, 2025
## Release v1.86.0

### Breaking Changes

* Do not set `run_as from run_as_user_name in DLT pipelines. This fixes an issue where the value for run_as was unintentionally cached in the terraform state. More details and the workaround are specified in the PR: ([#4886](#4886))

### New Features and Improvements

* Don't redeploy `databricks_sql_table` for tables with struct subcolumns ([#4001](#4001)).
* Added ability to add `comment` when defining a new `databricks_share` ([#4802](#4802))
* Added output attribute `endpoint_url` in `databricks_model_serving` ([#4877](#4877)).
* Deprecate `egg` library type in `databricks_cluster`, `databricks_job`, and `databricks_library` ([#4881](#4881)).
* Support `databricks_service_principal_secret` on workspace level ([#4896](#4896)).
* Added resources and data sources for `databricks_clean_room_asset`, `databricks_clean_room_auto_approval_rule` and `databricks_clean_room_asset_revisions_clean_room_asset` ([#4907](#4907)).

### Bug Fixes

* Corrected accidentally removed `SpID` field from `databricks_service_principal` ([#4868](#4868)).
* Corrected optional fields in `databricks_mws_ncc_private_endpoint_rule`([#4856](#4856)).
* Fix handling of `force` option in `databricks_git_credential` ([#4873](#4873)).
* Restricted create or replace statement to managed tables in `databricks_sql_table`([#4874](#4874)).
* Mitigate issue due to internal caching in `databricks_secret_acl` by retrying until ACL are applied with the right permission ([#4885](#4885)).
* Fix schema mismatch bug in `databricks_functions` data source ([#4902](#4902)).
* Set suppressDiff on string_shared_as in the Legacy databricks_share Resource ([#4904](#4904)).

### Documentation

* Updated `share` documentation to be more in line with Terraform styling ([#4802](#4802))
* Refreshed `databricks_job` documentation ([#4861](#4861)).
* Document `environment` block in `databricks_pipeline` ([#4878](#4878)).
* Updated documentation for `databricks_disable_legacy_dbfs_setting` resource ([#4870](#4870)).
* Add deprecation notice to `databricks_dbfs_file` and `databricks_mount` ([#4876](#4876))
* Updated documentation for `databricks_disable_legacy_features_setting` resource ([#4884](#4884)).
* Improve docs for `databricks_compliance_security_profile_setting` ([#4880](#4880)).
* Improve instructions for the Terraform Exporter ([#4892](#4892)).
* Improve documentation for service principal data sources ([#4900](#4900)).
* Add warning about disabling legacy features and default catalog ([#4905](#4905)).
* Improve documentation for grants resources ([#4906](#4906))

### Exporter

* Added support for exporting of workspaces and related resources ([#4899](#4899)).

### Internal Changes

* Promote Plugin Framework Share Resource to Production ([#4846](#4846)).
* Update Go SDK to v0.79.0 ([#4907](#4907)).
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.

[ISSUE] Issue with databricks_git_credential resource
4 participants