-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Add skip_wait_on_job_termination
option for dataflow job resources
#10728
Conversation
@ScottSuarez Happy new year! Did you have any thoughts on this one? |
I think I understand the use case but could you elaborate or go into more detail on your change? |
@ScottSuarez #10559 goes into a lot more detail; the 5s summary is "sometimes draining streaming dataflow jobs takes a ridiculously long time" -- minutes to hours depending on what sort of internal windowing/watermark strategy your job is using. This means that potentially your terraform workspace is locked for that entire time while waiting for the job to drain. With this in place, operators will have the option of waiting only until the job reaches the DRAINING state before moving on. Obviously this has the caveat that if you try to create a replacement job with the same name before the job actually exits it will fail, hence the digression about random_id in the doc examples. |
@rileykarson happy new year! Thoughts on this? |
@ScottSuarez @rileykarson nudge? If this isn't an approach to #10559 that you like, please let me know. |
taking over review here. I'll give this a look over soon |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you also add a test case to the testsuite for this resource and ensure it passes
if !ok { | ||
if d.Get("skip_wait_on_job_termination").(bool) { | ||
_, ok = dataflowTerminatingStatesMap[d.Get("state").(string)] | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This logic is repeated several times. Can you extrapolate this to a function
func shouldStopDataflowJobDeleteQuery(state string, skipWait bool) bool {
_, stopQuery := dataflowTerminalStatesMap[state]
if !stopQuery && skipWait {
_, stopQuery = dataflowTerminatingStatesMap[d.Get("state").(string)]
}
return stopQuery
}
All reasonable requests! I'll try to get it sorted out both here and in the beta-provider PR on monday or tuesday. |
Can you make the changes against the upstream repository https://github.com/GoogleCloudPlatform/magic-modules We use this to generate the two versions of the provider. Tag me on the PR when you open it |
continued in GoogleCloudPlatform/magic-modules#5844 |
I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. |
This addresses #10559
See also hashicorp/terraform-provider-google-beta#3868