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

HMS-5202: don't always rerun failed snaps #928

Merged
merged 1 commit into from
Dec 20, 2024

Conversation

jlsherrill
Copy link
Member

@jlsherrill jlsherrill commented Dec 20, 2024

Summary

After some investigation it was discovered that currently all failed snapshots are being re-run every hour. This results in no 'extra' repos being synced. This change results in failed snapshots only being re-run every day.

This also fixes a couple of things, such as sorting by finished_at (instead of queued_at), and re-snapshotting every 25 hours instead of 24 (need to subtract one from the query)

Testing steps

  1. Create 3 repos with snapshotting, two that are real and one that isn't:

https://fixtures.pulpproject.org/rpm-unsigned/
https://jlsherrill.fedorapeople.org/fake-repos/needed-errata/
https://redhat.com/notarepo

  1. on main, run go run cmd/external-repos/main.go nightly-jobs 24

for consistentcy do not re-run it until snapshots are done
everytime you run it, you'll see one snapshot get run and its always the same one, the one that failed

  1. re run go run cmd/external-repos/main.go nightly-jobs 24 on this PR,
    now everytime you run it, you'll get a different one of the repos which should alternate between all 3:

i added some logging to make this easier to see: enqueued snapshot for repository config 147df40e-e1be-40a5-bcb2-726b6e63818c

@jlsherrill
Copy link
Member Author

[test]

@jlsherrill
Copy link
Member Author

Copy link
Contributor

@rverdile rverdile 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!

@jlsherrill
Copy link
Member Author

This actually doesn't require qe

@jlsherrill jlsherrill merged commit c3e479f into content-services:main Dec 20, 2024
12 of 13 checks passed
@jlsherrill jlsherrill deleted the 5202 branch December 20, 2024 19:19
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.

2 participants