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

Add method for creating CLI apps from existing sources #1233

Merged
merged 3 commits into from
Aug 1, 2024

Conversation

mocenas
Copy link
Contributor

@mocenas mocenas commented Jul 31, 2024

Summary

This PR adds a method to create QuarkusCliRestService from existing sources. It should do similar job as already existing "createApplication" methods.
This feature is important for "quarkus update" testing. For testing advanced scenarios (such as updating entire app with business logic) we need to have prepared app, which we can then update and start. It is not feasible to construct entire app from scratch in tests.

Please check the relevant options

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Dependency update
  • Refactoring
  • Release (follows conventions described in the RELEASE.md)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • This change requires a documentation update
  • This change requires execution against OCP (use run tests phrase in comment)

Checklist:

  • Example scenarios has been updated / added
  • Methods and classes used in PR scenarios are meaningful
  • Commits are well encapsulated and follow the best practices

@mocenas mocenas requested a review from fedinskiy July 31, 2024 09:53
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<quarkus.platform.artifact-id>quarkus-bom</quarkus.platform.artifact-id>
<quarkus.platform.group-id>io.quarkus.platform</quarkus.platform.group-id>
<quarkus.platform.version>3.12.3</quarkus.platform.version>
Copy link
Contributor

Choose a reason for hiding this comment

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

  1. 3.13.0 is out
  2. What about updates and prod versions? I would like to have a way to change this value without editing the file

Copy link
Contributor Author

@mocenas mocenas Jul 31, 2024

Choose a reason for hiding this comment

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

This feature is primarily aimed at CLI update-testing. Which means - we want to use old quarkus versions, and if we need up-to-date ones - we'll use "quarkus update" to get to it.
I will add an option to use either CliDevModeVersionLessQuarkusApplicationManagedResource or CliDevModeLocalhostQuarkusApplicationManagedResource (similar to #1232) but I can see potential problems here. See if I have an app with git-anchored sources, then those sources are probably made for specific version of quarkus and changing it to newer version, would possibly require to update the sources as well.

However I can see an use case where overwriting the version in app.start() would make sense. And that is all that matter. I will change it to have this option too.

3.13.0 is out

IMO that doesn't matter. As stated above, this feature is primarily for testing old-version apps, so having one in example is no harm.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

change made.

@mocenas mocenas requested a review from fedinskiy July 31, 2024 12:31
@fedinskiy fedinskiy merged commit 2857a81 into quarkus-qe:main Aug 1, 2024
8 checks passed
@mocenas mocenas deleted the create_cli_app_from_sources branch August 1, 2024 10:41
@mocenas mocenas mentioned this pull request Aug 14, 2024
11 tasks
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.

2 participants