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

fix: handle context cancellations during instance refresh #372

Merged
merged 1 commit into from
Nov 9, 2022

Conversation

jault3
Copy link
Contributor

@jault3 jault3 commented Nov 7, 2022

Change Description

Context cancellation was being checked after the immediate retries for errored instance refreshes. This moves the check up a bit further so the background refresh process exits once the context is cancelled.

Checklist

  • Make sure to open an issue as a
    bug/issue
    before writing your code! That way we can discuss the change, evaluate
    designs, and agree on the general idea.
  • Ensure the tests and linter pass
  • Appropriate documentation is updated (if necessary)

Relevant issues:

@jault3 jault3 requested a review from a team November 7, 2022 03:14
@google-cla
Copy link

google-cla bot commented Nov 7, 2022

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

internal/cloudsql/instance.go Outdated Show resolved Hide resolved
@enocom enocom self-requested a review November 7, 2022 16:22
@enocom
Copy link
Member

enocom commented Nov 7, 2022

@jault3 If sign the CLA, we can get to this quickly.

@jault3
Copy link
Contributor Author

jault3 commented Nov 7, 2022

@jault3 If sign the CLA, we can get to this quickly.

👍 apologies for the delay. Trying to track this down on my side. I believe my employer has something set up that I need added to. Will post back once I have it sorted out.

move check for context completion higher up

moved successful refresh handling back after error checking
@jault3
Copy link
Contributor Author

jault3 commented Nov 8, 2022

@jault3 If sign the CLA, we can get to this quickly.

Hey @enocom I believe I have things signed now. Looks like the CLA check is still failing though. Do I need to do anything else? It should be signed by my employer

@enocom
Copy link
Member

enocom commented Nov 8, 2022

You'll have to update the commit to include whatever email you used to sign the CLA, I believe. I forced a re-scan and it's still not happy.

@jault3
Copy link
Contributor Author

jault3 commented Nov 8, 2022

Do the commits have to use the email address of the Authorized Contributors Group? Because I am a member of that group I submitted in that field. And the email I used in my commits (and shown in the CLA output) is the correct one. But its just my email address, not the group address.

@jault3
Copy link
Contributor Author

jault3 commented Nov 9, 2022

I was reading this page and it looks like it mentions that corporate contributors may take a couple days to process. We may be stuck in that period as it was just signed today.

@enocom
Copy link
Member

enocom commented Nov 9, 2022

I'll check my end to see what we can do.

@jault3
Copy link
Contributor Author

jault3 commented Nov 9, 2022

@enocom it is now signed!

@enocom
Copy link
Member

enocom commented Nov 9, 2022

Thanks @jault3!

@enocom enocom merged commit cdb59c7 into GoogleCloudPlatform:main Nov 9, 2022
@jault3 jault3 deleted the refresh-context-cancelled branch November 22, 2022 21:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Context cancellation ignored causing heavy CPU usage
3 participants