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

Ensure that compressed binary used in Amazon Lambda function if present #27220

Merged
merged 1 commit into from Aug 10, 2022

Conversation

geoand
Copy link
Contributor

@geoand geoand commented Aug 10, 2022

Fixes: #27208

@patriot1burke
Copy link
Contributor

I don't really understand this bug and how this PR fixes it. Can you elaborate a little? Sorry.

@geoand
Copy link
Contributor Author

geoand commented Aug 10, 2022

Sure yeah.

The bug report says that the produced function.zip does not include the compressed native binary (the one produced by the invocation of upx by Quarkus during build item after the native binary has been created), but instead includes the original binary produced by GraalVM.

What this PR does is ensure that the step that produces function.zip is always run after the step that compresses the native binary (the use of Optional here is meant to guard against the case where no compression was performed).

Does that make sense?

@patriot1burke
Copy link
Contributor

I guess it makes sense...So you're saying just including the Optional will add the correct binary to the zip?

@geoand
Copy link
Contributor Author

geoand commented Aug 10, 2022

Yes, exactly. The reason is that it ensures the correct ordering of build steps.

We did the exact same thing in Jib as well

@geoand geoand merged commit f24fc02 into quarkusio:main Aug 10, 2022
@quarkus-bot quarkus-bot bot added this to the 2.12 - main milestone Aug 10, 2022
@geoand geoand deleted the #27208 branch August 10, 2022 14:59
@gsmet gsmet modified the milestones: 2.12.0.CR1, 2.11.3.Final Aug 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

quarkus lambda function.zip does not contain UPX compressed bootstrap file using gradle
3 participants