che-server
che-server copied to clipboard
Remove redundan PATs on refresh mode
What does this PR do?
Iterate over personal access token secrets on refresh function. Remove outdated token secrets except the latest refreshed token secret.
Screenshot/screencast of this PR
What issues does this PR fix or reference?
fixes https://github.com/eclipse-che/che/issues/23027
How to test this PR?
- Deploy che with the pr image:
quay.io/eclipse/che-server:pr- - Configure gitlab oauth
- Apply refresh mode
- Start a workspace from gitlab repository with a devfile.
- Go to Dashboard user preferences -> personal access tokens
- See: only one personal access token item is present in the list
PR Checklist
As the author of this Pull Request I made sure that:
- [x] The Eclipse Contributor Agreement is valid
- [x] Code produced is complete
- [x] Code builds without errors
- [x] Tests are covering the bugfix
- [ ] The repository devfile is up to date and works
- [ ] Sections
What issues does this PR fix or referenceandHow to test this PRcompleted - [ ] Relevant user documentation updated
- [ ] Relevant contributing documentation updated
- [ ] CI/CD changes implemented, documented and communicated
Reviewers
Reviewers, please comment how you tested the PR when approving it.
/retest
The tests on ci-openshift are fail with an error like this:
INFO[2024-07-19T08:48:41Z] Running step bitbucket-no-pat-oauth-flow-ipi-conf.
INFO[2024-07-19T08:48:41Z] Step phase pre failed after 0s.
There is some an infrastructure problem.
/retest
The gitlab-with-oauth-setup-flow test is fail by another infrastructure problem:
level=info msg=Creating infrastructure resources...
level=error
level=error msg=Error: creating EC2 VPC Endpoint (com.amazonaws.us-west-1.s3): VpcEndpointLimitExceeded: The maximum number of VPC endpoints has been reached.
level=error msg= status code: 400, request id: 4994f22a-87bd-43d9-b0f8-189b45686ca5
Need to rerun it. The rest of ci-openshift tests are success.
/retest
Verified on Eclipse Che with quay.io/eclipse/che-server:pr-703 - the functionality works properly.
Waiting for restart gitlab-with-oauth-setup-flow test till approving.
[APPROVALNOTIFIER] This PR is NOT APPROVED
This pull-request has been approved by: artaleks9, ibuziuk, vinokurig
The full list of commands accepted by this bot can be found here.
Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment
Build 3.16 :: server_3.x/347: Console, Changes, Git Data
Build 3.16 :: sync-to-downstream_3.x/7294: Console, Changes, Git Data
Build 3.16 :: push-latest-container-to-quay_3.x/4770: Console, Changes, Git Data
Build 3.16 :: get-sources-rhpkg-container-build_3.x/7273:
server : 3.x :: Build 62824633 : quay.io/devspaces/server-rhel8:3.16-7
SUCCESS; copied to quay; /DS_CI/push-latest-container-to-quay_3.x/4770 triggered
Build 3.16 :: update-digests_3.x/7117: Console, Changes, Git Data
Build 3.16 :: operator-bundle_3.x/3350: Console, Changes, Git Data
Build 3.16 :: sync-to-downstream_3.x/7295: Console, Changes, Git Data
Build 3.16 :: push-latest-container-to-quay_3.x/4771: Console, Changes, Git Data
Build 3.16 :: copyIIBsToQuay/2708: Console, Changes, Git Data
Build 3.16 :: get-sources-rhpkg-container-build_3.x/7274:
devspaces-operator-bundle : 3.x :: Build 62825371 : quay.io/devspaces/devspaces-operator-bundle:3.16-4
SUCCESS; copied to quay; /DS_CI/push-latest-container-to-quay_3.x/4771 triggered;Bundle CSV related images:
- quay.io/devspaces/code-rhel8:3.16-13
- quay.io/devspaces/configbump-rhel8:3.16-2
- quay.io/devspaces/dashboard-rhel8:3.16-8
- quay.io/devspaces/devfileregistry-rhel8:3.16-40
- quay.io/devspaces/devspaces-rhel8-operator:3.16-2
- quay.io/devspaces/idea-rhel8:3.16-1
- quay.io/devspaces/pluginregistry-rhel8:3.16-7
- quay.io/devspaces/server-rhel8:3.16-7
- quay.io/devspaces/traefik-rhel8:3.16-1
- quay.io/devspaces/udi-rhel8:3.16-1
= registry.redhat.io/openshift4/ose-kube-rbac-proxy:v4.12.0-202406190905.p0.gb17014f.assembly.stream.el8
= registry.redhat.io/openshift4/ose-oauth-proxy:v4.12.0-202406190905.p0.g03e5b13.assembly.stream.el8
= registry.redhat.io/rhscl/mongodb-36-rhel7:1-50
= registry.redhat.io/ubi8/ubi-minimal:8.8-1072.1697626218
Build 3.16 :: sync-to-downstream_3.x/7295:
Build container: devspaces-operator-bundle synced; /DS_CI/get-sources-rhpkg-container-build_3.x/7274 triggered; /job/DS_CI/job/dsc_3.x triggered;
Build 3.16 :: operator-bundle_3.x/3350:
Upstream sync done; /DS_CI/sync-to-downstream_3.x/7295 triggered
Build 3.16 :: update-digests_3.x/7117:
Detected new images: rebuild operator-bundle
* server; /DS_CI/operator-bundle_3.x/3350 triggered
Build 3.16 :: dsc_3.x/1947: Console, Changes, Git Data