-
Notifications
You must be signed in to change notification settings - Fork 106
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
Actually store latest known version cursor #873
Actually store latest known version cursor #873
Conversation
Codecov Report
@@ Coverage Diff @@
## master #873 +/- ##
==========================================
+ Coverage 97.32% 97.32% +<.01%
==========================================
Files 61 61
Lines 3696 3697 +1
Branches 498 499 +1
==========================================
+ Hits 3597 3598 +1
Misses 58 58
Partials 41 41
Continue to review full report at Codecov.
|
Hang on, aside from the news file I need to figure out what the issue with coverage is here. |
c743991
to
cefecea
Compare
Could you squash the commits, when you think this is ready for merge? |
Signed-off-by: Nils Philippsen <[email protected]>
cefecea
to
584e355
Compare
Of course. |
584e355
to
bdfec9f
Compare
And this is it with the commits squashed, except the one fixing an unrelated typo. |
bdfec9f
to
9b612dc
Compare
This pull request introduces 1 alert when merging 9b612dc into 4d9036b - view on LGTM.com new alerts:
|
Unit tests only help if you test all involved units. ;) Additionally: - Rename Project.latest_known_cursor to latest_version_cursor. This makes it more obvious that the latest version and cursor belong together. - Improve GitHub JSON tests - split up test_parse_json() and reuse test project between them - add missing cursor info to response - use .assertRaises as a context manager - Fail if cursor is missing from GitHub API response. With the GraphQL API, responses are guaranteed to contain all the queried fields. Previously, we worked around it missing because we had old mock data from before it was introduced. Since we refreshed the mock data, we can be more strict about what to expect as responses. - Make dropping column work on SQLite with previous migration script. SQLite doesn't support dropping columns, so use Alembic's batch operation to recreate the table with the column dropped. See https://alembic.sqlalchemy.org/en/latest/batch.html for details. - Rename the news file to refer to the right PR Fixes: fedora-infra#589 Signed-off-by: Nils Philippsen <[email protected]>
9b612dc
to
f772911
Compare
That's what I get for committing without running flake8 myself, sorry. 😉 |
Yeah, it's good to have it in tests |
This is a little embarassing but #863 doesn't really store the latest known cursor because of a bug in
check_project_release()
. Additionally to fixing this, improve the GitHub tests and migration script and be a little more strict about accepted API responses.