-
Notifications
You must be signed in to change notification settings - Fork 35
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
Bump github.com/gobuffalo/pop/v6 from 6.0.6 to 6.0.8 #9390
Bump github.com/gobuffalo/pop/v6 from 6.0.6 to 6.0.8 #9390
Conversation
f47861b
to
fb619dc
Compare
@dependabot rebase |
fb619dc
to
377fc15
Compare
377fc15
to
6badb4c
Compare
6badb4c
to
bd2ee59
Compare
bd2ee59
to
d78e907
Compare
@dependabot rebase |
d78e907
to
9f5d857
Compare
9c3c0a0
to
85900b2
Compare
@dependabot rebase |
Bumps [github.com/gobuffalo/pop/v6](https://github.com/gobuffalo/pop) from 6.0.6 to 6.0.8. - [Release notes](https://github.com/gobuffalo/pop/releases) - [Changelog](https://github.com/gobuffalo/pop/blob/main/.goreleaser.yml) - [Commits](gobuffalo/pop@v6.0.6...v6.0.8) --- updated-dependencies: - dependency-name: github.com/gobuffalo/pop/v6 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]>
85900b2
to
c68f931
Compare
It looks like our failing tests are due to this change in Pop 6.0.7. In a nutshell, in some tests, we were calling the I've added changes that hopefully prevent our second calls to |
pkg/testingsuite/pop_suite.go
Outdated
err := popConn.Close() | ||
if err != nil { | ||
log.Panic(err) | ||
if popConn.Store != nil { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since I don't know what may have happened leading up this Cleanup
call, I didn't see a way to prevent the panic here other than introspecting the Store
to see if it was nil
. If it's nil
, I'm assuming the connection has already been closed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've reworked this to handle it in a different way that involves changes to the offending test and closing a connection that leads to a panic. Hopefully a little cleaner.
@@ -687,7 +689,7 @@ func (suite *PopTestSuite) TearDown() { | |||
log.Panic(err) | |||
} | |||
} | |||
if suite.highPrivConn != nil { | |||
if suite.highPrivConn != nil && suite.highPrivConn != suite.lowPrivConn { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The problem here seemed to be that we had cases where the low and high privileged connections were the same. If that's the case, closing both would lead to two Close
calls on the same connection and therefore a panic in Pop 6.0.8.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm pretty sure the problem is that per test transactions cleanup themselves via a Cleanup callback. So I think the right fix is something like
// Remove the package DB if this isn't a per test transaction
if !suite.usePerTestTransaction {
if err := dropDB(suite.pgConn, (*suite.lowPrivConnDetails).Database); err != nil {
log.Panic(err)
}
// suite.pgConn will be closed by a suite.T().Cleanup function
// for per test transaction tests, so we only need to clean it
// up here for non transaction tests
err := suite.pgConn.Close()
if err != nil {
log.Panic(err)
}
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm confused about the above change/comment. Isn't the Cleanup function cleaning up a different connection (popConn
that's created on a DB()
call?) vs. the pgConn
here that's created on a NewPopTestSuite
call? Or are those actually the same connection?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is SUCH GOOD WORK. Thank you
Revert PR #9390 (upgrade to Pop 6.0.8)
Bumps github.com/gobuffalo/pop/v6 from 6.0.6 to 6.0.8.
Release notes
Sourced from github.com/gobuffalo/pop/v6's releases.
Commits
482c695
upgraded module dependencies8919b88
added or replaced stale issue closer with standard version5a179e7
updated README, SHOULDERS, and module dependencies9efb85f
prevent empty query to be executedd71c504
fixed concurrent map write issue on ConnectionDetails.Options (#577)902a7d1
fixed delete + where in issue on mysql (#699)9a26827
made 'version' colume as primary key to fix #659df9e1b2
made default logger to print output to stderr instead of stdoutb0c857d
fix Connection.Close() to reset the store98751a9
removed mysqldump option --column-statistics to make it compatibleDependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting
@dependabot rebase
.Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
@dependabot rebase
will rebase this PR@dependabot recreate
will recreate this PR, overwriting any edits that have been made to it@dependabot merge
will merge this PR after your CI passes on it@dependabot squash and merge
will squash and merge this PR after your CI passes on it@dependabot cancel merge
will cancel a previously requested merge and block automerging@dependabot reopen
will reopen this PR if it is closed@dependabot close
will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually@dependabot ignore this major version
will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this minor version
will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this dependency
will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)