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

oc:build or k8s:build should warn the user that he may have forgotten to run a build or package #2070

Closed
4 tasks
sunix opened this issue Feb 23, 2023 · 6 comments · Fixed by #2244
Closed
4 tasks
Assignees
Labels
demoable Issues which can be demoed during the Sprint review meeting enhancement New feature or request UX
Milestone

Comments

@sunix
Copy link
Member

sunix commented Feb 23, 2023

Component

None

Is your enhancement related to a problem? Please describe

Context: User using an openshift cluster to deploy his development app.

  1. user types mvn package oc:build oc:resource oc:apply to deploy the application
  2. user is making modifications
  3. user types mvn oc:build oc:resource oc:apply to deploy the app (missing package)
  4. user is not seeing any changes in the deploy app

Describe the solution you'd like

If the user forgets about running mvn package prior to oc:build, JKube should notify the user that he may have forgotten to run mvn package .

Subtasks

@sunix sunix added enhancement New feature or request UX demoable Issues which can be demoed during the Sprint review meeting labels Feb 23, 2023
@rohanKanojia
Copy link
Member

This looks related to #1328 . There fix was done only in WebAppGenerator

@fMurugi
Copy link

fMurugi commented Mar 1, 2023

Hello I am beginner interested in contributing to this project .Are there beginner issues for one to try?
Help will be really appreciated.

@ShivangMishra
Copy link
Contributor

@rohanKanojia @sunix even though this issue is related to #1328, we can't use the same approach because in #1328 we could simply check if the final output artefact was null ( JKubeProjectUtil.getFinalOutputArtifact(getProject()) ), but here the artefact would be already present as the user ran mvn package once already.
In #2070 we basically want to check whether the user ran the plugin in package phase (mvn package oc:build oc:resource oc:apply) or directly (mvn oc:build oc:resource oc:appl).

I think we can use execution.getLifecyclePhase() in our Mojo to check this. We can then warn the user that they forgot to run mvn package...

What do you think ?

@rohanKanojia
Copy link
Member

I haven't checked code but I think we need to make changes to all framework generators for this or maybe modify it's parent JavaExecGenerator

Do you want to work on this issue?

@ShivangMishra
Copy link
Contributor

I haven't checked code but I think we need to make changes to all framework generators for this or maybe modify it's parent JavaExecGenerator

Do you want to work on this issue?

Yes I want to work on it

@ShivangMishra
Copy link
Contributor

ShivangMishra commented Jul 29, 2023

@sunix I cannot edit the checkboxes in the issue description.
So, I'm stating here and in the doc sheet.
I have implemented a generic fix for this issue for all generators in #2244.

@sunix sunix self-assigned this Nov 14, 2023
@manusa manusa added this to the 1.16.0 milestone Nov 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment