-
Notifications
You must be signed in to change notification settings - Fork 438
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
Integrate obs factory #5140
Integrate obs factory #5140
Conversation
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.
What a huge PR! 😨
src/api/app/controllers/webui/obs_factory/staging_projects_controller.rb
Outdated
Show resolved
Hide resolved
57857e2
to
e648327
Compare
@mdeniz go change some diapers or something! ☝ |
6b52e0b
to
eb35b94
Compare
eb35b94
to
5917f49
Compare
b236bb1
to
03f04dc
Compare
unless file.to_s.nil? | ||
@ignored_requests = YAML.load(file.to_s) | ||
end | ||
if !@ignored_requests.nil? and @ignored_requests |
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.
😱
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 code needs to be rewritten completely in the future anyway as this should move into an obs attribute. Polishing this old functionality to perfection is beyong logic.
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.
The scarier part is the need for unless file.to_s.nil?
...to_s.nil?
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's actually no longer needed. Your code was using PackageFile.new - which has a rather strange API as it tries to mimik ActiveRecord::Model.
But @DavidKang changed it to use the file method - and that one simply returns a string or throws an exception.
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.
jberry-suse a day ago
The scarier part is the need for unless file.to_s.nil?...to_s.nil?
I was also suprised... We renamed it now
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.
@DavidKang please add in the commit what code was just move to avoid adding comments in that code. 😄
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.
Nice work. I liked seeing you already cleaning up the CSS and such ❤️
There is just one thing. It seems that the first 3 commits belong together. The second one adds some name spacing which seems to be required for the first commit to work.
The third commit drops a controller which got introduced in the first one.
I would also consider squashing the 4th commit
03f04dc
to
f6a4a08
Compare
@bgeuken, I prefer to leave the first commit separated because is only moving obs factory Engine into OBS and it will be easier to review the others commits. |
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.
Be careful on deployment as we need to remove the engine at the same time. I'll gladly help with first-deployment debugging :)
@coolo, thanks 😸 |
Probably obvious to say, but I would test this thoroughly before deploying. Be it on https://build-test.opensuse.org/ or on a local dev instance. |
I can setup a Factory clone on build-test |
I am building packages from |
I deployed this and setup a minimal https://build-test.opensuse.org/project/staging_projects/openSUSE:Factory But if there is no ignored_requests file, it will crash - due to the backend refactoring. So please catch this exception - and we're ready for merge IMO |
|
f6a4a08
to
6c3257f
Compare
We wanted to add the OBS Factory engine in this project to be part of the code of OBS. This commit only move OBS Factory Engine files into OBS.
Some of the name where clashing with some global ones. Now we prepend the name of the module and the global accessor. Also some unused code, controller and old routes were removed.
6c3257f
to
a0a2a4b
Compare
@DavidKang The commit looks good to me |
@ignored_requests = YAML.load(file) | ||
end | ||
else | ||
flash[:notice] = "package dashboard doesn't exist for #{staging_project}" |
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.
A dashboard package is not a requirement and as such this will be annoying for projects without one.
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.
Okey, I will remove it
We replaced the use of ActiveXML and PackageFile in favour of Backend::Api.
We updated rubocop_todo file to exclude all the offenses related with obs_factory.
a0a2a4b
to
97645f1
Compare
We made some adjustments to integrate obs_factory engine into OBS.
We still need to test the correct workflows and fix rubocop complains.