-
Notifications
You must be signed in to change notification settings - Fork 54
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
Mark the injection of the SSH agent postStart event as experimental feature #1344
Conversation
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: vinokurig The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
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 Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
129b8c7
to
12352ab
Compare
Signed-off-by: ivinokur <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the PR @vinokurig :) I've left some comments, but it's worth noting that in #1341 I've also guarded the SSH agent initialization postStart event as an experimental feature.
Maybe we can take the documentation changes you've made here and add them to my existing PR (which I would appreciate your review of)?
if err != nil { | ||
return r.failWorkspace(workspace, "Failed to add ssh-agent post start event", metrics.ReasonWorkspaceEngineFailure, reqLogger, &reconcileStatus), nil | ||
// Include to experimental features list because it is not clear how to handle post start events in containers without sh. | ||
if *workspace.Config.EnableExperimentalFeatures { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe this could result in a null pointer exception since workspace.Config.EnableExperimentalFeatures
might be null. Instead we should check if it's null beforehand:
if workspace.Config.EnableExperimentalFeatures != null && *workspace.Config.EnableExperimentalFeature
@@ -225,6 +225,7 @@ you must add the following in your `~/.bashrc`: | |||
---- | |||
[ -f $HOME/ssh-environment ] && source $HOME/ssh-environment | |||
---- | |||
*Note:* This is an experimental feature and is controlled by the `DevWorkspaceOperatorConfig.EnableExperimentalFeatures` option. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good call on documenting this! Maybe we should clarify that using an SSH passphrase is an experimental feature? Something like:
*Note:* Specifying a passphrase for an SSH key is an experimental feature and is controlled by the `DevWorkspaceOperatorConfig.EnableExperimentalFeatures` option.
@AObuchow sorry I did not see your pull request so I am closing mine in favour of yours. |
@vinokurig No need to apologize, I appreciate you working on this :) Sounds good with me. |
What does this PR do?
Wrap the
AddSshAgentPostStartEvent
function into theEnableExperimentalFeatures
condition.What issues does this PR fix or reference?
#1337
Is it tested? How?
Create a workspace with a container without sh:
See: workspace starts successfully.
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