-
Notifications
You must be signed in to change notification settings - Fork 88
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
Allow enabling persistence of /home/user/ in workspaces #1737
Conversation
Hi @AObuchow. Thanks for your PR. I'm waiting for a eclipse-che 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/test-infra repository. |
Codecov Report
@@ Coverage Diff @@
## main #1737 +/- ##
==========================================
- Coverage 60.06% 59.96% -0.10%
==========================================
Files 71 71
Lines 8423 8450 +27
==========================================
+ Hits 5059 5067 +8
- Misses 3017 3036 +19
Partials 347 347
|
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.
Generally LGTM; IIRC this is one we were considering backporting to 7.72.x
api/v2/checluster_types.go
Outdated
@@ -85,6 +85,10 @@ type CheClusterDevEnvironments struct { | |||
// +optional | |||
// +kubebuilder:default:={pvcStrategy: per-user} | |||
Storage WorkspaceStorage `json:"storage,omitempty"` | |||
// PersistUserHome defines configuration options for persisting the `/home/user/` |
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.
Can we not to mention specifically /home/user
?
For instance: Defined configuration options for persisting a home user directory in a workspace
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.
That's okay with me, will make the appropriate change 👍
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 did not modify the documentation for persistUserHome.enabled
to remove the mention of /home/user/
as it felt appropriate to explicitly state which directory would persist. However, I am open to reconsidering this decision.
a63572c
to
7f8863e
Compare
@AObuchow |
7f8863e
to
b728c1e
Compare
Done 👍 I removed the original update dev resources commit and re-ran |
api/v2/checluster_types.go
Outdated
// Must be used with the 'per-user' or 'per-workspace' PVC strategy in order to take effect. | ||
// Disabled by default. | ||
Enabled *bool `json:"enabled,omitempty"` | ||
// Determines whether the `/home/user/` directory in workspaces should persist between |
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.
@tolusha is this formatting problematic?
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.
That's not a problem.
Could you remove references to /home/user
from the comments in checluster_types.go and regenerate dev resources?
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.
Will do 👍
Fix eclipse-che/che#22102 Signed-off-by: Andrew Obuchowicz <aobuchow@redhat.com>
Signed-off-by: Andrew Obuchowicz <aobuchow@redhat.com>
…config Signed-off-by: Andrew Obuchowicz <aobuchow@redhat.com>
Signed-off-by: Andrew Obuchowicz <aobuchow@redhat.com>
b728c1e
to
3e2c49e
Compare
I believe the failing tests are due to |
/retest |
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: amisevsk, AObuchow, tolusha 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 |
Build 3.9 :: operator-bundle_3.x/1628: Console, Changes, Git Data |
Build 3.9 :: sync-to-downstream_3.x/3815: Console, Changes, Git Data |
Build 3.9 :: push-latest-container-to-quay_3.x/2763: Console, Changes, Git Data |
Build 3.9 :: copyIIBsToQuay/1554: Console, Changes, Git Data |
Build 3.9 :: sync-to-downstream_3.x/3815: Build container: devspaces-operator-bundle synced; /DS_CI/get-sources-rhpkg-container-build_3.x/3665 triggered; /job/DS_CI/job/dsc_3.x triggered; |
Build 3.9 :: operator-bundle_3.x/1628: Upstream sync done; /DS_CI/sync-to-downstream_3.x/3815 triggered |
Build 3.9 :: dsc_3.x/1053: Console, Changes, Git Data |
Build 3.9 :: dsc_3.x/1053: 3.9.0 CI |
What does this PR do?
This PR adds 2 new fields to the Che Cluster CR:
spec.devEnvironments.persistUserHome
: holds config settings related to the persistence of/home/user/
in workspacesspec.devEnvironments.persistUserHome.enabled
determines whether/home/user/
will persist in workspaces. Disabled by default.Note: this PR depends on DWO 0.22.0 which has currently only been released upstream.
Screenshot/screencast of this PR
n/a
What issues does this PR fix or reference?
eclipse-che/che#22102
How to test this PR?
Ensure that changes to
spec.devEnvironments.persistUserHome.enabled
from the Che Cluster CR are propagated to the Che-owned DWOC'sconfig.workspace.persistUserHome
:spec.devEnvironments.persistUserHome.enabled: true
in the Che Cluster CR results inconfig.workspace.persistUserHome.enabled: true
for the Che-owned DWOCspec.devEnvironments.persistUserHome.enabled: false
in the Che Cluster CR results inconfig.workspace.persistUserHome.enabled: false
for the Che-owned DWOCspec.devEnvironments.persistUserHome
in the Che Cluster CR (i.e. setting it to nil) removesconfig.workspace.persistUserHome
in the Che-owned DWOCFor example, for test case 1. do:
kubectl edit checluster -n eclipse-che
kubectl describe dwoc -n eclipse-che
and ensurepersistUserHome
is now enabled:PR Checklist
As the author of this Pull Request I made sure that:
What issues does this PR fix or reference
andHow to test this PR
completedReviewers
Reviewers, please comment how you tested the PR when approving it.