8000 Update quarkus-next to use GitHub Packages for Quarkus snapshots by Pepo48 · Pull Request #47501 · keycloak/keycloak · GitHub
[go: up one dir, main page]

Skip to content

Update quarkus-next to use GitHub Packages for Quarkus snapshots - #47501

Closed
Pepo48 wants to merge 1 commit into
keycloak:mainfrom
Pepo48:issue-47500
Closed

Pepo48 wants to merge 1 commit into
keycloak:mainfrom
Pepo48:issue-47500

Conversation

@Pepo48
@Pepo48 Pepo48 commented Mar 26, 2026
Copy link
Copy Markdown
Contributor

Closes: #47500

Changes needed:

  • Update snapshot repo URL in prepare-quarkus-next.sh
  • Add Maven settings with GitHub Packages authentication (requires PAT with read:packages scope)
  • Expose QUARKUS_PACKAGES_TOKEN secret in CI workflows

@Pepo48
Pepo48 requested a review from michalvavrik March 26, 2026 23:57
@michalvavrik michalvavrik left a comment •
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Changes I can see are fine and I think they will solve the issue. I cannot verify QUARKUS_PACKAGES_TOKEN usage as I don't have access or any knowledge about it (like its scopes), but that's what other reviewers are for.

Would be great if you got a test run (with your own token in your own fork) just to check if all works as expected.

@Pepo48
Pepo48 commented Mar 27, 2026 •
Copy link
Copy Markdown
Contributor Author

Would be great if you got a test run (with your own token) just to check if all works as expected.

Of course, I did that: https://github.com/Pepo48/keycloak/actions/runs/23622183737/job/68803640647

It's from my fork, so I created my own PAT with package:read scope. There is some failure still that I need to investigate (doesn't seem to be related to the scope of this PR though), but you can clearly see that the artiffacts are downloaded from maven.pkg.github.com - otherwise I would not even create this draft
PR 😉.

The question is though, how to proceed with this further and how we ended up in the situation, where we can't consume sonatype artiffacts anymore and yet we don't know whether and which alternative will be provided.

I would leave it as a draft for now, until they make the final decision, but at the same time I think that cross-org consumption should be a big part of it.

@michalvavrik
Copy link
Copy Markdown
Member

It's from my fork, so I created my own PAT with package:read scope. There is some failure still that I need to investigate (doesn't seem to be related to the scope of this PR though), but you can clearly sed that the artiffacts are downloaded from maven.pkg.github.com - otherwise I would not even create this draft
PR 😉.

Ok, thanks. that failure:

[33](https://github.com/Pepo48/keycloak/actions/runs/23622183737/job/68803640647#step:4:5947)
Error:  Failed to execute goal io.quarkus:quarkus-maven-plugin:3.33.0.CR1:build (default) on project keycloak-quarkus-server-app: Failed to build quarkus application: io.quarkus.builder.BuildException: Build failure: Build failed due to errors

while I don't know why, it is strange that it uses 3.33.0.CR1.

The question is though, how to proceed with this further and how we ended up in the situation, where we can't consume sonatype artiffacts anymore and yet we don't know whether and which alternative will be provided.

This PR basically follows the Quarkus contribution guide, it is fine as long as it works. If GH repo turns out to be slow, we can just build Quarkus locally, no biggie either way.

I would leave it as a draft for now, until they make the final decision, but at the same time I think that cross-org consumption should be a big part of it.

Right, I have no experience how big issue is to simply change it tomorrow if this turns out to be a bad solution, so I'll leave it to you to decide. I think you need to act to actually test Quarkus, but which steps you choose is your call.

Closes: keycloak#47500

Signed-off-by: Peter Zaoral <pzaoral@redhat.com>
@Pepo48
Pepo48 commented Mar 28, 2026
Copy link
Copy Markdown
Contributor Author

while I don't know why, it is strange that it uses 3.33.0.CR1.

This actually happened because I have not realized that even though io.quarkus:* snapshots are now on GitHub Packages, io.quarkus.platform:quarkus-bom is still deployed to Sonatype (from quarkusio/quarkus-platform).

Before all Quarkus snapshots used to be n one place on Sonatype. I don't know whether this is intended or not, but for now I adapted the workflow to use both repositories.

@michalvavrik
Copy link
Copy Markdown
Member

while I don't know why, it is strange that it uses 3.33.0.CR1.

This actually happened because I have not realized that even though io.quarkus:* snapshots are now on GitHub Packages, io.quarkus.platform:quarkus-bom is still deployed to Sonatype (from quarkusio/quarkus-platform).

@gsmet @rsvoboda that's weird 😄 is that intentional?

Before all Quarkus snapshots used to be n one place on Sonatype. I don't know whether this is intended or not, but for now I adapted the workflow to use both repositories.

Thanks, good catch at any rate.

@gsmet
gsmet commented Mar 28, 2026
Copy link
Copy Markdown
Contributor

Hey there.

So I pinged @rsvoboda about this change last week. For now, it's still experimental, I'm not sure if it's going to be better... Typically the deploy from tonight failed so it's unfortunately not fully reliable - but as all snapshot deployments to Sonatype were failing lately, it's not exactly hard to do better :).

I will monitor the situation in the following weeks.

@michalvavrik
Copy link
Copy Markdown
Member

Thank you @gsmet

@Pepo48
Pepo48 marked this pull request as ready for review March 31, 2026 14:28
@Pepo48
Pepo48 requested a review from a team as a code owner March 31, 2026 14:28
@Pepo48
Pepo48 commented Mar 31, 2026
Copy link
Copy Markdown
Contributor Author

Just for the record, in order to verify is in your own fork, a PAT with read:packages as a scope is needed and then it needs to be stored as a GHA secret (named QUARKUS_PACKAGES_TOKEN as in the PR) in a forked Keycloak repo.

When that is set, run the following:
gh workflow run quarkus-next.yml --repo <GH_USERNAME>/keycloak --ref main

This will simulate the scheduled run. That's why --ref main is used too.
If the quarkus-next branch already exists in the fork, it needs to be deleted prior to the workflow run, e.g. viagit push origin --delete quarkus-next to avoid cherry-pick conflicts.

Here's my re-run of Keycloak CI: https://github.com/Pepo48/keycloak/actions/runs/23683978268 (Quarkus UT failure corresponds to the one we already had with Sonatype, so in this context it is a good sign that confirms parity).

The only thing that needs to be sorted out prior to merge is a project-level PAT - either we create a new one or I can reuse some existing one that already has read:packages scope enabled if there is such.

@michalvavrik
Copy link
Copy Markdown
Member

hey @Pepo48 , thanks very much for your work so far. I think we need to skip to building Quarkus for now and go back when Quarkus snapshot deployment is stable. It is not a big issue as we said before - it is a nightly build after all.

@Pepo48
Pepo48 commented Apr 9, 2026
Copy link
Copy Markdown
Contributor Author

Surpassed by: #47892

@Pepo48 Pepo48 closed this Apr 9, 2026
@gsmet
gsmet commented Apr 22, 2026
Copy link
Copy Markdown
Contributor

Hey there, we have some news: @gastaldi worked on using GitHub releases to publish the snapshots and then we have an action that downloads them, and install them: https://github.com/quarkusio/install-quarkus-snapshots-action .

On your side, you would use the action, and then make sure you use -nsu for your Maven builds as you don't want to try to get updates from the snapshot repository.

The README should contain all the information you need.

Please test this approach and report back and that would reduce your testing time quite a lot.

@michalvavrik
Copy link
Copy Markdown
Member

Thanks @gsmet !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Build Quarkus snapshots in quarkus-next workflow

3 participants

0