OpenLiberty / liberty-tools-intellij

IntelliJ IDEA extension for Liberty
https://plugins.jetbrains.com/plugin/14856-open-liberty-tools
Eclipse Public License 2.0
13 stars 26 forks source link

Behavioural differences in Suggestions for server.env and bootstrap.properties Files in the Alternate Config File/Directory Location #954

Open vaisakhkannan opened 1 month ago

vaisakhkannan commented 1 month ago

Environment :

IDE : 2024.1.6 LSP4IJ : 0.4.1-20240906-013124 LTI : Release candidate driver

We observed a behavioral difference in the suggestions after renaming server.env and bootstrap.properties files in the alternate config file/directory location. After renaming server.env and bootstrap.properties files and updating the pom.xml (Specified Custom config directory and files), we ran Liberty:Start, but after starting in dev mode, no suggestions appeared in the renamed server.env and bootstrap.properties files. In previous FVTs with earlier versions, we consistently received suggestions at this step. I tested it with LTI versions 24.0.3 and 24.0.6, and it worked as expected.

The behavior change we are seeing now is:

  1. Stop dev mode
  2. Close the project
  3. Reopen the project After doing this, the suggestions appear in the renamed server.env and bootstrap.properties files.

Screen Recording of the behaviour Now

https://github.com/user-attachments/assets/cc25d390-8083-4968-b270-86f62855bb50

Screen Recording of the old behaviour

https://github.com/user-attachments/assets/d74360e4-217e-4dd7-9731-051ee6f52b85

vaisakhkannan commented 1 month ago

What I found is that the issue is only present in the LTI release candidate driver for 24.0.9, and there are no issues with the 24.0.6 and 24.0.3 releases. @anusreelakshmi934 also reported this issue during her FVT.

anusreelakshmi934 commented 1 month ago

Same behaviour is observed in gradle also. We are getting suggestions in bootstrap.properties and server.env eventhough the directory is changed but not after renaming the file. Also we get suggestions after closing and reopening the project

turkeylurkey commented 1 month ago

Does it start working if you change the file? E.g. add a blank line?

vaisakhkannan commented 1 month ago

No @turkeylurkey , I made some changes to the files, but the suggestions still aren't showing up. I can only get the suggestions after closing and reopening the project.

Are you able to see the suggestions? For confirmation, I renamed config to config2, bootstrap.properties to bootstrapp.properties, and server.env to serverr.env.

The configuration I provided in the pom.xml is as follows:

<properties>
    ...
    <configDirectory>${basedir}/src/main/liberty/config2</configDirectory>
    <bootstrapPropertiesFile>${basedir}/src/main/liberty/config2/bootstrapp.properties</bootstrapPropertiesFile>
    <serverEnvFile>${basedir}/src/main/liberty/config2/serverr.env</serverEnvFile>
</properties>