Skip to content

Fix bug on migration 111 #12736

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 4 commits into from
Sep 6, 2020
Merged

Conversation

lunny
Copy link
Member

@lunny lunny commented Sep 5, 2020

The sess.Begin have to be invoked if sess.Commit will be invoked.

From https://drone.gitea.io/go-gitea/gitea/29887/2/13

@lunny lunny added this to the 1.13.0 milestone Sep 5, 2020
@GiteaBot GiteaBot added the lgtm/need 1 This PR needs approval from one additional maintainer to be merged. label Sep 5, 2020
@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 5, 2020
@techknowlogick techknowlogick added the skip-changelog This PR is irrelevant for the (next) changelog, for example bug fixes for unreleased features. label Sep 6, 2020
@lunny lunny force-pushed the lunny/fix_migration_111 branch from 8ef0924 to df8ebc2 Compare September 6, 2020 03:18
@zeripath
Copy link
Contributor

zeripath commented Sep 6, 2020

Interesting pg is declaring a failed transaction on the 1.6.4 migration.

@codecov-commenter
Copy link

Codecov Report

Merging #12736 into master will increase coverage by 0.00%.
The diff coverage is 0.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master   #12736   +/-   ##
=======================================
  Coverage   43.40%   43.41%           
=======================================
  Files         648      648           
  Lines       71569    71581   +12     
=======================================
+ Hits        31067    31076    +9     
- Misses      35472    35479    +7     
+ Partials     5030     5026    -4     
Impacted Files Coverage Δ
models/migrations/v111.go 0.00% <0.00%> (ø)
modules/log/event.go 57.54% <0.00%> (-0.95%) ⬇️
services/pull/pull.go 42.72% <0.00%> (+1.15%) ⬆️
services/pull/temp_repo.go 29.78% <0.00%> (+3.19%) ⬆️
services/pull/update.go 57.69% <0.00%> (+5.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 1c35353...428c67a. Read the comment docs.

@lunny
Copy link
Member Author

lunny commented Sep 6, 2020

A blank transaction will cause failure on postgres. So we have to check update times before commit.

@lunny lunny merged commit 6590cac into go-gitea:master Sep 6, 2020
@lunny lunny deleted the lunny/fix_migration_111 branch September 6, 2020 08:54
@lunny lunny mentioned this pull request Sep 16, 2020
@lunny lunny added the backport/done All backports for this PR have been created label Sep 16, 2020
@go-gitea go-gitea locked and limited conversation to collaborators Nov 24, 2020
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. skip-changelog This PR is irrelevant for the (next) changelog, for example bug fixes for unreleased features. type/bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants