-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Build Succeeds, when Reusing an Artifact with Enabled Compression #41930
Conversation
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.
Looks good and it's a nice fix. Thanks!
I added a very minor comment. Let me know if you want to address it or not.
if (nativeConfig.compression().level().isEmpty()) { | ||
log.debug("UPX compression disabled"); | ||
return; | ||
} | ||
if (image.isReused()) { | ||
log.info("Native executable reused: skipping compression"); |
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 entirely sure if we want an info line here. I would demote it to debug given it's really an implementation detail (I mean you for sure don't expect things to be compressed twice if you reuse an executable).
The why is that we are trying hard to avoid having a lot of log lines so that people don't miss anything important.
Do you agree? (Don't hesitate to push back if you don't) If so, either push and squash or I'll be happy to do it if you are not comfortable with git yet.
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.
This sounds good to me.
Done.
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.
Let's wait for CI to complete and merge.
Thanks for handling this one!
Status for workflow
|
Merged, thanks a lot! |
Kudos @gcw-it for getting this to work! |
Fix #41373
The
NativeImageBuildItem
tracks now, if the executable was created or reused.The
UpxCompressionBuildStep
skips compression, when the executable is reused.Any change to the compression settings between builds, while reusing an existing artifact, will have no effect.