payara / ecosystem-support

Placeholder repository to handle community requests for the Payara Platform ecosystem tools
4 stars 2 forks source link

Bug Report: VS Code Payara Tools Extension - Payara Micro Instance - Missing Environment Variables/FISH-9450 #91

Open jameshearttech opened 3 months ago

jameshearttech commented 3 months ago

Brief Summary

When deploying to a Payara Micro instance using the VS Code Payara Tools extension the system and shell environment variables are missing.

Expected Outcome

The system and shell environment variables should exist for the Payara Micro instance (e.g., System.getenv()).

Current Outcome

System.getenv() return null rather than the value of the environment variables.

Reproducer

Deploy anything using the VS Code Payara Tools extension to a Payara Micro instance. Compare environment variables (e.g., printenv to /proc/\<pid>/environ) of the system to the process started by the extension when deploying.

Operating System

Windows 11 (host), Podman 5.1.2, Debian 12 (dev container)

JDK Version

OpenJDK Runtime Environment (build 17.0.11+9-Debian-1deb12u1)

Ecosystem Tool

Visual Studio IDE Plugin

jameshearttech commented 3 months ago

@Elifzeynepedman looks like the Maven class fireCommand calls child_process.spawn, but it does not pass environment variables to the child process.

https://github.com/payara/ecosystem-vscode-plugin/blob/1.3.0/src/main/fish/payara/project/Maven.ts#L134-L140

felixif commented 2 months ago

Hello @jameshearttech,

I was able to reproduce the issue and raised an internal issue, FISH-9450, to address it. Thank you for your report!