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

Verify packages index with best checksum algorithm #2290

Merged

Conversation

agraul
Copy link
Member

@agraul agraul commented Jun 4, 2020

What does this PR change?

Iterating over checksum algorithms, the best that is available is used
to do the verification. It is not needed to repeat the checksum
verification with weaker algorithms afterwards.

GUI diff

No difference.

  • DONE

Documentation

  • No documentation needed: Just a bugfix

  • DONE

Test coverage

I am not sure if backend/common/test/test_repo.py is executed anywhere, I had to change the import path everywhere and only ran the test from a particular directory. I think it makes more sense to clean the execution up than commit my additional test as is.

  • DONE

Links

Fixes #2283

  • DONE

Changelogs

If you don't need a changelog check, please mark this checkbox:

  • No changelog needed

If you uncheck the checkbox after the PR is created, you will need to re-run changelog_test (see below)

Re-run a test

If you need to re-run a test, please mark the related checkbox, it will be unchecked automatically once it has re-run:

  • Re-run test "changelog_test"
  • Re-run test "backend_unittests_pgsql"
  • Re-run test "java_lint_checkstyle" (Test skipped, there are no changes to test)
  • Re-run test "java_pgsql_tests"
  • Re-run test "ruby_rubocop"
  • Re-run test "schema_migration_test_oracle"
  • Re-run test "schema_migration_test_pgsql"
  • Re-run test "susemanager_unittests"
  • Re-run test "javascript_lint"
  • Re-run test "spacecmd_unittests"

@agraul agraul force-pushed the packages-index-checksum-verification branch 4 times, most recently from b82cdba to d0dc6c2 Compare June 8, 2020 14:28
@agraul agraul marked this pull request as ready for review June 8, 2020 14:46
@agraul agraul requested review from brejoc, mcalmer and meaksh June 12, 2020 09:10
@agraul agraul force-pushed the packages-index-checksum-verification branch from d0dc6c2 to e5aa882 Compare June 12, 2020 09:47
Iterating over checksum algorithms, the best that is available is used
to do the verification. It is not needed to repeat the checksum
verification with weaker algorithms afterwards.

Fixes uyuni-project#2283
Raising this exception was removed in 536787d and the test now fails
100% of the time.
@agraul agraul force-pushed the packages-index-checksum-verification branch from e5aa882 to d8d04f0 Compare June 12, 2020 10:05
Copy link
Member

@meaksh meaksh 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 to me. Thanks 👍

@agraul
Copy link
Member Author

agraul commented Jun 12, 2020

I just did a manual test first without, then with this patch applied. In the "before" run I got the Plugin error: Package index checksum failure, in the "after" run I did not.

2020/06/12 14:42:28 +02:00 Command: ['/usr/bin/spacewalk-repo-sync', '--channel', 'debtest', '--type', 'deb']
2020/06/12 14:42:28 +02:00 Sync of channel started.
2020/06/12 14:42:29 +02:00 Plugin error: Package index checksum failure
2020/06/12 14:42:30 +02:00 Plugin error: Package index checksum failure
2020/06/12 14:44:30 +02:00 Command: ['/usr/bin/spacewalk-repo-sync', '--channel', 'debtest', '--type', 'deb']
2020/06/12 14:44:30 +02:00 Sync of channel started.
2020/06/12 14:44:35 +02:00 Repo URL: http://ftp.de.debian.org/debian/dists/buster/main/binary-amd64/
2020/06/12 14:44:35 +02:00     Packages in repo:             56873
2020/06/12 14:44:35 +02:00     No new packages to sync.
2020/06/12 14:44:35 +02:00 
2020/06/12 14:44:35 +02:00   Patches in repo: 0.
2020/06/12 14:44:36 +02:00 Repo URL: http://ftp.de.debian.org/debian/dists/buster-updates/main/binary-amd64/
2020/06/12 14:44:36 +02:00     Packages in repo:                52
2020/06/12 14:44:36 +02:00     No new packages to sync.
2020/06/12 14:44:36 +02:00 
2020/06/12 14:44:36 +02:00   Patches in repo: 0.
2020/06/12 14:44:36 +02:00 Sync completed.

Copy link
Contributor

@brejoc brejoc left a comment

Choose a reason for hiding this comment

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

👍

@juliogonzalez juliogonzalez merged commit b42a7f9 into uyuni-project:master Jun 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Package index checksum failure
5 participants