-
Notifications
You must be signed in to change notification settings - Fork 20
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
Reproducible builds with spring boot: Different image names result in different image IDs #37
Comments
By removing timestamp from build info file. This is helpful for git ops, because we using the image's repo digest, only changes to the code trigger a change in the GitOps repo. Right now, there still is this issue: https://github.com/paketo-buildpacks/builder/issues/45
@schnatterer My gut tells me that this is an issue with the Maven plugin in what it passes to the |
@schnatterer What versions of the Spring Boot maven plugin were you using before (when this used to work as expected) and after (when you started seeing the issue)? |
@scottfrederick same Spring Boot maven plugin version, only the builder images are different. |
Nope, it's on us. Go is enumerating files non-deterministically (sound familiar Boot team? 😜) and who the hell knows why the image name would be the trigger for this. Look for fix issues. |
Another part of the solution: pavlo-v-chernykh/keystore-go#23 |
Thank you all for your support. I just recognized that I forgot to add the repo digest of the builder image from august (the one that used to work) in the issue description 🙈 I added it to the original question. And here's the whole thing again as one script for easier reproduction:
This generates the following output
|
Thanks for the update @schnatterer. We’ve identified the problems, and while it’ll take a little while to get it all through the system (particularly the external contribution), I’ve already verified that we’re making reproducible images with the changes. |
Thanks very much for the fixes!
|
@schnatterer I’ve now done the releases and while I haven’t verified it directly, I believe |
Thanks @nebhale. BTW are the tags like
|
@schnatterer I guess it depends on trust really. We don't ever overwrite tags, but Docker doesn't actively prevent (or notify when it does happen) like Git does. So if you trust us, tag names are a much easier way for us to describe when changes are propagated. But if you don't trust us, then hashes are the only true truth in registries. We're sympathetic to both views which is why our release notes include both. |
@nebhale thanks for elaborating. |
Preface
This issue is about building spring boot images but I'm not sure which build pack actually causes my issue, so I'm posting it here in the builder. Please move this issue, if it fits better somewhere else.
Actual issue
Here's an example:
So my workaround would be to use the same image name for an application on each build. But this has a downside: When building multiple branches of the same application on the same machine (e.g. CI server) at the same time, they might overwrite the image name resulting in the wrong images being pushed.
Also
imageName
AKA docker tag is only a tag. One image can have multiple tags. The image is uniquely identified by it's content addressable ID, not by its tags. So for me it's unexpected that the image tag changes the ID of the imageAny ideas which change (between august to november) caused this change in behavior?
The text was updated successfully, but these errors were encountered: