Skip to content

Add DATABRICKS_USER_AGENT_EXTRA#3520

Merged
nkvuong merged 1 commit intodatabricks:mainfrom
kanterov:user-agent-extra
May 1, 2024
Merged

Add DATABRICKS_USER_AGENT_EXTRA#3520
nkvuong merged 1 commit intodatabricks:mainfrom
kanterov:user-agent-extra

Conversation

@kanterov
Copy link
Copy Markdown
Contributor

Changes

Support DATABRICKS_USER_AGENT_EXTRA environment variable.

It contains a list of products to add as extras to the user agent header. Product strings must follow RFC 9110, contain version numbers, and can't contain comments. E.g:

DATABRICKS_USER_AGENT_EXTRA="databricks-cli/0.1.2 my-project/0.0.1"

Tests

I added unit tests

  • make test run locally
  • relevant change in docs/ folder
  • covered with integration tests in internal/acceptance
  • relevant acceptance tests are passing
  • using Go SDK

@kanterov kanterov requested review from a team as code owners April 29, 2024 08:29
@kanterov kanterov requested review from mgyucht and tanmay-db and removed request for a team April 29, 2024 08:29
Copy link
Copy Markdown
Contributor

@alexott alexott left a comment

Choose a reason for hiding this comment

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

lgtm

@alexott
Copy link
Copy Markdown
Contributor

alexott commented Apr 29, 2024

The only question - should we document it or not in the corresponding section of the docs?

@kanterov
Copy link
Copy Markdown
Contributor Author

@alexott Good question. I don't have a strong opinion about that. One of the reasons why we need that is to propagate additional user agents from DABs. Let's see if anyone has an opinion on that.

@mgyucht
Copy link
Copy Markdown
Contributor

mgyucht commented May 1, 2024

This is mainly a feature for people using our TF provider as part of a separate product rather than TF directly. As such, we probably are alright not adding it to docs initially, since it won't be relevant to 99% of our users.

@mgyucht mgyucht added this pull request to the merge queue May 1, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to no response for status checks May 1, 2024
@nkvuong nkvuong added this pull request to the merge queue May 1, 2024
Merged via the queue into databricks:main with commit e3cb8d1 May 1, 2024
mgyucht added a commit that referenced this pull request May 3, 2024
### New Features and Improvements
* Allow changes to `display_name` for `databricks_service_principal` ([#3523](#3523)).
* Modify `databricks_repo` to support Git folders in the workspace ([#3447](#3447)).
* Retry requests in the Databricks Go SDK until context timeout ([#3537](#3537)).
* Set ForceSendFields for boolean/integer values explicitly set to false/0 ([#3385](#3385)).

### Bug fixes
* Added `ConflictsWith` to legacy tasks in `databricks_job` to avoid errors when job parameters are used ([#3500](#3500)).
* Fixed spn secret permanent diff ([#3525](#3525)).
* Introduced `common.NoClientData` helper function and use it in `databricks_aws_crossaccount_policy` data source to allow its use with workspace- or account-level providers ([#3508](#3508)).
* Set `id` attribute of `databricks_metastore` data source ([#3503](#3503)).

### Documentation Changes
* Added documentation for compute options for tasks in `databricks_job` resource ([#3504](#3504)).
* Added warning about depends_on order ([#3489](#3489)).
* Fixed various doc typos ([#3512](#3512)).
* Fixed `databricks_current_metastore` data source names in docs examples ([#3515](#3515)).
* Improved Job documentation structure ([#3511](#3511)).
* Removed confusing mention of cloud types for `databricks_clusters` and `databricks_sql_warehouses` data sources ([#3518](#3518)).

### Exporter
* Added UC support for DLT pipelines ([#3494](#3494)).
* Ignored instance pools with the empty name ([#3522](#3522)).

### Internal Changes
* Added DATABRICKS_USER_AGENT_EXTRA ([#3520](#3520)).
* Adjusted list of supported platforms in `godownloader-databricks-provider.sh` ([#3527](#3527)).
* Switched to Go SDK for `databricks_directory` resource and data source ([#3509](#3509)).
* Fixed codecov for repository ([#3530](#3530)).

Dependency updates:

 * Bump databricks-sdk-go to v0.40.0 ([#3534](#3534)).
@mgyucht mgyucht mentioned this pull request May 3, 2024
github-merge-queue bot pushed a commit that referenced this pull request May 3, 2024
* Release v1.42.0

### New Features and Improvements
* Allow changes to `display_name` for `databricks_service_principal` ([#3523](#3523)).
* Modify `databricks_repo` to support Git folders in the workspace ([#3447](#3447)).
* Retry requests in the Databricks Go SDK until context timeout ([#3537](#3537)).
* Set ForceSendFields for boolean/integer values explicitly set to false/0 ([#3385](#3385)).

### Bug fixes
* Added `ConflictsWith` to legacy tasks in `databricks_job` to avoid errors when job parameters are used ([#3500](#3500)).
* Fixed spn secret permanent diff ([#3525](#3525)).
* Introduced `common.NoClientData` helper function and use it in `databricks_aws_crossaccount_policy` data source to allow its use with workspace- or account-level providers ([#3508](#3508)).
* Set `id` attribute of `databricks_metastore` data source ([#3503](#3503)).

### Documentation Changes
* Added documentation for compute options for tasks in `databricks_job` resource ([#3504](#3504)).
* Added warning about depends_on order ([#3489](#3489)).
* Fixed various doc typos ([#3512](#3512)).
* Fixed `databricks_current_metastore` data source names in docs examples ([#3515](#3515)).
* Improved Job documentation structure ([#3511](#3511)).
* Removed confusing mention of cloud types for `databricks_clusters` and `databricks_sql_warehouses` data sources ([#3518](#3518)).

### Exporter
* Added UC support for DLT pipelines ([#3494](#3494)).
* Ignored instance pools with the empty name ([#3522](#3522)).

### Internal Changes
* Added DATABRICKS_USER_AGENT_EXTRA ([#3520](#3520)).
* Adjusted list of supported platforms in `godownloader-databricks-provider.sh` ([#3527](#3527)).
* Switched to Go SDK for `databricks_directory` resource and data source ([#3509](#3509)).
* Fixed codecov for repository ([#3530](#3530)).

Dependency updates:

 * Bump databricks-sdk-go to v0.40.0 ([#3534](#3534)).

* Changelog
github-merge-queue bot pushed a commit to databricks/cli that referenced this pull request Jul 1, 2024
## Changes
Register user agent product following RFC 9110.

See
databricks/terraform-provider-databricks#3520
for Terraform change.

## Tests
Unit tests
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.

4 participants