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

Better tooling experience for Quarkus project info and update #29558

Merged
merged 4 commits into from
Feb 17, 2023

Conversation

ia3andy
Copy link
Contributor

@ia3andy ia3andy commented Nov 29, 2022

part of #29000

Allow to:

  • Fetch recipes from "io.quarkus:quarkus-update-recipes:LATEST
  • Filter to keep only recipes matching the current project version and target version
  • Generate the project update recipe yaml file in a temp directory, it includes:
    • the applicable recipes from the update artifact
    • the Quarkus version update commands

Prepare the tooling update/info commands as discussed on Zulip:

quarkus info should:

  • Display project information
  • Verify versions health (platform and extensions)
  • Hint on how to repair if needed (print command) => quarkus update -V [current-quarkus-version]
  • Check for update (print command if needed)

quarkus update should: Suggest recommended project updates with the possibility to apply them.

quarkus -V --version: version of the CLI (not project related),
quarkus version: hide and forward to quarkus -V

I've added the recipe generation to the update command, we still need to:

  • @aloubyansky: Change the info command implementation to do the above
  • @aloubyansky: Fix the bits of code with TODO ALEXEY:
  • @aloubyansky: Change the update command to print the instructions to update the project versions manually and say that the script also includes other stuff (packages migration, ...)
  • @ia3andy: Print command to apply the recipe script
qss --help


Usage: quarkus [-ehv] [--verbose] [-D=<String=String>]... [COMMAND]
Options:
  -h, --help            Display this help message.
  -v, --version         Print Cli version information and exit.
  -e, --errors          Display error messages.
      --verbose         Verbose mode.
  -D=<String=String>    Java properties

Commands:
[...]
  info                    Display project information and verify versions
                            health (platform and extensions).
  update                  Suggest recommended project updates with the
                            possibility to apply them.
  completion              bash/zsh completion:  source <(quarkus completion)

@quarkus-bot quarkus-bot bot added area/devtools Issues/PR related to maven, gradle, platform and cli tooling/plugins area/platform Issues related to definition and interaction with Quarkus Platform labels Nov 29, 2022
@ia3andy ia3andy force-pushed the quarkus-update branch 2 times, most recently from fac1c9b to 34c52d1 Compare November 30, 2022 08:37
@quarkus-bot quarkus-bot bot added area/cli Related to quarkus cli (not maven/gradle/etc.) area/gradle Gradle area/jbang Issues related to when using jbang.dev with Quarkus area/maven labels Jan 11, 2023
@aloubyansky
Copy link
Member

FYI @ebullient

@ia3andy
Copy link
Contributor Author

ia3andy commented Jan 12, 2023

@aloubyansky @maxandersen I need to print the open-rewrite command, but I am not sure what version to put? Maybe the version should be provided by the quarkus-update-recipe jar as metadata?

@maxandersen
Copy link
Member

Version of what ? Openrewrite? Put a hardcoded version that cli knows about. The platform won't know which is better.

Users can change it when running the actual command if need be.

Ps. Would be great with just a little bit of context in the pr especially with this many changes what this pr is trying to do (and possibly what it doesn't cover yet if the #29000)

@ia3andy
Copy link
Contributor Author

ia3andy commented Jan 12, 2023

Version of what ? Openrewrite? Put a hardcoded version that cli knows about. The platform won't know which is better.

Users can change it when running the actual command if need be.

Ok 👍

Ps. Would be great with just a little bit of context in the pr especially with this many changes what this pr is trying to do (and possibly what it doesn't cover yet if the #29000)

@maxandersen this was still a draft, I pushed ASAP to allow Alexey to do his part. I've updated the description with everything.

@ia3andy ia3andy changed the title Introduce QuarkusUpdateRecipe Better tooling experience for Quarkus project info and update Jan 12, 2023
@ia3andy
Copy link
Contributor Author

ia3andy commented Jan 12, 2023

Just a small thing we could change the quarkus update to have --latest, this way:

  • quarkus update would keep the current platform version but update/fix the extensions
  • quarkus update --latest would update to the latest quarkus
qss update --help

Suggest recommended project updates with the possibility to apply them.

Usage: quarkus update [-eh] [--per-module] [--refresh] [--[no-]registry-client]
                      [--verbose] [--config=CONFIG] [-D=<String=String>]...
                      [-S=targetStreamId | -P=targetPlatformVersion | -L]

Options:
[...]

Target Quarkus version:
  -S, --stream-id=targetStreamId
                        A target stream id, for example:
                          2.0
  -P, --platform-version=targetPlatformVersion
                        A specific target Quarkus platform version, for example:
                          2.2.0.Final

  -L, --latest          Use the latest Quarkus platform version

@quarkus-bot

This comment has been minimized.

@aloubyansky
Copy link
Member

I still don't like the --latest idea. IMO, what is proposed by --latest would be the primary use-case, not the other way around.

@gsmet gsmet added the triage/needs-rebase This PR needs to be rebased first because it has merge conflicts label Feb 4, 2023
@maxandersen
Copy link
Member

How about --stream to indicate stay within the stream you are in ?

@ia3andy ia3andy marked this pull request as ready for review February 13, 2023 10:30
@quarkus-bot

This comment has been minimized.

@ia3andy ia3andy force-pushed the quarkus-update branch 2 times, most recently from 2139b22 to 65c0ff2 Compare February 13, 2023 10:55
@quarkus-bot

This comment has been minimized.

@ia3andy ia3andy force-pushed the quarkus-update branch 3 times, most recently from 786b40e to 4975c55 Compare February 15, 2023 12:10
@quarkus-bot

This comment has been minimized.

@quarkus-bot

This comment has been minimized.

@quarkus-bot
Copy link

quarkus-bot bot commented Feb 17, 2023

✔️ 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.

@ia3andy ia3andy requested a review from aloubyansky February 17, 2023 13:13
@ia3andy ia3andy merged commit 60d32cd into quarkusio:main Feb 17, 2023
@ia3andy ia3andy deleted the quarkus-update branch February 17, 2023 15:15
@quarkus-bot quarkus-bot bot added this to the 3.0 - main milestone Feb 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/cli Related to quarkus cli (not maven/gradle/etc.) area/devtools Issues/PR related to maven, gradle, platform and cli tooling/plugins area/gradle Gradle area/jbang Issues related to when using jbang.dev with Quarkus area/maven area/platform Issues related to definition and interaction with Quarkus Platform triage/needs-rebase This PR needs to be rebased first because it has merge conflicts
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants