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

Have --image-refs list all images for multi-arch builds. #761

Merged
merged 3 commits into from
Jul 12, 2022

Conversation

mattmoor
Copy link
Collaborator

This change alters the behavior of --image-refs to also include all of the image references when a multi-architecture build is being performed.

This change alters the behavior of `--image-refs` to also include all of the image references when a multi-architecture build is being performed.
Copy link
Member

@imjasonh imjasonh left a comment

Choose a reason for hiding this comment

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

I bet this will blow up Tekton's built image result, which IIRC was already close enough to the limit to make them scale stuff back. 😭

return nil
}); err != nil {
return nil, err
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

Do we need this to fallthrough to also log the index? Can you add a tests?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

you can't fallthrough in non-expression switch statements, but the walk touches everything.

Looking at tests, if my next meeting is cancelled 🤞

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

... or until then :)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

ok, I tweaked the tests to use images/indices and this has coverage now.

@codecov-commenter
Copy link

codecov-commenter commented Jul 11, 2022

Codecov Report

Merging #761 (c97fc11) into main (bd8cfaa) will increase coverage by 0.05%.
The diff coverage is 58.82%.

@@            Coverage Diff             @@
##             main     #761      +/-   ##
==========================================
+ Coverage   51.24%   51.30%   +0.05%     
==========================================
  Files          44       44              
  Lines        3323     3339      +16     
==========================================
+ Hits         1703     1713      +10     
- Misses       1407     1412       +5     
- Partials      213      214       +1     
Impacted Files Coverage Δ
pkg/publish/recorder.go 52.63% <58.82%> (+7.17%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update bd8cfaa...c97fc11. Read the comment docs.

t.Errorf("buf.String() = %s, wanted %s", got, want)
refs := strings.Split(strings.TrimSpace(buf.String()), "\n")

for _, s := range refs {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is len(refs) what we expect?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

added a check

@mattmoor mattmoor merged commit 8f22858 into ko-build:main Jul 12, 2022
@mattmoor mattmoor deleted the list-all-refs branch July 12, 2022 16:06
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.

4 participants