-
Notifications
You must be signed in to change notification settings - Fork 296
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
Fixes #36859 - Fix inconsistent repo publication #10776
Fixes #36859 - Fix inconsistent repo publication #10776
Conversation
This is not actually related to optimized vs. complete sync. Both types won't repair an affected repo without this change, unless there is new content in the upstream repo being synced. If there is no new content in the upstream, both types of sync will not create a new pulp repo version (full sync will simply take longer to not create a new repo version). And in both cases Katello will not republish if there is no new repo version. Only a "republish repository metadata" action can force a republish, which can currently only be achieved via hammer. |
d9c75c3
to
ee30afc
Compare
@@ -81,5 +81,24 @@ def test_save_new_version_from_lookup | |||
assert_equal task.output[:contents_changed], true | |||
assert_empty task.output[:updated_repositories] - [@repo1.id, @repo2.id] | |||
end | |||
|
|||
def test_save_version_with_outdated_publication |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this the correct file for the test?
I kinda doubt it, but it seemed to be the best fir without creating a new test-class 😇
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works for me!
ee30afc
to
3250cc7
Compare
463f2ed
to
e7de774
Compare
Can you please have a look at this @jeremylenz ? Any thoughts as we think, this should fix a pretty bad bug. |
Added a review card to our sprint, thanks! |
e7de774
to
500413b
Compare
For the benefit of any potential reviewers: Note that I put fairly detailed reproducer instructions on the accompanying issue: https://projects.theforeman.org/issues/36859 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the contribution! Just one bug found:
500413b
to
ea2c2fa
Compare
[test katello] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Working for me! I tested it by editing the publication_href
for a repository to a new one that I created. After syncing, the repository's publication_href
was returned to normal.
Fix repo not having correct publication due to e.g. killed pulp-publication task.
Or rather make sure next Optimized Sync will fix this, by identifying the inconsistency.