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

Createdb.py fixes #817

Merged
merged 5 commits into from
Aug 27, 2019
Merged

Conversation

vfazio
Copy link
Contributor

@vfazio vfazio commented Aug 26, 2019

Fix createdb.py so that it creates the proper tables, including the social_auth tables. Stamp the alembic revision head if a config is provided.

Drop the old DB init code as it's stale.

vfazio added 3 commits August 26, 2019 08:41
Completely rewrite the createdb.py script to create all of the proper
schema necessary to get an instance up and running.

This will correctly generate the social_auth tables and stamp the
alembic version if an alembic config is specified.

Signed-off-by: Vincent Fazio <[email protected]>
Previously, if the Anitya package was installed, alembic would use the
package's migration script path for creating a revision. This would also
fail since the revision mako script was not included in the package's
manifest.

Alembic will now use the local migration path.

Signed-off-by: Vincent Fazio <[email protected]>
The database init code in lib/utilities was deprecated in 0.12. The only
user of it was createdb.py and that has now been rewritten completely.

Signed-off-by: Vincent Fazio <[email protected]>
@Zlopez
Copy link
Contributor

Zlopez commented Aug 26, 2019

This pull request introduces 5 alerts when merging f657aa3 into f9ceae3 - view on LGTM.com

new alerts:

  • 5 for Unused import

Warning - Automated code review for release-monitoring/anitya will be disabled on October 1, 2019. You can avoid this by installing the LGTM.com GitHub App. Read about the benefits of migrating to GitHub Apps in the blog.


Comment posted by LGTM.com

@Zlopez
Copy link
Contributor

Zlopez commented Aug 26, 2019

This pull request fixes 1 alert when merging 5096f3a into f9ceae3 - view on LGTM.com

fixed alerts:

  • 1 for Module is imported with 'import' and 'import from'

Warning - Automated code review for release-monitoring/anitya will be disabled on October 1, 2019. You can avoid this by installing the LGTM.com GitHub App. Read about the benefits of migrating to GitHub Apps in the blog.


Comment posted by LGTM.com

Signed-off-by: Vincent Fazio <[email protected]>
@vfazio vfazio force-pushed the vfazio-createdb-fixes branch from 5096f3a to 1593835 Compare August 26, 2019 17:53
@Zlopez
Copy link
Contributor

Zlopez commented Aug 26, 2019

This pull request fixes 1 alert when merging 1593835 into f9ceae3 - view on LGTM.com

fixed alerts:

  • 1 for Module is imported with 'import' and 'import from'

Warning - Automated code review for release-monitoring/anitya will be disabled on October 1, 2019. You can avoid this by installing the LGTM.com GitHub App. Read about the benefits of migrating to GitHub Apps in the blog.


Comment posted by LGTM.com

Copy link
Contributor

@Zlopez Zlopez 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, but could you add News file?

You can look here to see how.

Signed-off-by: Vincent Fazio <[email protected]>
@codecov-io
Copy link

codecov-io commented Aug 27, 2019

Codecov Report

Merging #817 into master will decrease coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #817      +/-   ##
==========================================
- Coverage   97.24%   97.24%   -0.01%     
==========================================
  Files          61       61              
  Lines        3635     3631       -4     
  Branches      485      485              
==========================================
- Hits         3535     3531       -4     
  Misses         60       60              
  Partials       40       40
Impacted Files Coverage Δ
anitya/lib/utilities.py 94.32% <100%> (-0.1%) ⬇️

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 f9ceae3...4ab5b84. Read the comment docs.

@Zlopez
Copy link
Contributor

Zlopez commented Aug 27, 2019

Thanks for the contribution 👍

@vfazio
Copy link
Contributor Author

vfazio commented Aug 27, 2019

This should help with #798 a bit I think

@mergify mergify bot merged commit 1eb5b9c into fedora-infra:master Aug 27, 2019
@vfazio vfazio deleted the vfazio-createdb-fixes branch August 27, 2019 13:57
@Zlopez
Copy link
Contributor

Zlopez commented Aug 27, 2019

This pull request fixes 1 alert when merging 4ab5b84 into f9ceae3 - view on LGTM.com

fixed alerts:

  • 1 for Module is imported with 'import' and 'import from'

Warning - Automated code review for release-monitoring/anitya will be disabled on October 1, 2019. You can avoid this by installing the LGTM.com GitHub App. Read about the benefits of migrating to GitHub Apps in the blog.


Comment posted by LGTM.com

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.

3 participants