-
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
feat: configure workspace start timeout from Che Cluster CR #1576
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. |
This PR is set to be a draft until DWO 0.18.0 is released. @tolusha if you would like to merge this PR (and the 2 other PR's included in it), it might be efficient to follow the testing steps from this PR, as well as #1549 and #1565 all at once. If you would like to merge the PR's one-by-one, just ping me and I'll rebase my earlier PR :) |
Codecov Report
@@ Coverage Diff @@
## main #1576 +/- ##
==========================================
- Coverage 60.62% 60.61% -0.02%
==========================================
Files 73 73
Lines 6316 6314 -2
==========================================
- Hits 3829 3827 -2
Misses 2146 2146
Partials 341 341
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
@AObuchow |
dfdcbaf
to
9b02186
Compare
DWO updated to v0.18.0 |
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: 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 |
/test v11-operator-test |
api/v2/checluster_types.go
Outdated
// "15m", "20s", "1h30m", etc. | ||
// +optional | ||
// +kubebuilder:default:="5m" | ||
StartTimeout string `json:"startTimeout,omitempty"` |
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 am wondering why not put this into seconds, like this?
StartTimeoutSeconds *int32
json:"startTimeoutSeconds,omitempty"``
The reasons are the following:
- simplify validation on checluster level
- dashboard shouldn't parse the value but always uses timeout in seconds
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 chose string
to match the expected input that the DevWorkspaceOperatorConfig expects.
However, since the progressTimeout field of the DWOC supports seconds, I could simply convert the int32 to string and append an s
. The maximum int32
value seems to be 2147483647
which is ~596523 hours, so there doesn't seem to be any issue about not being able to set the start timeout high enough.
I'll make your suggested modification 👍
Fix eclipse-che/che#21770 Signed-off-by: Andrew Obuchowicz <[email protected]>
59b4f81
to
bcd2cf2
Compare
New changes are detected. LGTM label has been removed. |
@tolusha I updated the PR to use #1587 (comment) might also be worth addressing in this PR as an extra commit. |
Build 3.5 :: dsc_3.x/531: Console, Changes, Git Data |
Build 3.5 :: dsc_3.x/531: 3.5.0 CI |
Build 3.5 :: operator-bundle_3.x/738: Console, Changes, Git Data |
Build 3.5 :: sync-to-downstream_3.x/1885: Console, Changes, Git Data |
Build 3.5 :: push-latest-container-to-quay_3.x/1450: Console, Changes, Git Data |
Build 3.5 :: copyIIBsToQuay/581: Console, Changes, Git Data |
Build 3.5 :: push-latest-container-to-quay_3.x/1450: Copied: devspaces-operator-bundle; bundle-generated updated; |
Build 3.5 :: sync-to-downstream_3.x/1885: Build container: devspaces-operator-bundle synced; /DS_CI/get-sources-rhpkg-container-build_3.x/1829 triggered; /job/DS_CI/job/dsc_3.x triggered; |
Build 3.5 :: operator-bundle_3.x/738: Upstream sync done; /DS_CI/sync-to-downstream_3.x/1885 triggered |
Build 3.5 :: dsc_3.x/532: Console, Changes, Git Data |
Build 3.5 :: dsc_3.x/532: 3.5.0 CI |
Build 3.5 :: operator-bundle_3.x/739: Console, Changes, Git Data |
Build 3.5 :: sync-to-downstream_3.x/1888: Console, Changes, Git Data |
Build 3.5 :: push-latest-container-to-quay_3.x/1452: Console, Changes, Git Data |
Build 3.5 :: copyIIBsToQuay/583: Console, Changes, Git Data |
Build 3.5 :: push-latest-container-to-quay_3.x/1452: Copied: devspaces-operator-bundle; bundle-generated updated; |
Build 3.5 :: sync-to-downstream_3.x/1888: Build container: devspaces-operator-bundle synced; /DS_CI/get-sources-rhpkg-container-build_3.x/1831 triggered; /job/DS_CI/job/dsc_3.x triggered; |
Build 3.5 :: operator-bundle_3.x/739: Upstream sync done; /DS_CI/sync-to-downstream_3.x/1888 triggered |
Build 3.5 :: dsc_3.x/534: Console, Changes, Git Data |
Build 3.5 :: dsc_3.x/534: 3.5.0 CI |
* feat: configure workspace security context for container builds Fix eclipse-che/che#21770 Signed-off-by: Andrew Obuchowicz <[email protected]> * Set SCC allowPrivilegeEscalation to true when container build enabled (#1596) * Set SCC allowPrivilegeEscalation to true when container build enabled Running Podman inside a container in OpenShift requires the pod to have allowPrivilegeEscalation: true in its security context. * Fix tests Signed-off-by: Angel Misevski <[email protected]> * fix: set scc priority to null Signed-off-by: Anatolii Bazko <[email protected]> --------- Signed-off-by: Andrew Obuchowicz <[email protected]> Signed-off-by: Angel Misevski <[email protected]> Signed-off-by: Anatolii Bazko <[email protected]> Co-authored-by: Angel Misevski <[email protected]> Co-authored-by: Anatolii Bazko <[email protected]>
What does this PR do?
This PR allows the configuration of the DWOC's
progressTimeout
field from the Che Cluster CR'sspec.devEnvironments.startTimeoutSeconds
field.The
spec.devEnvironments.startTimeoutSeconds
field is aint32
pointer so that we can differentiate between when the field is unset (nil
, allowing the default value of 5 minutes to be used) and when a timeout of 0 seconds is desired.Note: This PR also includes the changes from #1549 for convenience. I can remove the commits from that PR if desired.
Screenshot/screencast of this PR
n/a
What issues does this PR fix or reference?
eclipse-che/che#21820
How to test this PR?
Tests were added for this PR.
To manually test:
build/scripts/olm/test-catalog-from-sources.sh
(for OpenShift)devEnvironments.startTimeout
field:kubectl edit checluster eclipse-che -n eclipse-che
Spec: (...) Dev Environments: Default Components: Container: Image: quay.io/devfile/universal-developer-image:ubi8-38da5c2 Source Mapping: /projects Name: universal-developer-image Default Editor: che-incubator/che-code/insiders Default Namespace: Auto Provision: true Template: <username>-che Disable Container Build Capabilities: true Seconds Of Inactivity Before Idling: 1800 Seconds Of Run Before Idling: -1 + startTimeoutSeconds: 420 #7 minutes Storage: Pvc Strategy: per-user Git Services: Networking: Auth: Gateway: Config Labels: App: che Component: che-gateway-config
config.workspace.progressTimeout
in the DWOC has the same value as thedevEnvironments.startTimeout
field from the Che Cluster CR:kubectl describe dwoc -n eclipse-che
Name: devworkspace-config Namespace: eclipse-che Labels: <none> Annotations: <none> API Version: controller.devfile.io/v1alpha1 Config: Workspace: + Progress Timeout: 420s (...)
devEnvironments.startTimeout
field from the Che Cluster CR:kubectl edit checluster eclipse-che -n eclipse-che
Spec: (...) Dev Environments: Default Components: Container: Image: quay.io/devfile/universal-developer-image:ubi8-38da5c2 Source Mapping: /projects Name: universal-developer-image Default Editor: che-incubator/che-code/insiders Default Namespace: Auto Provision: true Template: <username>-che Disable Container Build Capabilities: true Seconds Of Inactivity Before Idling: 1800 Seconds Of Run Before Idling: -1 - startTimeoutSeconds: 420s Storage: Pvc Strategy: per-user Git Services: Networking: Auth: Gateway: Config Labels: App: che Component: che-gateway-config
config.workspace.progressTimeout
from the DWOC is now gone:kubectl describe dwoc -n eclipse-che
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.