-
Notifications
You must be signed in to change notification settings - Fork 54
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
Add container resolver for otk: otk-resolve-containers (COMPOSER-2293) #936
Add container resolver for otk: otk-resolve-containers (COMPOSER-2293) #936
Conversation
1ff89fe
to
632ee73
Compare
632ee73
to
9f5dc46
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Going to leave the same comment as on #935: what about the const
. We can resolve both in one go there. Otherwise very nice.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! This looks nice, ideally we would apply the outcome of the const
discusison here and there are some ideas/suggestions inline for your considerations, mostly about spelling out the inputs/outputs slightly more explicitly
9f5dc46
to
f767494
Compare
Done! Moved output under |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you! This is nice and I really like the detail that pkg/containers/spec.go:Spec is not directly exposed as we have now more control.
There are some testing nitpicks/suggestions inline but as they only affect testing (which is already comprehensive) and are very opinionated (not neccessarily in a good way, sorry for that!) - the testing is very nice and comprehensive (please don't get me wrong here). If you like the ideas I am happy to do a followup, if you don't I will just be silent :)
The only thing that we might consider is the coment/question about LocalStorage
(but given that most of the times I think it will be false/not visible(?) it should cause no harm even if we merge as is).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Needs the other comments resolved, awesome.
f767494
to
62cea3c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you
The resolver is a thin wrapper around the container.Resolver. It can handle multiple containers for the same architecture in one call.
Move the toy implementation of a container registry out of the container_test package and into internal/testregistry so it can be reused across subpackages of the repository.
Run the same tests with the architecture set to ppc64le.
Move the root layer const to the test registry so it can be reused for testing. Add a comment describing what it represents and how it can be used.
Add an extra test that generates a raw json string as input and checks the raw json string from the output. This test resolves only one container to make the construction of the output less tedious and avoid the need to predict and verify the order of the results.
62cea3c
to
31d94be
Compare
New
cmd
for resolving containers for otk.The resolver is a thin wrapper around the container.Resolver. It can handle multiple containers for the same architecture in one call.