Skip to content

fix: always prefer personal access token over OAuth one - #1066

Merged
vinokurig merged 1 commit into
mainfrom
CRW-12749
Sep 21, 2026
Merged

vinokurig merged 1 commit into
mainfrom
CRW-12749

Conversation

@vinokurig

Copy link
Copy Markdown
Contributor

What does this PR do?

When both a personal access token and an OAuth token secret exist for the same SCM provider, the newest secret was used, so a freshly minted OAuth token shadowed the user configured PAT. OAuth tokens may be short-living, e.g. GitLab OAuth tokens expire in 2 hours, so the PAT with a longer expiration period has to be preferred.

Order the resolved tokens to put the personal access ones first and keep their secrets during the forced OAuth token refresh cleanup.

Screenshot/screencast of this PR

What issues does this PR fix or reference?

https://redhat.atlassian.net/browse/CRW-12749

How to test this PR?

N/A

PR Checklist

As the author of this Pull Request I made sure that:

Release Notes

Reviewers

Reviewers, please comment how you tested the PR when approving it.

When both a personal access token and an OAuth token secret exist for the
same SCM provider, the newest secret was used, so a freshly minted OAuth
token shadowed the user configured PAT. OAuth tokens may be short-living,
e.g. GitLab OAuth tokens expire in 2 hours, so the PAT with a longer
expiration period has to be preferred.

Order the resolved tokens to put the personal access ones first and keep
their secrets during the forced OAuth token refresh cleanup.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown

Docker image build succeeded: quay.io/eclipse/che-server:pr-1066

kubectl patch command
kubectl patch -n eclipse-che "checluster/eclipse-che" --type=json -p="[{"op": "replace", "path": "/spec/components/cheServer/deployment", "value": {containers: [{image: "quay.io/eclipse/che-server:pr-1066", name: che}]}}]"

@svor svor left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@openshift-ci

openshift-ci Bot commented Sep 17, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: svor, vinokurig

The full list of commands accepted by this bot can be found 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

@svor

svor commented Sep 17, 2026

Copy link
Copy Markdown
Contributor

/retest

5 similar comments
@svor

svor commented Sep 17, 2026

Copy link
Copy Markdown
Contributor

/retest

@svor

svor commented Sep 18, 2026

Copy link
Copy Markdown
Contributor

/retest

@svor

svor commented Sep 18, 2026

Copy link
Copy Markdown
Contributor

/retest

@svor

svor commented Sep 18, 2026

Copy link
Copy Markdown
Contributor

/retest

@svor

svor commented Sep 18, 2026

Copy link
Copy Markdown
Contributor

/retest

@vinokurig
vinokurig merged commit f1b2f32 into main Sep 21, 2026
29 checks passed
@vinokurig
vinokurig deleted the CRW-12749 branch September 21, 2026 06:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants