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
Validate stack during analyze phase #617
Conversation
oh jeez - nevermind . this doesn't address #471 yet - I thought that ticket was about making sure build and run images match..but maybe we do this anyway since it is related? 😬 The |
I put in this fix while working on this. buildpacks/spec#225 |
d630cc3
to
f083d3d
Compare
@micahyoung I would love your assistance on fixing windows tests. I added skips for the 6 tests I would expect to pass. I am building platform specific run images but I was still seeing failures as if the run image wasn't in the registry. Is there something I need to do to be able to push a windows image into the ggcr registry? If you have any thoughts to try out let me know! https://github.com/buildpacks/lifecycle/pull/617/checks?check_run_id=2612523589 |
@jabrown85 Happy to take a look, as I know this is dragging on for ya. I'll see if I can get your current branch passing locally and send you a patch. |
Codecov Report
@@ Coverage Diff @@
## main #617 +/- ##
==========================================
+ Coverage 64.90% 66.52% +1.63%
==========================================
Files 52 60 +8
Lines 3623 3844 +221
==========================================
+ Hits 2351 2557 +206
+ Misses 1023 1020 -3
- Partials 249 267 +18
Flags with carried forward coverage won't be shown. Click here to find out more. |
Did we answer the question of whether stack.toml should be required? |
utils_test.go
Outdated
@@ -145,4 +146,38 @@ func testUtils(t *testing.T, when spec.G, it spec.S) { | |||
} | |||
}) | |||
}) | |||
|
|||
when(".ResolveRunImage", func() { |
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.
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.
If we deleted this .
here, I think it's worth removing the .
in the other when
in this file.
- ReadOrder
- ReadGroup
- WriteTOML
- TruncateSha
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.
Do we want to remove .
? I did it because it was requested, but I also am fine with leaving them and matching the style of the test that already exist. That is why I used the .
in the first place...
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.
I'm not sure. I think this is the only file that is using .
and I'm not sure why.
Is there a reason for it?
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.
🤷 - I've seen this pattern before for denoting public method tests. #Method
or .Method
I am happy to remove them all or match the style of the file
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.
But we're usually testing public methods and I have never seen this style anywhere else, but maybe I'm wrong and I just missed it.
Anyway, my first thought was about removing it but I don't have a strong opinion about it.
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.
Just curious, when do we use .
vs #
? (I've seen "object method" vs "static method" in other languages but I'm not sure what is our convention.) That said I don't have an opinion here.
5ec05dc
to
3fa6b3a
Compare
acceptance/testdata/analyzer/analyze-image/container/cnb/bad-stack.toml
Outdated
Show resolved
Hide resolved
acceptance/testdata/analyzer/analyze-image/container/cnb/local-bionic-stack.toml
Outdated
Show resolved
Hide resolved
acceptance/testdata/analyzer/analyze-image/container/cnb/missing-run-image.toml
Outdated
Show resolved
Hide resolved
This is looking great! The acceptance tests require a certain amount of concentration and navigating around to follow, so I added some suggestions for comments that might make it easier to understand. |
@natalieparellano I'd like to squash everything so I can more easily fix the conflict on |
@jabrown85 go for it! |
27321c7
to
2cfc635
Compare
During analyze, Platform 0.7 and above will validate the build and stack image if the data is available to do so. Addresses: #471 Signed-off-by: Jesse Brown <jabrown85@gmail.com>
2cfc635
to
efa1357
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.
Do we need to add logic for the creator?
Signed-off-by: Jesse Brown <jabrown85@gmail.com>
Signed-off-by: Jesse Brown <jabrown85@gmail.com>
@natalieparellano creator should now be good to go after cc21037 and 55c17a5 |
@@ -64,6 +66,30 @@ func DecodeLabel(image imgutil.Image, label string, v interface{}) error { | |||
return nil | |||
} | |||
|
|||
func ResolveRunImage(stackMD platform.StackMetadata, destinationImageRef string) (string, error) { |
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.
Could we add a docs comment here?
Revert "Merge pull request #617 from buildpacks/jab/validate-stack"
During analyze, Platform 0.7 and above will validate the build and stack image if the data is available to do so.
Addresses Part of: #471
Spec being implemented:
Signed-off-by: Jesse Brown jabrown85@gmail.com