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

Remove sub-path from container registry realm #31293

Merged
merged 3 commits into from
Jun 9, 2024

Conversation

wxiaoguang
Copy link
Contributor

Container registry requires that the "/v2" must be in the root, so the sub-path in AppURL should be removed

@wxiaoguang wxiaoguang added type/bug backport/v1.22 This PR should be backported to Gitea 1.22 labels Jun 7, 2024
@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Jun 7, 2024
@pull-request-size pull-request-size bot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Jun 7, 2024
@github-actions github-actions bot added modifies/api This PR adds API routes or modifies them modifies/go Pull requests that update Go code labels Jun 7, 2024
@wxiaoguang wxiaoguang force-pushed the fix-container-sub-path branch from 9628d99 to 29d15f3 Compare June 7, 2024 15:31
@KN4CK3R
Copy link
Member

KN4CK3R commented Jun 7, 2024

Could you remove

appURL, _ := url.Parse(AppURL)
Packages.RegistryHost = appURL.Host
too? That should use the new logic too (maybe with a new GuessCurrentHost(ctx) method?).

@wxiaoguang
Copy link
Contributor Author

It seems that RegistryHost is for display-only purpose. So I guess we can leave it as-is? To remove the RegistryHost, it needs to touch much more code, at the moment I don't have enough time to fully test them ....

image

@KN4CK3R
Copy link
Member

KN4CK3R commented Jun 7, 2024

Fine for me 👍

@pull-request-size pull-request-size bot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Jun 7, 2024
@wxiaoguang
Copy link
Contributor Author

Fine for me 👍

Managed to remove the RegistryHost in a62ec02 (not really tested ....)

@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 Jun 7, 2024
@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 Jun 9, 2024
@lunny lunny added the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label Jun 9, 2024
@lunny lunny merged commit 6106a61 into go-gitea:main Jun 9, 2024
26 checks passed
@GiteaBot GiteaBot added this to the 1.23.0 milestone Jun 9, 2024
@GiteaBot GiteaBot removed the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label Jun 9, 2024
@wxiaoguang wxiaoguang deleted the fix-container-sub-path branch June 9, 2024 11:31
GiteaBot pushed a commit to GiteaBot/gitea that referenced this pull request Jun 10, 2024
Container registry requires that the "/v2" must be in the root, so the
sub-path in AppURL should be removed
@GiteaBot GiteaBot added the backport/done All backports for this PR have been created label Jun 10, 2024
wxiaoguang added a commit that referenced this pull request Jun 10, 2024
Backport #31293 by wxiaoguang

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
zjjhot added a commit to zjjhot/gitea that referenced this pull request Jun 11, 2024
* giteaofficial/main:
  Fix line number width in code preview (go-gitea#31307)
  Delete legacy cookie before setting new cookie (go-gitea#31306)
  [skip ci] Updated translations via Crowdin
  Use `querySelector` over alternative DOM methods (go-gitea#31280)
  Remove jQuery `.text()` (go-gitea#30506)
  [skip ci] Updated translations via Crowdin
  Remove sub-path from container registry realm (go-gitea#31293)
  Fix some URLs whose sub-path is missing (go-gitea#31289)
@go-gitea go-gitea locked as resolved and limited conversation to collaborators Sep 7, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
backport/done All backports for this PR have been created backport/v1.22 This PR should be backported to Gitea 1.22 lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. modifies/api This PR adds API routes or modifies them modifies/go Pull requests that update Go code 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.

4 participants