Conversation
Signed-off-by: Anatolii Bazko <abazko@redhat.com>
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: tolusha The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
There was a problem hiding this comment.
Pull Request Overview
This PR ensures that the dev-workspace-container-build CRB is synced on every reconcile loop. Key changes include:
- Replacing ServiceAccount objects with Pod objects in tests to simulate the devworkspace operator.
- Updating logic in getDevWorkspaceServiceAccountNamespace to list pods by labels.
- Adding new constants for controller and operator names.
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| pkg/deploy/container-build/container_build_test.go | Changed tests to use Pod instead of ServiceAccount with updated labels and spec. |
| pkg/deploy/container-build/container_build.go | Updated getDevWorkspaceServiceAccountNamespace to select pods using labels. |
| pkg/common/constants/constants.go | Added new constants for DevWorkspaceControllerName and DevWorkspaceOperatorName. |
| @@ -33,17 +33,24 @@ import ( | |||
| ) | |||
|
|
|||
| func TestContainerBuildReconciler(t *testing.T) { | |||
There was a problem hiding this comment.
Ensure that using a Pod to simulate the devworkspace operator in tests is intentional and documented, as this differs from the usual ServiceAccount object usage.
| func TestContainerBuildReconciler(t *testing.T) { | |
| func TestContainerBuildReconciler(t *testing.T) { | |
| // The following Pod is used to simulate the devworkspace operator in this test. | |
| // This approach is intentional to test specific behaviors related to Pod-based | |
| // configurations. Normally, a ServiceAccount would be used in production scenarios. |
| } | ||
|
|
||
| for _, pod := range pods.Items { | ||
| if pod.Spec.ServiceAccountName == constants.DevWorkspaceServiceAccountName { |
There was a problem hiding this comment.
Document that this function returns the namespace of the first matching pod, and consider whether multiple matches should be handled or clarified in the function's behavior.
|
Build 3.22 :: operator_3.x/462: Console, Changes, Git Data |
|
Build 3.22 :: sync-to-downstream_3.x/9345: Console, Changes, Git Data |
|
Build 3.22 :: push-latest-container-to-quay_3.x/5187: Console, Changes, Git Data |
|
Build 3.22 :: get-sources-rhpkg-container-build_3.x/9492: devspaces-operator : 3.x :: Build 67774073 : quay.io/devspaces/devspaces-rhel9-operator:3.22-4 |
|
Build 3.22 :: update-digests_3.x/9302: Console, Changes, Git Data |
|
Build 3.22 :: operator_3.x/462: Upstream sync done; /DS_CI/sync-to-downstream_3.x/9345 triggered |
|
Build 3.22 :: operator-bundle_3.x/4917: Console, Changes, Git Data |
|
Build 3.22 :: sync-to-downstream_3.x/9346: Console, Changes, Git Data |
|
Build 3.22 :: push-latest-container-to-quay_3.x/5188: Console, Changes, Git Data |
|
Build 3.22 :: sync-to-downstream_3.x/9346: Build container: devspaces-operator-bundle synced; /DS_CI/get-sources-rhpkg-container-build_3.x/9493 triggered; /job/DS_CI/job/dsc_3.x triggered; |
|
Build 3.22 :: operator-bundle_3.x/4917: Upstream sync done; /DS_CI/sync-to-downstream_3.x/9346 triggered |
|
Build 3.22 :: copyIIBsToQuay/3005: Console, Changes, Git Data |
|
Build 3.22 :: dsc_3.x/2063: Console, Changes, Git Data |
|
Build 3.22 :: update-digests_3.x/9302: Detected new images: rebuild operator-bundle |
|
Build 3.22 :: dsc_3.x/2063: 3.22.0-CI |
|
Build 3.22 :: operator-bundle_3.x/4918: Console, Changes, Git Data |
|
Build 3.22 :: sync-to-downstream_3.x/9349: Console, Changes, Git Data |
|
Build 3.22 :: push-latest-container-to-quay_3.x/5190: Console, Changes, Git Data |
|
Build 3.22 :: copyIIBsToQuay/3006: Console, Changes, Git Data |
|
Build 3.22 :: sync-to-downstream_3.x/9349: Build container: devspaces-operator-bundle synced; /DS_CI/get-sources-rhpkg-container-build_3.x/9496 triggered; /job/DS_CI/job/dsc_3.x triggered; |
|
Build 3.22 :: operator-bundle_3.x/4918: Upstream sync done; /DS_CI/sync-to-downstream_3.x/9349 triggered |
|
Build 3.22 :: dsc_3.x/2064: Console, Changes, Git Data |
|
Build 3.22 :: dsc_3.x/2064: 3.22.0-CI |
What does this PR do?
snc dev-workspace-container-build CRB on every reconcile loop
Screenshot/screencast of this PR
N/A
What issues does this PR fix or reference?
eclipse-che/che#23400
How to test this PR?
OpenShift
on Minikube
PR Checklist
As the author of this Pull Request I made sure that:
What issues does this PR fix or referenceandHow to test this PRcompletedReviewers
Reviewers, please comment how you tested the PR when approving it.