Closed vinokurig closed 1 month ago
Hi @vinokurig. Thanks for your PR.
I'm waiting for a devfile member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test
on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.
Once the patch is verified, the new status will be reflected by the ok-to-test
label.
I understand the commands that are listed here.
Thank you @vinokurig I'm able to clone, commit, and push:
This PR & the bug it addresses made me realize we aren't calling the devfile validation library to validate commands. The devfile API does not allow for commands with duplicate ids:
id
must be unique
Prior to this PR, we had commands with the same id, but targeting different components:
commands:
(...)
- exec:
commandLine: |-
SSH_ENV_PATH=$HOME/ssh-environment \
&& if [ -f /etc/ssh/passphrase ] && command -v ssh-add >/dev/null; \
then ssh-agent | sed 's/^echo/#echo/' > $SSH_ENV_PATH \
&& chmod 600 $SSH_ENV_PATH && source $SSH_ENV_PATH \
&& ssh-add /etc/ssh/dwo_ssh_key < /etc/ssh/passphrase \
&& if [ -f $HOME/.bashrc ] && [ -w $HOME/.bashrc ]; then echo "source ${SSH_ENV_PATH}" >> $HOME/.bashrc; fi; fi
component: tools
id: init-ssh-agent
- exec:
commandLine: |-
SSH_ENV_PATH=$HOME/ssh-environment \
&& if [ -f /etc/ssh/passphrase ] && command -v ssh-add >/dev/null; \
then ssh-agent | sed 's/^echo/#echo/' > $SSH_ENV_PATH \
&& chmod 600 $SSH_ENV_PATH && source $SSH_ENV_PATH \
&& ssh-add /etc/ssh/dwo_ssh_key < /etc/ssh/passphrase \
&& if [ -f $HOME/.bashrc ] && [ -w $HOME/.bashrc ]; then echo "source ${SSH_ENV_PATH}" >> $HOME/.bashrc; fi; fi
component: second-component
id: init-ssh-agent
- apply:
component: init-persistent-home
id: init-persistent-home
[APPROVALNOTIFIER] This PR is APPROVED
This pull-request has been approved by: AObuchow, dkwon17, vinokurig
The full list of commands accepted by this bot can be found here.
The pull request process is described here
What does this PR do?
Fix a bug when the ssh agent post start event command is present only in the first component of the workspace pod yaml.
What issues does this PR fix or reference?
https://issues.redhat.com/browse/CRW-6614 Fix https://github.com/devfile/devworkspace-operator/issues/1330
Is it tested? How?
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