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

"Refreshing Liberty Dashboard projects" kicks in all the time #455

Open
sdehors-ibm opened this issue Dec 20, 2024 · 7 comments · May be fixed by #462
Open

"Refreshing Liberty Dashboard projects" kicks in all the time #455

sdehors-ibm opened this issue Dec 20, 2024 · 7 comments · May be fixed by #462
Assignees
Labels
bug Something isn't working must-fix
Milestone

Comments

@sdehors-ibm
Copy link

The extension listens to changes on /pom.xml,/build.gradle,/settings.gradle,/src/main/liberty/config/server.xml as well as changes in workspace folders.
On some of the projects that we have, when the java build kicks in, the liberty dashboard refresh is triggered. This is certainly due to the fact that our build generates some pom files in the target folder. This seems to interrupt the java build that then restarts from the beginning, causing some kind of infinite loop.

On a given project we do not change the liberty config often once established. It should be possible to disable the automatic refresh as its causing a lot of interruptios

@sdehors-ibm
Copy link
Author

Raised PR #456

@TrevCraw
Copy link
Contributor

Hi @sdehors-ibm, thank you for raising this issue and opening a PR to address it. Given the time of the year, we will have someone on our team take a closer look next week.

Based on your description of the issue, we may consider a solution beyond providing an option to users to disable the refresh. We may need to update our default behaviour.

@sdehors-ibm
Copy link
Author

@TrevCraw , sure I proposed this to unlock our adoption of VScode + liberty tools but ideally the refresh should only be triggered when appropriate.

@JoshwinThomasIBM
Copy link
Contributor

Hi @sdehors-ibm , when i tried the build i was not able to see any pom files getting generated in the target folder , also checked if refresh is getting invoked during the build but seems like it isn't . Not sure what i'm missing here. Can you share the steps you tried for which you got this issue?

@JoshwinThomasIBM
Copy link
Contributor

Initially made a few changes to avoid looking into target and build directories for wherever there is a reference for pom.xml or build.gradle in the extension which didn't seem to fix the issue .
Was able to recreate the issue by copying the pom into the target folder during the build by modifying the pom file in the project used for testing and refresh is getting invoked directly at this point . Trying to prevent this refresh invocation when pom/build files are generated in the target folders can be the possible solution

@JoshwinThomasIBM JoshwinThomasIBM self-assigned this Jan 14, 2025
@JoshwinThomasIBM JoshwinThomasIBM moved this from Prioritized to In Review in Open Liberty Developer Experience Jan 14, 2025
@aparnamichael aparnamichael added the bug Something isn't working label Jan 16, 2025
@TrevCraw TrevCraw moved this from In Review to In Progress in Open Liberty Developer Experience Jan 17, 2025
@JoshwinThomasIBM
Copy link
Contributor

JoshwinThomasIBM commented Jan 20, 2025

hi @sdehors-ibm , can you give few details about the bug

  1. where is the projects target directory ?

  2. We are currently checking if the pom.xml file resides in a subdirectory within the project's target or build directory (located at the root of the project). If it does, we skip the refresh process. If it doesn't, we proceed with the refresh. Can you confirm if this behaviour aligns with your project structure?

  3. Is there a possibility that your build process is causing pom.xml files to be created repeatedly, potentially in a loop?

  4. Do these pom.xml files only appear inside the target folder / sub directories of the target folder after generation, or could they be located elsewhere in your project?

  5. We tested this by adding a config to the project’s pom.xml to copy it into the target directory and other locations during the build. Does this test cover the issue you're facing?

@sdehors-ibm
Copy link
Author

Hi,

  1. the target directories are at the standard location provided by maven under each module folder.
  2. the project is composed of several modules, each have a target folder. The test poms are present in subdirectories in those target folders.
  3. the build process copies the pom files from the src/test/resources folder to target/test-classes. I don't think there is any loop, unless the build is retriggered and re-copies those resources
  4. see 3.
  5. I think you can just put the pom files in the src/test/resources, we also have a zip dependency that gets unzipped to target/test-classes but this goal does not seem to be executed by vs code during its build.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working must-fix
Projects
4 participants