Skip to content

Minimize API requests by skipping to check a given image ID #246

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

Conversation

timoreimann
Copy link
Contributor

What this PR does / why we need it:
Save on API requests and stop querying for the image ID from the DO API if the numeric ID is already given: a failure to reference the image would show up during the droplet create request and lead to the same backoff that we run into today.

Special notes for your reviewer:
Also refactor the code and improve error messages slightly as a drive-by change.

Release note:

NONE

@k8s-ci-robot k8s-ci-robot added release-note-none Denotes a PR that doesn't merit a release note. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Mar 16, 2021
@k8s-ci-robot k8s-ci-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Mar 16, 2021
@timoreimann
Copy link
Contributor Author

/assign @prksu

Save on API requests and stop querying for the image ID from the DO API
if the numeric ID is already given: a failure to reference the image
would show up during the droplet create request and lead to the same
backoff that we run into today.

Also refactor the code and improve error messages slightly as a drive-by
change.
@timoreimann timoreimann force-pushed the skip-checking-on-given-image-ids branch from 77dbc95 to 5bd6a23 Compare March 16, 2021 21:38
@k8s-ci-robot k8s-ci-robot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Mar 16, 2021
Copy link
Contributor

@prksu prksu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Mar 17, 2021
@k8s-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: prksu, timoreimann

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot merged commit c19bac6 into kubernetes-sigs:master Mar 17, 2021
@k8s-ci-robot k8s-ci-robot added this to the v0.4 milestone Mar 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. release-note-none Denotes a PR that doesn't merit a release note. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants