Skip to content
This repository has been archived by the owner on Nov 28, 2022. It is now read-only.

SVT: [Eclipse]: Appsody Quarkus project does not auto restart after edit #2657

Closed
mmulholl opened this issue Apr 9, 2020 · 19 comments
Closed

Comments

@mmulholl
Copy link

mmulholl commented Apr 9, 2020

Codewind version: Codewind tech preview 0.11.0.v202004030754
OS: Mac

Che version:
IDE extension version:
IDE version: Eclipse jee 2019-06
Kubernetes cluster:

Description:
Appsody Quarkus project does not restart after file edit.

Steps to reproduce:

  1. Create a appsody Quarkus project
  2. open application and change url to "/hello" => hello is displayed
  3. Modify src/main/java/org/acme/quickstart/GreetingResource.java so that hello() method returns "othello", and save the file.
  4. Application state remains running
  5. open application and change url to "/hello" => "hello" is displayed
  6. Manually restart the project, wait for running
  7. open application and change url to "/hello" => "othello" is displayed.

Workaround:

@makandre
Copy link
Contributor

makandre commented Apr 9, 2020

In general, for appsody projects you would not see the project “restart” in Codewind, since changes are watched by the appsody controller and it rebuilds/restarts the application in place.

@makandre
Copy link
Contributor

makandre commented Apr 9, 2020

Btw, I think Quarkus stack is recently promoted to incubator status? I recall it was experimental previously

@makandre
Copy link
Contributor

makandre commented Apr 9, 2020

Changes are synced correctly to PFE, and appear in the appsody application container. But this is not triggering a hot replace for some reason.

If I shell into the appsody application container directly and make a change, it does trigger a hot replace.

@makandre
Copy link
Contributor

Opened appsody/stacks#753 for appsody team to have a look

@malincoln
Copy link

Opened appsody/stacks#753 for appsody team to have a look

@makandre are you able to mark 753 as urgent/hot/stopship on their end for high priority?

@makandre
Copy link
Contributor

@malincoln I can't but I pinged @neeraj-laad

@makandre
Copy link
Contributor

A workaround is to manually build the project (from Codewind view, Build action on the project). That would force a rerun of appsody to pick up the changes

@mmulholl
Copy link
Author

Of course manual build works, just not really a workaround for a product which is meant to auto build. A workaround would be a way to rig auto-build.

@mmulholl
Copy link
Author

As a note, Appsody Eclipse appears to have the same issue

@makandre
Copy link
Contributor

makandre commented Apr 15, 2020

In appsody/stacks#753 (comment), it was discovered that when a java source file was changed, it appears we are also syncing over the pom.xml to PFE as well.. And this causes problems with Quarkus.

@tobespc @jgwest Are we syncing over files that have not changed for some reason?

Edit: hold on... the pom.xml is not uploaded but something else is touching the file...

@makandre
Copy link
Contributor

makandre commented Apr 16, 2020

The reason the pom.xml is touched even though it has not changed is because when a file is uploaded, it is written to cw-temp first, then the project there (which contains a copy of the pom) is copied to its real location in /mounted-workspace

I found that if the copy is done with preserveTimestamps: true, this will make Quarkus happy. i.e. changing https://github.com/eclipse/codewind/blob/master/src/pfe/portal/modules/utils/sharedFunctions.js#L90 into:

await fs.copy(fromProjectPath, toProjectPath, { preserveTimestamps: true });

@tobespc Do you think this will cause any problems? If not I can put up a PR for this change.

@malincoln
Copy link

@makandre thanks for investigating further. I guess the next step is to determine if we still need 753 from the Apposdy team or should cancel?

@makandre
Copy link
Contributor

@malincoln I think they'll use 753 to track the underlying issue in the Quarkus stack, because if user does make a change to the pom.xml file, it crashes.

This was referenced Apr 16, 2020
@mmulholl
Copy link
Author

This now works in the latest driver.

@sghung
Copy link
Contributor

sghung commented Apr 16, 2020

Are we keeping this issue open due to #2699 ? I just want to check whether this can be closed due to Martin confirming, or whether we need to redo the PR and verify again

@makandre
Copy link
Contributor

@mmulholl Could you re-verify that the new fix for #2699 didn't break Quarkus? If it's all good then I think we can close this one

@codewind-bot
Copy link

@mmulholl - this issue is now ready to be verified.

@jagraj
Copy link

jagraj commented Apr 27, 2020

We verified this issue during Codewind 0.11.0 release test cycle.This issue has been fixed. Closing it now.

@malincoln
Copy link

closing after discussion with Jag and as Martin is on vacation.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

7 participants