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

Move brotli native library handling to a feature #43828

Merged
merged 2 commits into from
Oct 15, 2024

Conversation

zakkak
Copy link
Contributor

@zakkak zakkak commented Oct 11, 2024

Always registers the correct native library as the logic runs on the
same architecture we are targeting (even when using containers).

Related to #43782

@zakkak zakkak requested a review from Karm October 11, 2024 12:04
Copy link

github-actions bot commented Oct 11, 2024

🎊 PR Preview fa93db7 has been successfully built and deployed to https://quarkus-pr-main-43828-preview.surge.sh/version/main/guides/

  • Images of blog posts older than 3 months are not available.
  • Newsletters older than 3 months are not available.

This comment has been minimized.

This comment has been minimized.

Copy link
Member

@gsmet gsmet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm all for this but I raised some concerns about the dependencies.

@@ -100,6 +100,14 @@
<artifactId>mockito-junit-jupiter</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.graalvm.sdk</groupId>
<artifactId>nativeimage</artifactId>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We usually mark this one as provided as I'm pretty sure we don't want the artifact around in JVM mode? Except if we ended up doing it in the parent or the BOM?

Copy link
Contributor Author

@zakkak zakkak Oct 14, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are right. I added it through the IDE and didn't look back.


@Override
public void beforeAnalysis(BeforeAnalysisAccess access) {
// TODO reuse Brotli4jLoader's code instead of reinventing the wheel?
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this makes a lot of sense. In most cases we were reinventing the wheel, we were doing it because we couldn't actually resolve the OS at build time for in container build.

By using this pattern, we can probably do it now.

Now I can understand if you want to do it in two steps.

</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-devtools-utilities</artifactId>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(This comment was added at the end just so you have the chronology of my thoughts)

I'm not exactly excited about this one. It's supposed to be about devtools utilities and while it only contains two classes for now, I'm not sure it's good idea to use it - it could contain dependencies we don't want in the future.

So, maybe we should actually tackle the issue of using the Brotli4jLoader instead of our own code from the start?

Also, @dmlloyd , I wonder if we should have something about the architecture in SmallRye Common OS - in the vein of what we have here: https://github.com/quarkusio/quarkus/blob/main/independent-projects/tools/utilities/src/main/java/io/quarkus/utilities/OS.java#L35

Finally, please make sure you add the actual dependencies before the test ones. That's a convention we try to use.

@zakkak zakkak force-pushed the 2024-10-11-fix-43770 branch from f3b95db to 9955ab9 Compare October 14, 2024 10:10
Always registers the correct native library as the logic runs on the
same architecture we are targeting (even when using containers).

Related to quarkusio#43782
@zakkak zakkak force-pushed the 2024-10-11-fix-43770 branch 2 times, most recently from fbaf8d8 to c6ce08a Compare October 14, 2024 10:13
@zakkak
Copy link
Contributor Author

zakkak commented Oct 14, 2024

I'm all for this but I raised some concerns about the dependencies.

👍 I resolved all of them. Please take another look.

@zakkak zakkak requested a review from gsmet October 14, 2024 10:15

This comment has been minimized.

This comment has been minimized.

@zakkak zakkak force-pushed the 2024-10-11-fix-43770 branch from c6ce08a to 33ccb87 Compare October 14, 2024 16:03
@zakkak
Copy link
Contributor Author

zakkak commented Oct 14, 2024

I had included an extra slash in the beggining of the path. Fixed.

Copy link

quarkus-bot bot commented Oct 14, 2024

Status for workflow Quarkus Documentation CI

This is the status report for running Quarkus Documentation CI on commit 33ccb87.

✅ The latest workflow run for the pull request has completed successfully.

It should be safe to merge provided you have a look at the other checks in the summary.

Warning

There are other workflow runs running, you probably need to wait for their status before merging.

@zakkak zakkak added the triage/waiting-for-ci Ready to merge when CI successfully finishes label Oct 14, 2024

This comment has been minimized.

Copy link

quarkus-bot bot commented Oct 15, 2024

Status for workflow Quarkus CI

This is the status report for running Quarkus CI on commit 33ccb87.

✅ The latest workflow run for the pull request has completed successfully.

It should be safe to merge provided you have a look at the other checks in the summary.

You can consult the Develocity build scans.

@zakkak zakkak merged commit 50a1717 into quarkusio:main Oct 15, 2024
54 checks passed
@quarkus-bot quarkus-bot bot removed the triage/waiting-for-ci Ready to merge when CI successfully finishes label Oct 15, 2024
@zakkak zakkak deleted the 2024-10-11-fix-43770 branch October 15, 2024 06:16
@quarkus-bot quarkus-bot bot added this to the 3.16 - main milestone Oct 15, 2024
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.

2 participants