Skip to content

Fail fast when image is specified without tag#101287

Merged
k8s-ci-robot merged 2 commits intokubernetes:masterfrom
soltysh:replace_with_default
Apr 21, 2021
Merged

Fail fast when image is specified without tag#101287
k8s-ci-robot merged 2 commits intokubernetes:masterfrom
soltysh:replace_with_default

Conversation

@soltysh
Copy link
Contributor

@soltysh soltysh commented Apr 20, 2021

What type of PR is this?

/kind bug

What this PR does / why we need it:

Currently when replacing images we assume an image is in the form image:tag but there are cases where this is not true. This PR defaults tag to :latest when not specified.
This PR changes image replace code such that it requires image:tag format.

Special notes for your reviewer:

/assign @smarterclayton

Does this PR introduce a user-facing change?

NONE

@k8s-ci-robot k8s-ci-robot added release-note-none Denotes a PR that doesn't merit a release note. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. kind/bug Categorizes issue or PR as related to a bug. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. do-not-merge/needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. labels Apr 20, 2021
@soltysh
Copy link
Contributor Author

soltysh commented Apr 20, 2021

/sig testing

@k8s-ci-robot k8s-ci-robot added sig/testing Categorizes an issue or PR as relevant to SIG Testing. area/test and removed do-not-merge/needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. labels Apr 20, 2021
@soltysh
Copy link
Contributor Author

soltysh commented Apr 20, 2021

/priority backlog
/triage accepted

@k8s-ci-robot k8s-ci-robot added priority/backlog Higher priority than priority/awaiting-more-evidence. triage/accepted Indicates an issue or PR is ready to be actively worked on. labels Apr 20, 2021
@k8s-ci-robot k8s-ci-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. and removed needs-priority Indicates a PR lacks a `priority/foo` label and requires one. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Apr 20, 2021
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we not just fix this and make the error be fail fast? It seems wierd that we'd allow pull specs without tags anywhere.

@soltysh soltysh force-pushed the replace_with_default branch from 33b7a64 to 431e8df Compare April 20, 2021 19:11
@soltysh soltysh changed the title Default image tag, when not specified Fail fast when image is specified without tag Apr 20, 2021
Copy link
Contributor

Choose a reason for hiding this comment

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

Yay, we caught a bug!

Copy link
Member

Choose a reason for hiding this comment

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

now do we need a test for a test util LOL (kidding)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

lol, I was considering that 😜

@soltysh soltysh force-pushed the replace_with_default branch from 431e8df to 3edabfb Compare April 20, 2021 20:05
@smarterclayton
Copy link
Contributor

/lgtm
/approve

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

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: smarterclayton, soltysh

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

The pull request process is described here

Details 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

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. area/test cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/bug Categorizes issue or PR as related to a bug. lgtm "Looks good to me", indicates that a PR is ready to be merged. priority/backlog Higher priority than priority/awaiting-more-evidence. release-note-none Denotes a PR that doesn't merit a release note. sig/testing Categorizes an issue or PR as relevant to SIG Testing. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. triage/accepted Indicates an issue or PR is ready to be actively worked on.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants