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

Replace the call to hawkey with a call to DNF in repo sanity check #3198

Merged
merged 1 commit into from
May 1, 2019

Conversation

puiterwijk
Copy link
Contributor

libdnf/hawkey silently dropped the API we were using to do repo sanity checks.
So instead, let's just shell out to DNF and make it their problem.

Signed-off-by: Patrick Uiterwijk patrick@puiterwijk.org

@puiterwijk puiterwijk added Critical We can't go on living in this sqalor, drop everything and fix it! Tests Issues pertaining to Bodhi's tests labels Apr 30, 2019
@puiterwijk puiterwijk requested a review from a team as a code owner April 30, 2019 20:34
bodhi/server/util.py Outdated Show resolved Hide resolved
bodhi/server/util.py Outdated Show resolved Hide resolved
bodhi/server/util.py Outdated Show resolved Hide resolved
Copy link
Contributor

@bowlofeggs bowlofeggs left a comment

Choose a reason for hiding this comment

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

Sweet - looks good! I will squash and then let mergify do its thing. Thanks so much!

@puiterwijk puiterwijk force-pushed the dnf_hawkey branch 2 times, most recently from dd253d0 to 5b8f4f3 Compare April 30, 2019 21:18
Copy link
Contributor

@bowlofeggs bowlofeggs left a comment

Choose a reason for hiding this comment

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

Thanks so much!

@puiterwijk
Copy link
Contributor Author

The latest change adds the one missing line of diff cover, and fixes some flake8 errors.
I'm hopeful this'll pass CI.

libdnf/hawkey silently dropped the API we were using to do repo sanity checks.
So instead, let's just shell out to DNF and make it their problem.

Signed-off-by: Patrick Uiterwijk <patrick@puiterwijk.org>
@puiterwijk
Copy link
Contributor Author

Had forgotten to run flake8 over the test :).
Additionally, newline in docblock added.

dnf_args (list): A list of arguments after DNF is set up to use the repo under test.
Example would be ["search", "kernel"] or ["module", "list"].
Raises:
Exception: If the repodata is not valid or does not exist.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Actually, function is returning CalledProcessError

Copy link
Contributor Author

@puiterwijk puiterwijk May 1, 2019

Choose a reason for hiding this comment

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

For now that's the only option, yes. But I have plans to add more checks, which might return other exceptions.
And the current docblock is technically correct:

>>> issubclass(subprocess.CalledProcessError, Exception)
True

@puiterwijk puiterwijk added WIP Work in progress and removed WIP Work in progress labels May 1, 2019
@mergify mergify bot merged commit 7255a1c into fedora-infra:develop May 1, 2019
@bowlofeggs
Copy link
Contributor

This patch is planned for inclusion in the upcoming 4.0.0 release: #3221

@bowlofeggs
Copy link
Contributor

@puiterwijk puiterwijk deleted the dnf_hawkey branch May 21, 2019 22:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Critical We can't go on living in this sqalor, drop everything and fix it! Tests Issues pertaining to Bodhi's tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants