-
Notifications
You must be signed in to change notification settings - Fork 102
OBS build support #2067
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
OBS build support #2067
Conversation
Build failed. ❌ pre-commit FAILURE in 1m 31s |
7ecdc41
to
b494187
Compare
Build failed. ❌ pre-commit FAILURE in 1m 42s |
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.
Just some quick notes. I will look into it in more detail on the weekend
To hook to the |
b494187
to
7e1150b
Compare
Oh yeah, you will not be able to build in copr because there is no internet access and all of the tests go through |
Build failed. ✔️ pre-commit SUCCESS in 1m 31s |
Please don't spend too much time on reviewing this yet, I will migrate away from using py-obs to osc, but that will change the looks of the code drastically. |
7e1150b
to
db3f509
Compare
Build failed. ❌ pre-commit FAILURE in 1m 28s |
packit/cli/builds/obs_build.py
Outdated
|
||
logger = logging.getLogger(__name__) | ||
|
||
conf.get_config() |
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 should be called in the click cli function, instead of globally. Can make a simple wrapper if you want to expose it outside the CLI.
8775e44
to
f0fe546
Compare
Build failed. ✔️ pre-commit SUCCESS in 1m 47s |
f0fe546
to
5712661
Compare
Build failed. ❌ pre-commit FAILURE in 1m 42s |
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 a lot, Dan!
I expected this to be much more XML code..;)
packit/cli/builds/obs_build.py
Outdated
# wait for the build result | ||
core.get_results(_API_URL, prj_name, pkg_name, printJoin="", wait=True) |
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.
Can we make the waiting optional (e.g. via option) so it's easier to re-use from Packit service where the reporting would be done differently?
Also, do you think we can move more code to obs_build.py
for the same reason?
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.
Can we make the waiting optional (e.g. via option) so it's easier to re-use from Packit service where the reporting would be done differently?
I have made waiting optional.
Also, do you think we can move more code to
obs_build.py
for the same reason?
What do you mean by that exactly?
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 have made waiting optional.
Nice! Thanks!
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.
Also, do you think we can move more code to
obs_build.py
for the same reason?
From Packit Service, we use just the Packit API
=> if we put some logic just into the CLI handling, it can't be reused from the service.
@majamassarini I think this is worth taking a look at when working on #2099 Here, there is yet another secondary path we are working with (same as we clone dist-git with Fedora-based jobs.) |
I am not sure I understand what you mean for multiple paths. The problem is that This should allow us to use the packit jobs, almost as they are, with this new resources. |
Thanks for taking a look @majamassarini ! You are right that it's getting really complicated since it touches the basic design decisions from the early days when we thought we should always work with two git repositories -- one representing upstream (or source-git) and one downstream. I agree we can avoid a huge architecture redesign for now and fix those two use cases separately. (As Dan is doing.) |
@majamassarini @lachmanfrantisek I am not sure if I understood #2099, but afaik there is no project out there that is actually using OBS as its upstream version control system (except for a few obs specific services). Literally everyone else under the sun is nowadays using git or svn or hg, but not obs. Hence I do not think that this is a path worth exploring, as the 3 projects actually being upstream on OBS are not worth the investment. Additionally, OBS' version control system is very peculiar. There are no branches, subdirectories are not supported and then there is the highly confusing concept of |
3b462d7
to
c4ea913
Compare
Build succeeded. ✔️ pre-commit SUCCESS in 1m 53s |
The pointer to #2099 is probably misleading. Am I wrong or your downstream metadata are taken from the OBS service? |
Currently I do not take any metadata from OBS. This is just adding support for building in OBS, nothing more.
Sounds good to me 👍 |
Sorry for the confusion. Packit has historically worked with two git repositories -- one representing upstream and one downstream. And we rely on this concept across the codebase. From the functional perspective, the #2099 is completely different to what you are working on. My point was that both issues destroy the concept of upstream-git + downstream-git. I just wanted to mention this so we know this is yet another use case that does not fit the original design. |
Merge Failed. This change or one of its cross-repo dependencies was unable to be automatically merged with the current state of its repository. Please rebase the change and upload a new patchset. |
9087489
to
0a3a06b
Compare
Build failed. ✔️ pre-commit SUCCESS in 1m 59s |
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.
mostly just suggestions, otherwise LGTM 🥳 thanks a lot!
do you need some help with the failing test?
Build failed. ❌ pre-commit FAILURE in 1m 52s |
Yes, that would be great. I am pretty certain it's due to |
b0f2652
to
e8355bf
Compare
Build failed. ✔️ pre-commit SUCCESS in 1m 57s |
e8355bf
to
708af09
Compare
I hope that the CI will pass now 🤞 |
06d8705
to
3ca02ca
Compare
Build succeeded. ✔️ pre-commit SUCCESS in 1m 56s |
Add new dependency: opensuse-distro-aliases and integrate it with packit.config.aliases.get_aliases
opensuse is different to all the other build targets as e.g. leap contains a dash in the name and tumbleweed has no version
preliminary OBS building support for packit-cli Co-authored-by: rxbryan <rxbryn@gmail.com> Co-authored-by: Laura Barcziová <49026743+lbarcziova@users.noreply.github.com>
3ca02ca
to
507a672
Compare
Build succeeded. ✔️ pre-commit SUCCESS in 1m 56s |
Build succeeded (gate pipeline). ✔️ pre-commit SUCCESS in 1m 57s |
Pull request merge failed: Resource not accessible by integration, You may need to manually rebase your PR and retry. |
Merging manually since there is a GitHub action change... |
RELEASE NOTES BEGIN Packit now supports building packages in the Open Build Service RELEASE NOTES END
This is a very much WIP support for building rpms in the open build service. I have so far tested it only on packit via
packit build in-obs --targets fedora-rawhide-x86_64,fedora-rawhide-aarch64,opensuse-tumbleweed-x86_64,opensuse-tumbleweed-aarch64
which created this package: https://build.opensuse.org/package/show/home:dancermak:packit/packit(it is unresolvable because my obs wrapper is not packaged).TODO:
packit/packit.dev
.RELEASE NOTES BEGIN
Packit now supports building packages in the open build service
RELEASE NOTES END