-
Notifications
You must be signed in to change notification settings - Fork 41
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
[WIP] update gorm and related libraries #1637
base: main
Are you sure you want to change the base?
[WIP] update gorm and related libraries #1637
Conversation
Can't wait for this update to land! Thanks @miguelsorianod @manstis for making this possible |
38bad7e
to
1487dbc
Compare
Some tests are still failing. Both kafka and connector ones. I observed the connector tests are still failing but let's wait until we update the gorm libraries to see if they still fail. |
1487dbc
to
5b17562
Compare
I updated the gorm and gorm postgres dependencies to the versions show below:
|
After performing the upgrades mentioned in #1637 (comment) the unit tests pass, the kafka integration tests also pass but the connectors tests fail. It seems all connectors tests are failing:
|
cc @manstis could you take a look? I suspect it might have to do with the migrations again as all the tests are failing with "unknown" state. |
@miguelsorianod I suspect it is caused by go-gorm/playground#571 Newer (latest) versions of |
@miguelsorianod I am doing some more investigations locally and will report back. |
Thanks 👍 |
I've made the applicable changes to my fork: manstis@57abdc7 You could include them in this PR and it should be OK. |
Can your changes be merged to main through a PR before this PR? or they depend on the changes of this PR being available? If not I will include the change as you said |
@miguelsorianod Since the changes are only required due to the |
It seems reasonable. I will add it into the PR. The authorship will be lost though. |
I have been able to keep the authorship by getting your fork's branch and cherry-picking the commit. Could you verify that the changes have been included correctly in this PR? |
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #1637 +/- ##
==========================================
- Coverage 82.26% 82.15% -0.11%
==========================================
Files 161 161
Lines 14989 15009 +20
==========================================
+ Hits 12330 12331 +1
- Misses 2223 2242 +19
Partials 436 436
Flags with carried forward coverage won't be shown. Click here to find out more.
|
All the checks are passing now. I will do a re-review and start planning the rollout of this changes for KAS Fleet Manager, as merging it will rollout those changes to KAS Fleet Manager Stage and Production. |
0157c5c
to
9217fb9
Compare
Bumps [gorm.io/driver/postgres](https://github.com/go-gorm/postgres) from 1.0.8 to 1.3.10. - [Release notes](https://github.com/go-gorm/postgres/releases) - [Commits](go-gorm/postgres@v1.0.8...v1.3.10) --- updated-dependencies: - dependency-name: gorm.io/driver/postgres dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]>
When updating gorm from 1.21.7 to 1.23.10 kafka migrations start to return an error: Could not migrate: ERROR: cached plan must not change result type (SQLSTATE 0A000) This error happens due to in the kafka migrations we perform database queries and schema table modifications in an interleaved way and prepared statements are cached. This leads scenarios where a specific table is queried and thus some prepared statements cached, then some table schemas are modified and then when queries are performed again against those queries are outdated cached prepared statements which causes the observed error. This behavior is likely a bug in gorm related to prepared statement caching due to only updating gorm minor version should not break changes. To workaround this for now this commit updates code to disable prepared statements during kafka migrations. This includes the kafka migrations when integration tests are run too. During serve command execution, for connectors migrations and for the integration tests (excluding the migrations part of them) the prepared statements are enabled being the behavior the same as before this change.
gorm.io/gorm has been updated to v1.24.1 gorm.io/driver/postgres has been updated to v1.4.5
the bug related to db prepared statements has been fixed on gorm.io/driver/postgres v1.4.5. We are now using that version so this reenables db prepared statements for kafka migrations
gorm.io/gorm has been updated to v1.24.3 gorm.io/driver/postgres has been updated to v1.4.6
gorm.io/gorm has been updated to v1.25.0 gorm.io/driver/postgres has been updated to v1.5.0
After gorm version update to 1.25.0 the Save method does not return values.
9217fb9
to
04641f3
Compare
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.
LGTM 👍
I've made the following manual tests in a development environment:
I am currently waiting for some midstream pipelines issues to be fixed. Once that is done I will proceed to merge this and release it to stage |
Description
Continuation of #1314. Full context there.
Verification Steps
Checklist (Definition of Done)