Closed AObuchow closed 4 months ago
[APPROVALNOTIFIER] This PR is APPROVED
This pull-request has been approved by: AObuchow, dkwon17
The full list of commands accepted by this bot can be found here.
The pull request process is described here
For some reason, the GH Actions aren't running. Will try and do a no-op commit to get it to run, then remove the no-op commit.
New changes are detected. LGTM label has been removed.
/retest
/retest
/retest
/retest
What does this PR do?
Environment variables defined in a Kubernetes container can only reference other variables declared earlier in the list of container environment variables. See the second note from the Kubernetes docs on environment variables.
This change ensures that the $PROJECT_SOURCE and $PROJECT_ROOT devfile environment variables are the first environment variables defined in all workspace pod containers so that devfile environment variables can reference $PROJECT_SOURCE and $PROJECT_ROOT.
Instead of appending $PROJECT_SOURCE and $PROJECT_ROOT to all workspace containers, we are now prepending them.
Additionally, existing tests were modified to accommodate this change in the list of container environment variables ordering, and a new test was added for this change.
What issues does this PR fix or reference?
https://github.com/devfile/devworkspace-operator/issues/1274
Is it tested? How?
quay.io/aobuchow/devworkspace-controller:project-source-first
for ease of testing.echo $ENV_TEST
. The output should be/projects/web-nodejs-sample/hey-there
-- in other words,$(PROJECT_SOURCE)
will get evaluated to/projects/web-nodejs-sample/
.PR Checklist
/test v8-devworkspace-operator-e2e, v8-che-happy-path
to trigger)v8-devworkspace-operator-e2e
: DevWorkspace e2e testv8-che-happy-path
: Happy path for verification integration with Che