-
Notifications
You must be signed in to change notification settings - Fork 13
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
Allow running repoclosure based on a URL and dist #362
Conversation
34e93a2
to
6a224bb
Compare
@evgeni Take a look when you can |
So I am trying to wrap my head around "why do we need to introduce new args". The URL makes sense -- it changes on every scratch build, and that is the one we wanna check. |
tests/test_functional.py
Outdated
"--check downloaded_rpms", | ||
"--check check_repo", | ||
"--repofrompath=check_repo,https://test.example.com/myrepo", |
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.
this looks weird where we tell to --check
two repos, but only really define one of them. I know it works, but still.
Is there ever a case where we want both the remote repo and "downloaded rpms" be checked together?
Otherwise we could call both repos something like check_repo
and only pass --check
once?
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.
It is sort of ugly and tricky due to how much if/else checking and construction has to happen. For example, constructing this variable (https://github.com/theforeman/obal/pull/362/files#diff-1f4bf62d8dfa1c838d5fae334e87225b942dc26f92086eb2ab754cbe77237a24R4). Honestly, I feel like the whole role needs an overhaul and introduction of a module to handle things cleanly and do the logic more cleanly inside python code.
My initial goal with this support was to not break the Koji method while providing a fix for the Copr method.
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.
In addition, this gets a big ugly too because in CI I am going to have to write the copr repository out to a file from the build step that can then be used as input to the repoclosure step.
An all-in-one obal scratch
is nice for users, but it creates a bit of yuck in CI where we need to pass data around from invocation to invocation.
Status output has a similar issue, having to print out a yaml file so that the status generation can then slurp it in (https://github.com/theforeman/jenkins-jobs/blob/master/theforeman.org/pipelines/lib/copr.groovy#L1).
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.
Ehh, I decided to go ahead and write a module and then I can re-factor on top of that: #364
The dist is what tells our code which set of lookaside repositories to use -- https://github.com/theforeman/foreman-packaging/blob/rpm/develop/package_manifest.yaml#L155-L156 |
6a224bb
to
8f96efc
Compare
This has been completely re-worked and re-designed using the module. Expected usage:
|
9a2d1a8
to
3f11ea4
Compare
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.
I think you got a stray file in here, but otherwise LGTM
3f11ea4
to
8682351
Compare
Example:
This will allow us to stop downloading RPMs to create a local repository from and instead use the repositories created by the scratch repos from Copr to do repoclosure.