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

feat(jkube-kit/generator): Provide guidance when the final project packaged file is not found in Quarkus projects #2257

Closed
ShivangMishra opened this issue Jul 6, 2023 · 4 comments · Fixed by #2446
Assignees
Labels
enhancement New feature or request UX
Milestone

Comments

@ShivangMishra
Copy link
Contributor

ShivangMishra commented Jul 6, 2023

Component

JKube Kit

Is your enhancement related to a problem? Please describe

If the user forgets to run mvn package before mvn k8s:build, the project artifact is not generated. The generator cannot find the artifact (for example quarkus-app directory in quarkus quickstart), so the plugin fails to generate a build through k8s:build.

image

Describe the solution you'd like

We should give a hint to the user that they may have forgotten to run mvn package.
Currently, the hint is given only in webapp quickstart. Now, we should do it for all generators.

image

Describe alternatives you've considered

No response

Additional context

Completes the fix initially #1408 that was done only for webapp generator and not Quarkus projects.

Acceptance Criteria

Scenario: Ensure users are guided to repackage their projects if the artifact is missing

Given:

  • The user has freshly cloned a Quarkus Maven project.
  • The project includes the kubernetes-maven-plugin.

When:

  • The user executes the command mvn oc:build oc:resource oc:apply to deploy the application, encountering a missing package issue.

Then:

  • The plugin fails to generate a build.
  • The log displays an instructive message: "HINT: try compiling and packaging your application before initiating the container image build task."

Objective:
Ensure users receive a clear prompt to compile and package their applications before running the container image build task using the Kubernetes Maven Plugin within Quarkus projects.

@ShivangMishra ShivangMishra added the enhancement New feature or request label Jul 6, 2023
@ShivangMishra
Copy link
Contributor Author

@rohanKanojia @sunix I'll work on this issue once I'm done with my current issues. I'll try to fix it by making changes in the parent of all generators. But If you have any other suggestions for this issue, do let me know. Thanks.

@manusa
Copy link
Member

manusa commented Jul 11, 2023

How is this different from #2070 ?

@ShivangMishra
Copy link
Contributor Author

@manusa in #2070,

  1. user types mvn package oc:build oc:resource oc:apply to deploy the application.
  2. user makes modifications.
  3. user types mvn oc:build oc:resource oc:apply to deploy the app (missing package).
  4. user does not see any changes in the deployed app.

In #2257,

  1. user types mvn oc:build oc:resource oc:apply to deploy the app (missing package).
  2. The plugin fails to generate a build.

In the first case, there are no errors because mvn package was run at least once and mvn clean was not run afterwards, so old artifact will be there. So, the plugin won't give an error while trying to generate the build.

Here, the plugin gives an error (because the user has not run mvn package even once, so there won't be any sourceFile / artifact to begin with).

@manusa manusa added the UX label Jul 13, 2023
@manusa manusa moved this to In Progress in Eclipse JKube Jul 25, 2023
@ShivangMishra ShivangMishra changed the title Provide guidance when the final project packaged file is not found feat(jkube-kit/generator): Provide guidance when the final project packaged file is not found Jul 28, 2023
@ShivangMishra
Copy link
Contributor Author

PR #2244 fixes this.

@manusa manusa moved this from In Progress to Planned in Eclipse JKube Nov 23, 2023
@sunix sunix moved this from Planned to In Progress in Eclipse JKube Nov 24, 2023
@sunix sunix self-assigned this Nov 24, 2023
@sunix sunix changed the title feat(jkube-kit/generator): Provide guidance when the final project packaged file is not found feat(jkube-kit/generator): Provide guidance when the final project packaged file is not found in Quarkus project Nov 28, 2023
@sunix sunix changed the title feat(jkube-kit/generator): Provide guidance when the final project packaged file is not found in Quarkus project feat(jkube-kit/generator): Provide guidance when the final project packaged file is not found in Quarkus projects Nov 28, 2023
@sunix sunix moved this from In Progress to Review in Eclipse JKube Nov 28, 2023
@manusa manusa added this to the 1.16.0 milestone Nov 29, 2023
@github-project-automation github-project-automation bot moved this from Review to Done in Eclipse JKube Nov 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request UX
Projects
None yet
3 participants