Closed AObuchow closed 6 months ago
Attention: Patch coverage is 81.48148%
with 5 lines
in your changes are missing coverage. Please review.
Project coverage is 52.53%. Comparing base (
8f3eafb
) to head (60d584c
). Report is 4 commits behind head on main.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
[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
What does this PR do?
This PR makes 2 changes:
Ensure only the storage strategies which support home persistence result in the persistent home devfile volume being added to a devworkspace.
The storage strategies which support home persistence are: per-user/common, perworkspace & async. The ephemeral storage strategy does not support home persistence.
Previously, we were trying to disable home persistence for the ephemeral storage strategy by calling
provisioner.NeedsStorage()
, however, the implementation of this function for the per-workspace PVC strategy always returns false and thus disabled home persistence when using per-workspace storage.Now, we simply disable home persistence if the devworkspace is using the ephemeral storage strategy.
Ensure home persistence is only enabled for workspaces which actually require persistent storage.
There are cases where a devworkspace could use the per-workspace, per-user or async storage strategy, but not actually require persistent storage. For example, a devworkspace with no volume components and no components which mount project sources. In these cases, we should not add a persistent home devfile volume to the devworkspace.
What issues does this PR fix or reference?
Fix #1238
Is it tested? How?
Test the per-workspace storage strategy can be used with persistUserHome
config.workspace.persistUserHome: true
in the DWOC:kubectl edit dwoc -n $NAMESPACE
Ensure persistent home volumeMount is not created when the workspace does not need storage
config.workspace.persistUserHome: true
in the DWOC:kubectl edit dwoc -n $NAMESPACE
mountSources: true
. For example:/home/user/
: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