Add methods to provide extra user agent and upstream user agent to sdk config#163
Merged
kartikgupta-db merged 3 commits intomainfrom Jun 14, 2023
Merged
Add methods to provide extra user agent and upstream user agent to sdk config#163kartikgupta-db merged 3 commits intomainfrom
kartikgupta-db merged 3 commits intomainfrom
Conversation
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## main #163 +/- ##
==========================================
+ Coverage 53.27% 53.31% +0.04%
==========================================
Files 30 30
Lines 18178 18194 +16
==========================================
+ Hits 9684 9700 +16
Misses 8494 8494
☔ View full report in Codecov by Sentry. |
nfx
reviewed
Jun 14, 2023
|
|
||
| @property | ||
| def _upstream_user_agent(self) -> str: | ||
| product = os.environ.get('DATABRICKS_SDK_UPSTREAM', None) |
Contributor
There was a problem hiding this comment.
can you also add the relevant Go SDK PR?
Contributor
Author
There was a problem hiding this comment.
Yep. This was a bigger priority because I would like to get dbconnect to start using this asap.
Working on go sdk today.
nfx
approved these changes
Jun 14, 2023
nfx
added a commit
that referenced
this pull request
Jun 15, 2023
* Regenerate from OpenAPI spec ([#176](#176)). * Added improved notebook-native authentication ([#152](#152)). * Added methods to provide extra user agent and upstream user agent to SDK config ([#163](#163)). * Added more missing `Optional` type hints ([#171](#171)). * Add more missing optional fields ([#177](#177)). * Correctly serialize external entities ([#178](#178)). * Correctly serialize external enum values in paths ([#179](#179)). * Mark non-required fields as `Optional` ([#170](#170)). * Synchronize auth permutation tests with Go SDK ([#165](#165)).
nfx
added a commit
that referenced
this pull request
Jun 15, 2023
* Regenerate from OpenAPI spec ([#176](#176)). * Added improved notebook-native authentication ([#152](#152)). * Added methods to provide extra user agent and upstream user agent to SDK config ([#163](#163)). * Added more missing `Optional` type hints ([#171](#171)). * Added more missing optional fields ([#177](#177)). * Correctly serialize external entities ([#178](#178)). * Correctly serialize external enum values in paths ([#179](#179)). * Mark non-required fields as `Optional` ([#170](#170)). * Synchronize auth permutation tests with Go SDK ([#165](#165)). ## Tests - [x] relevant integration tests applied --------- Signed-off-by: Serge Smertin <[email protected]>
github-merge-queue bot
pushed a commit
to databricks/databricks-sdk-go
that referenced
this pull request
Mar 13, 2024
…854) ## Changes This PR ports databricks/databricks-sdk-py#163 to the Go SDK. This enables partners who use the SDK through a tool (like Terraform) to add custom information to the user agent without having to make code changes to the tool. Closes #850. ## Tests Added unit test to verify that the user agent is only updated when both DATABRICKS_SDK_UPSTREAM and DATABRICKS_SDK_UPSTREAM_VERSION are set. Manually ran `examples/slog` to verify that the user agent is correctly updated.
joyaung
pushed a commit
to joyaung/databricks-sdk-py
that referenced
this pull request
Apr 6, 2025
…feature/SFE-3163_Rebuild_Main_Dashboard_v2 Changed naming, added warning notes and reverted to old queries
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes
with_user_agent_extrato allow users to specify extra user agents.DATABRICKS_SDK_UPSTREAMandDATABRICKS_SDK_UPSTREAM_VERSIONto allow products interacting with SDK through env vars to pass their product info.Tests
make testrun locallymake fmtapplied