Skip to content
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

Avoid losing token when updating mirror settings (#30429) #30466

Merged
merged 2 commits into from
Apr 15, 2024

Conversation

lunny
Copy link
Member

@lunny lunny commented Apr 14, 2024

Fix #30416.
Backport #30429

Before (it shows as "Unset" while there's a token):

image

After:

image

The username shows as "oauth2" because of

u.User = url.UserPassword("oauth2", g.opts.AuthToken)

I have checked that all usage of MirrorRemoteAddress has been updated.

image

However, it needs to be checked again when backporting.

Fix go-gitea#30416.

Before (it shows as "Unset" while there's a token):

<img width="980" alt="image"
src="https://github.com/go-gitea/gitea/assets/9418365/d7148e3e-62c9-4d2e-942d-3d795b79515a">

After:

<img width="977" alt="image"
src="https://github.com/go-gitea/gitea/assets/9418365/24aaa1db-5baa-4204-9081-470b15ea72b5">

The username shows as "oauth2" because of
https://github.com/go-gitea/gitea/blob/f9fdac9809335729b2ac3227b2a5f71a62fc64ad/services/migrations/dump.go#L99

I have checked that all usage of `MirrorRemoteAddress` has been updated.

<img width="1806" alt="image"
src="https://github.com/go-gitea/gitea/assets/9418365/2f042501-2824-4511-9203-c84a6731a02d">

However, it needs to be checked again when backporting.

---------

Co-authored-by: Giteabot <teabot@gitea.io>
@lunny lunny added the type/bug label Apr 14, 2024
@lunny lunny added this to the 1.21.11 milestone Apr 14, 2024
@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Apr 14, 2024
@pull-request-size pull-request-size bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Apr 14, 2024
@github-actions github-actions bot added modifies/go Pull requests that update Go code modifies/templates This PR modifies the template files labels Apr 14, 2024
@GiteaBot GiteaBot added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels Apr 14, 2024
@wolfogre
Copy link
Member

However, it needs to be checked again when backporting.

I checked it and ensured that all usage of MirrorRemoteAddress has been updated.

image

@GiteaBot GiteaBot added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels Apr 15, 2024
@wxiaoguang
Copy link
Contributor

wxiaoguang commented Apr 15, 2024

Maybe we should drop 1.22-rc0 and 1.22 branch, and re-tag 1.22-rc1/1.22 branch from the current main branch.

I can see the 1.22-rc0 is problematic:

  1. It is never really published, it is still in "draft" status on GitHub.
  2. There are too many big changes in main branch, it would make it quite difficult to backport bug fixes for 1.22 in the future.

@lunny lunny added the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label Apr 15, 2024
@lunny lunny merged commit 430fe6c into go-gitea:release/v1.21 Apr 15, 2024
27 checks passed
@lunny lunny deleted the lunny/backport_30429 branch April 15, 2024 03:29
@GiteaBot GiteaBot removed the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label Apr 15, 2024
@go-gitea go-gitea locked as resolved and limited conversation to collaborators Jul 14, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. modifies/go Pull requests that update Go code modifies/templates This PR modifies the template files size/M Denotes a PR that changes 30-99 lines, ignoring generated files. type/bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants