-
Notifications
You must be signed in to change notification settings - Fork 161
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
[ADAP-621] [Bug] impersonate_service_account and job_execution_timeout_seconds #769
Comments
Hi @cmc333333, I've just given a quick read to what we're doing with that timeout settings.
But we're also injecting it as lifetime of the impersonated_credentials:
I don't know why we are doing that to be honest. The parameter is not mandatory, and the default value is its max anyway (3600 sec = 1h). Does anything come to mind on your side? So we could just remove the wiring, or replace it with a new parameter - but I'm wondering if that's really necessary since it's already defaulting to its max. |
Hiya @Fleid ! I'll try to give you my understanding of the world and we can see how that matches up.
I think that all points to dbt-bigquery's use of "lifetime" as not quite right. I think the simplest fix would be to stop setting the value. If we really wanted, we could have a separate config, but I don't see a use case -- we're relying on Google's SDK throughout, yeah? |
I'm aligned @cmc333333 |
Will give it a go soonish, @Fleid , thanks! |
Thanks again for raising this and providing all your keen insights @cmc333333 🧠 Are you still interested in putting up a PR for this, by any chance? |
Per dbt-labs#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.
Thanks for the nudge @dbeatty10 ; I need to get a local setup going, but I created a PR and signed the CLA. |
Awesome @cmc333333 ! |
* 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 <[email protected]> Co-authored-by: Mike Alfare <[email protected]>
Is this a new bug in dbt-bigquery?
Current Behavior
When setting
impersonate_service_account
along with a high (>1 hr)job_execution_timeout_seconds
, the BQ API gives us an error:The credentials shouldn't need to live the whole hour+, however, since they can be re-generated whenever making a new BQ call.
Expected Behavior
A high
job_execution_timeout_seconds
would be compatible withimpersonate_service_account
without needing to adjust org policy constraints.Steps To Reproduce
timeout_seconds
rather thanjob_execution_timeout_seconds
to match our actual config)Relevant log output
No response
Environment
Additional Context
We're trying to switch away from
keyfile_json
, where we first specified the three hour limit.The text was updated successfully, but these errors were encountered: