Skip to content

Sort automount configmaps and secrets to ensure deterministic ordering#1578

Open
dkwon17 wants to merge 2 commits intodevfile:mainfrom
dkwon17:fix-automount-sort
Open

Sort automount configmaps and secrets to ensure deterministic ordering#1578
dkwon17 wants to merge 2 commits intodevfile:mainfrom
dkwon17:fix-automount-sort

Conversation

@dkwon17
Copy link
Collaborator

@dkwon17 dkwon17 commented Jan 30, 2026

What does this PR do?

Sorts automount configmaps and secrets so that they are ordered the same way for each devworkspace reconciliation. Sorting is done, since otherwise, there is no guarantee on the configmap/secret ordering returned by api.Client.List. This can cause the ordering to differ between DevWorkspace reconciliations, causing the problem described in #1572 (comment).

A similar change was made in the past with git credentials: e17e799.

In this PR, we apply the same idea to the automount secrets and configmaps.

What issues does this PR fix or reference?

#1572 (comment)

Is it tested? How?

It can be tested by running:

git clone https://github.com/dkwon17/test-automount-ordering
cd test-automount-ordering
./create-secrets.sh
./test-ordering.sh
./cleanup.sh

The output should include:

✅ CONFIRMED: Volumes are sorted alphabetically (fix is working!)

PR Checklist

  • E2E tests pass (when PR is ready, comment /test v8-devworkspace-operator-e2e, v8-che-happy-path to trigger)
    • v8-devworkspace-operator-e2e: DevWorkspace e2e test
    • v8-che-happy-path: Happy path for verification integration with Che

Signed-off-by: David Kwon <dakwon@redhat.com>
@dkwon17
Copy link
Collaborator Author

dkwon17 commented Jan 30, 2026

I plan to create e2e tests for this PR, in a new commit

@dkwon17
Copy link
Collaborator Author

dkwon17 commented Jan 30, 2026

/retest

@rohanKanojia
Copy link
Member

I tested with the abovementioned steps and PR seems to be working as expected ✔️

Signed-off-by: David Kwon <dakwon@redhat.com>
Assisted-by: Claude
@openshift-ci openshift-ci bot removed the lgtm label Jan 30, 2026
@dkwon17
Copy link
Collaborator Author

dkwon17 commented Feb 2, 2026

/retest

@openshift-ci
Copy link

openshift-ci bot commented Feb 2, 2026

@dkwon17: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/v14-che-happy-path 3913464 link true /test v14-che-happy-path

Full PR test history. Your PR dashboard.

Details

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. I understand the commands that are listed here.

@openshift-ci
Copy link

openshift-ci bot commented Feb 3, 2026

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: akurinnoy, dkwon17, rohanKanojia

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants