Skip to content
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

Operation.PollUntilCompleted duplicates version header #3029

Closed
jskeet opened this issue Apr 18, 2019 · 0 comments · Fixed by #3030
Closed

Operation.PollUntilCompleted duplicates version header #3029

jskeet opened this issue Apr 18, 2019 · 0 comments · Fixed by #3030
Assignees
Labels
priority: p2 Moderately-important priority. Fix may not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.

Comments

@jskeet
Copy link
Collaborator

jskeet commented Apr 18, 2019

We provide a convenience method on Operation<TResult, TMetadata> to automatically poll the operation until it has completed. That method takes a CallSettings as normal, but it has to take account of things in a slightly different way. It needs the effective call settings for GetOperation so it can apply the earlier of "per method call deadline" or "overall deadline" (like an internal retry does) - so we have a special method in OperationsClient of GetEffectiveCallSettingsForGetOperation(CallSettings).

The polling code uses this to obtain a CallSettings, but then passes that to the normal GetOperation method (indirectly), which merges it with the default settings. That means the header mutation action happens twice :( We effectively want to say "use these exact call settings, don't merge them with anything". I think.

@jskeet jskeet added type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. priority: p2 Moderately-important priority. Fix may not be included in next release. labels Apr 18, 2019
@jskeet jskeet self-assigned this Apr 18, 2019
jskeet added a commit to jskeet/google-cloud-dotnet that referenced this issue Apr 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: p2 Moderately-important priority. Fix may not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant