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

Switch to alembic for database migrations #6224

Merged
merged 7 commits into from Sep 9, 2021
Merged

Conversation

p12tic
Copy link
Member

@p12tic p12tic commented Sep 7, 2021

The sqlalchemy-migrate package has been unmaintained for quite some time. This eventually caught up with us - since setuptools 58 one of the dependencies of sqlalchemy-migrate fails to build (see #6222).

This PR replaces the DB migration infrastructure from sqlalchemy-migrate to alembic.

Fixes #6222.
Fixes #5872.

Contributor Checklist:

  • I have updated the unit tests
  • I have created a file in the master/buildbot/newsfragments directory (and read the README.txt in that directory)
  • I have updated the appropriate documentation

@p12tic p12tic force-pushed the alembic branch 4 times, most recently from 35a1673 to 4b0b718 Compare September 7, 2021 19:33
master/setup.py Show resolved Hide resolved
master/buildbot/db/model.py Show resolved Hide resolved
master/buildbot/db/model.py Show resolved Hide resolved
master/setup.py Outdated Show resolved Hide resolved
@p12tic p12tic force-pushed the alembic branch 4 times, most recently from 6a656b2 to a68f70f Compare September 8, 2021 09:35
@rjarry
Copy link
Contributor

rjarry commented Sep 8, 2021

Could you merge #6223 and rebase your alembic branch to eliminate other 2to3 errors ?

@p12tic p12tic force-pushed the alembic branch 2 times, most recently from bc00d42 to d82e64c Compare September 8, 2021 20:52
@p12tic
Copy link
Member Author

p12tic commented Sep 8, 2021

@rjarry This PR should be good to go.

@codecov
Copy link

codecov bot commented Sep 8, 2021

Codecov Report

Merging #6224 (3f6f95b) into master (2f3ea03) will decrease coverage by 0.04%.
The diff coverage is 91.66%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #6224      +/-   ##
==========================================
- Coverage   91.93%   91.89%   -0.05%     
==========================================
  Files         349      331      -18     
  Lines       37587    37133     -454     
==========================================
- Hits        34555    34122     -433     
+ Misses       3032     3011      -21     
Impacted Files Coverage Δ
master/buildbot/db/enginestrategy.py 75.60% <ø> (+2.94%) ⬆️
master/buildbot/db/model.py 95.18% <90.76%> (+3.12%) ⬆️
master/buildbot/db/connector.py 100.00% <100.00%> (ø)
...rations/versions/059_2021-09-07_alembic_initial.py 100.00% <100.00%> (ø)
master/buildbot/util/sautils.py 80.48% <0.00%> (-12.20%) ⬇️
master/buildbot/util/queue.py 96.51% <0.00%> (+5.81%) ⬆️

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 2f3ea03...3f6f95b. Read the comment docs.

Copy link
Member

@tardyp tardyp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good! I think there is a small mistake with 0.8 exception

master/buildbot/db/model.py Show resolved Hide resolved
@p12tic p12tic merged commit 02caa34 into buildbot:master Sep 9, 2021
@p12tic p12tic deleted the alembic branch September 9, 2021 09:26
@rjarry
Copy link
Contributor

rjarry commented Sep 9, 2021

Thanks @p12tic 👍

archlinux-github pushed a commit to archlinux/svntogit-community that referenced this pull request Oct 29, 2021
New dependencies:
* python-hvac: buildbot/buildbot#6058

Removed dependencies:
* python-sphinxcontrib-blockdiag: buildbot/buildbot#6223

Changed dependencies:
* python-sqlalchemy-migrate -> python-alembic: buildbot/buildbot#6224
* python-graphql-core is now a runtime dependency: buildbot/buildbot#5980

Other changes:
* Some hacks for Windows service files are upstreamed in buildbot/buildbot#6178


git-svn-id: file:///srv/repos/svn-community/svn@1034915 9fca08f4-af9d-4005-b8df-a31f2cc04f65
archlinux-github pushed a commit to archlinux/svntogit-community that referenced this pull request Oct 29, 2021
New dependencies:
* python-hvac: buildbot/buildbot#6058

Removed dependencies:
* python-sphinxcontrib-blockdiag: buildbot/buildbot#6223

Changed dependencies:
* python-sqlalchemy-migrate -> python-alembic: buildbot/buildbot#6224
* python-graphql-core is now a runtime dependency: buildbot/buildbot#5980

Other changes:
* Some hacks for Windows service files are upstreamed in buildbot/buildbot#6178

git-svn-id: file:///srv/repos/svn-community/svn@1034915 9fca08f4-af9d-4005-b8df-a31f2cc04f65
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cannot install with setuptools 58 Migrate to alembic for database migrations
3 participants