Skip to content

Create doctor command to fix repo_units broken by dumps from 1.14.3-1.14.6 #17136

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

Merged
merged 9 commits into from
Sep 27, 2021

Conversation

zeripath
Copy link
Contributor

@zeripath zeripath commented Sep 23, 2021

There was a serious issue with the gitea dump command in 1.14.3-1.14.6 which led to corruption of the config field of the repo_unit table.

This PR adds a doctor command to attempt to fix the broken repo_units. Users affected by #16961 should run:

gitea doctor --fix --run fix-broken-repo-units

Fix #16961
Fix #17297

Signed-off-by: Andrew Thornton [email protected]

Unfortunately a number of people appear to have been bitten by the bug in the dump
command.

This PR adds a doctor command to attempt to fix the broken repo_units

Fix go-gitea#16961

Signed-off-by: Andrew Thornton <[email protected]>
@zeripath zeripath added type/bug pr/wip This PR is not ready for review backport/v1.15 labels Sep 23, 2021
@zeripath zeripath added this to the 1.16.0 milestone Sep 23, 2021
@zeripath zeripath changed the title Add repounit fixer for #16961 WIP Add repounit fixer for #16961 Sep 23, 2021
zeripath added a commit to zeripath/gitea that referenced this pull request Sep 23, 2021
Backport go-gitea#17136

Unfortunately a number of people appear to have been bitten by the bug in the dump
command.

This PR adds a doctor command to attempt to fix the broken repo_units

Fix go-gitea#16961

Signed-off-by: Andrew Thornton <[email protected]>
Signed-off-by: Andrew Thornton <[email protected]>
Signed-off-by: Andrew Thornton <[email protected]>
Signed-off-by: Andrew Thornton <[email protected]>
@zeripath zeripath changed the title WIP Add repounit fixer for #16961 Create doctor command to fix repo_units broken by dumps from 1.14.3-1.14.6 Sep 27, 2021
@zeripath zeripath added the type/changelog Adds the changelog for a new Gitea version label Sep 27, 2021
Signed-off-by: Andrew Thornton <[email protected]>
@techknowlogick techknowlogick removed the pr/wip This PR is not ready for review label Sep 27, 2021
@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Sep 27, 2021
@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 Sep 27, 2021
@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 Sep 27, 2021
@codecov-commenter
Copy link

Codecov Report

❗ No coverage uploaded for pull request base (main@868e937). Click here to learn what that means.
The diff coverage is 37.91%.

Impacted file tree graph

@@           Coverage Diff           @@
##             main   #17136   +/-   ##
=======================================
  Coverage        ?   45.27%           
=======================================
  Files           ?      775           
  Lines           ?    87223           
  Branches        ?        0           
=======================================
  Hits            ?    39492           
  Misses          ?    41324           
  Partials        ?     6407           
Impacted Files Coverage Δ
models/helper.go 52.94% <0.00%> (ø)
models/repo_unit.go 84.52% <0.00%> (ø)
modules/doctor/fix16961.go 38.76% <38.76%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 868e937...33cb30b. Read the comment docs.

@zeripath
Copy link
Contributor Author

make lgtm work

@zeripath zeripath merged commit b5856c4 into go-gitea:main Sep 27, 2021
@zeripath zeripath deleted the fix-16961-add-doctor branch September 27, 2021 15:55
@zeripath zeripath added the backport/done All backports for this PR have been created label Sep 27, 2021
zeripath added a commit that referenced this pull request Sep 27, 2021
….14.6 (#17136) (#17137)

Backport #17136

There was a serious issue with the `gitea dump` command in 1.14.3-1.14.6 which led to corruption of the `config` field of the `repo_unit` table. 

This PR adds a doctor command to attempt to fix the broken repo_units. Users affected by #16961 should run:

```
gitea doctor --fix --run fix-broken-repo-units
```

Fix #16961

Signed-off-by: Andrew Thornton <[email protected]>
@go-gitea go-gitea locked and limited conversation to collaborators Apr 28, 2022
@delvh delvh removed the type/changelog Adds the changelog for a new Gitea version label Oct 7, 2023
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 lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. type/bug
Projects
None yet
6 participants