Skip to content

Commit

Permalink
Remove impersonation lifetime. (#882)
Browse files Browse the repository at this point in the history
* Remove impersonation lifetime.

Per #769 , we shouldn't
need to set the lifetime of an impersonated token. In some edge cases,
attempting to set it to the job execution timeout (> 300 seconds) can
result in authentication failures, even though the job will complete
successfully and authentication creds will be correctly refreshed.

* Changie data.

---------

Co-authored-by: Doug Beatty <44704949+dbeatty10@users.noreply.github.com>
Co-authored-by: Mike Alfare <13974384+mikealfare@users.noreply.github.com>
  • Loading branch information
3 people authored Oct 11, 2023
1 parent 593752f commit 2d5c5a5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
6 changes: 6 additions & 0 deletions .changes/unreleased/Fixes-20230817-095527.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
kind: Fixes
body: Avoid setting lifetime on impersonation tokens.
time: 2023-08-17T09:55:27.333914673-04:00
custom:
Author: cmc333333
Issue: "769"
1 change: 0 additions & 1 deletion dbt/adapters/bigquery/connections.py
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,6 @@ def get_impersonated_credentials(cls, profile_credentials):
source_credentials=source_credentials,
target_principal=profile_credentials.impersonate_service_account,
target_scopes=list(profile_credentials.scopes),
lifetime=(profile_credentials.job_execution_timeout_seconds or 300),
)

@classmethod
Expand Down

0 comments on commit 2d5c5a5

Please sign in to comment.