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

Integrate obs factory #5140

Merged
merged 7 commits into from
Jun 22, 2018

Conversation

DavidKang
Copy link
Contributor

@DavidKang DavidKang commented Jun 14, 2018

We made some adjustments to integrate obs_factory engine into OBS.
We still need to test the correct workflows and fix rubocop complains.

@DavidKang DavidKang added Frontend Things related to the OBS RoR app DO NOT MERGE ⚠️ Explain yourself if you add/remove this label to a PR labels Jun 14, 2018
@DavidKang DavidKang requested a review from coolo June 14, 2018 08:49
Copy link
Member

@Ana06 Ana06 left a 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! 😨

@DavidKang DavidKang force-pushed the feature/obs-factory-without-test branch 2 times, most recently from 57857e2 to e648327 Compare June 14, 2018 09:30
@hennevogel
Copy link
Member

@mdeniz go change some diapers or something! ☝

src/api/config/routes.rb Outdated Show resolved Hide resolved
src/api/config/routes.rb Outdated Show resolved Hide resolved
@DavidKang DavidKang force-pushed the feature/obs-factory-without-test branch 3 times, most recently from 6b52e0b to eb35b94 Compare June 14, 2018 11:56
@DavidKang DavidKang force-pushed the feature/obs-factory-without-test branch from eb35b94 to 5917f49 Compare June 18, 2018 11:36
@DavidKang DavidKang changed the title WIP Integrate obs factory Integrate obs factory Jun 18, 2018
@DavidKang DavidKang removed the DO NOT MERGE ⚠️ Explain yourself if you add/remove this label to a PR label Jun 18, 2018
@DavidKang DavidKang force-pushed the feature/obs-factory-without-test branch 5 times, most recently from b236bb1 to 03f04dc Compare June 18, 2018 14:40
Ana06
Ana06 previously requested changes Jun 18, 2018
unless file.to_s.nil?
@ignored_requests = YAML.load(file.to_s)
end
if !@ignored_requests.nil? and @ignored_requests
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

😱

Copy link
Member

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.

Copy link
Contributor

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?

Copy link
Member

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.

Copy link
Member

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

Copy link
Member

@Ana06 Ana06 left a 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. 😄

Copy link
Member

@bgeuken bgeuken left a 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

@DavidKang DavidKang force-pushed the feature/obs-factory-without-test branch from 03f04dc to f6a4a08 Compare June 19, 2018 08:48
@DavidKang
Copy link
Contributor Author

@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.

Copy link
Member

@coolo coolo left a 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 :)

@DavidKang
Copy link
Contributor Author

@coolo, thanks 😸

@bgeuken
Copy link
Member

bgeuken commented Jun 20, 2018

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.

@coolo
Copy link
Member

coolo commented Jun 20, 2018

I can setup a Factory clone on build-test

@bgeuken
Copy link
Member

bgeuken commented Jun 20, 2018

@coolo
Copy link
Member

coolo commented Jun 21, 2018

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

@coolo
Copy link
Member

coolo commented Jun 21, 2018

I, [2018-06-21T11:54:11.465161 #10305]  INFO -- : [57aef12f-29ac-4402-9eaa-da3202c19afc] [10305:177.22] method=GET path=/project/staging_projects/openSUSE:Factory format=html controller=We
bui::ObsFactory::StagingProjectsController action=index status=500 error='ActiveXML::Transport::NotFoundError: <status code="404">
  <summary>package 'dashboard' does not exist</summary>
  <details>404 package 'dashboard' does not exist</details>
</status>

@DavidKang DavidKang force-pushed the feature/obs-factory-without-test branch from f6a4a08 to 6c3257f Compare June 21, 2018 11:21
@DavidKang
Copy link
Contributor Author

DavidKang commented Jun 21, 2018

@coolo, @bgeuken, @eduardoj and @Ana06, could re-review it again. I made some changes in the commit b63b3ef

Moises Deniz Aleman and others added 3 commits June 21, 2018 14:44
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.
@DavidKang DavidKang force-pushed the feature/obs-factory-without-test branch from 6c3257f to a0a2a4b Compare June 21, 2018 12:46
@bgeuken
Copy link
Member

bgeuken commented Jun 21, 2018

@DavidKang The commit looks good to me

@coolo
Copy link
Member

coolo commented Jun 21, 2018

@Ana06?

@ignored_requests = YAML.load(file)
end
else
flash[:notice] = "package dashboard doesn't exist for #{staging_project}"
Copy link
Contributor

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.

Copy link
Contributor Author

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

David Kang added 4 commits June 21, 2018 21:56
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.
@DavidKang DavidKang force-pushed the feature/obs-factory-without-test branch from a0a2a4b to 97645f1 Compare June 21, 2018 19:57
@coolo coolo dismissed Ana06’s stale review June 22, 2018 06:34

stale review

@coolo coolo mentioned this pull request Jun 22, 2018
@bgeuken bgeuken merged commit c32e16a into openSUSE:master Jun 22, 2018
@DavidKang DavidKang deleted the feature/obs-factory-without-test branch June 22, 2018 12:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Frontend Things related to the OBS RoR app
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants