[obs-commits] [openSUSE/open-build-service] aa3dbe: Remove unused "tracked" attribute from classified_...

Branch: refs/heads/master Home: https://github.com/openSUSE/open-build-service Commit: aa3dbe51ae12e38f17af14400278b32a61ab0457 https://github.com/openSUSE/open-build-service/commit/aa3dbe51ae12e38f17af14... Author: Lukas Krause <lkrause@suse.de> Date: 2019-10-21 (Mon, 21 Oct 2019) Changed paths: M src/api/app/models/concerns/staging_project.rb Log Message: ----------- Remove unused "tracked" attribute from classified_requests The "tracked" attribute is nowhere used in the staging workflow, and can be removed. Commit: 0c167da4917b49309d4ef38883cde57f27311b66 https://github.com/openSUSE/open-build-service/commit/0c167da4917b49309d4ef3... Author: Lukas Krause <lkrause@suse.de> Date: 2019-10-21 (Mon, 21 Oct 2019) Changed paths: M src/api/app/models/concerns/staging_project.rb Log Message: ----------- Prevent n+1 query in classified_requests method The classified_requests method includes the reviews when querying the requests but never takes advantage of it. Related to #7350 Commit: 703e5d1d48c5319c40cb3b490668bc171b63a48e https://github.com/openSUSE/open-build-service/commit/703e5d1d48c5319c40cb3b... Author: Lukas Krause <lkrause@suse.de> Date: 2019-10-21 (Mon, 21 Oct 2019) Changed paths: M src/api/app/models/concerns/staging_project.rb Log Message: ----------- Prevent n+1 query in missing_reviews method The missing_reviews method indirectly access the bs_request_action table through the extract_missing_reviews method. Including the bs_request_actions while loading the reviews prevents loading them one by one. Commit: ce62dab8186fe46de824a668994e5b6ee46f7672 https://github.com/openSUSE/open-build-service/commit/ce62dab8186fe46de824a6... Author: Lukas Krause <lkrause@suse.de> Date: 2019-10-21 (Mon, 21 Oct 2019) Changed paths: M src/api/app/models/concerns/staging_project.rb Log Message: ----------- Cache missing_reviews and reuse them When rendering the staging project show view, the classified_requests methods gets called and fetches the missing reviews for the package list. Afterwards the missing_reviews are collected again, inorder to show a list of them in the status area. Caching and reusing them saves time. Commit: a826d1ab31c81f7771c8c162e27404f92b224ac5 https://github.com/openSUSE/open-build-service/commit/a826d1ab31c81f7771c8c1... Author: Lukas Krause <lkrause@suse.de> Date: 2019-10-21 (Mon, 21 Oct 2019) Changed paths: M src/api/app/helpers/webui/staging/workflow_helper.rb Log Message: ----------- Call classified_requests methods only once in workflow helper There is no reason to call the method twice. Saving the result of the method call and reusing it is more effecient. Commit: 345cdbe0a49119a62dbd96df7893dd6955d1e37d https://github.com/openSUSE/open-build-service/commit/345cdbe0a49119a62dbd96... Author: Lukas Krause <lkrause@suse.de> Date: 2019-10-21 (Mon, 21 Oct 2019) Changed paths: M src/api/app/models/bs_request.rb M src/api/app/models/concerns/staging_project.rb Log Message: ----------- Filter missing_reviews in database query Filtering out the reviews that have a review by_project for the staging project itself can happen directly in the database query instead of doing it through a condition in the ruby code. Commit: 6b2a4ef378d1b1f82b50b1fb555cbf9982fde303 https://github.com/openSUSE/open-build-service/commit/6b2a4ef378d1b1f82b50b1... Author: Lukas Krause <lkrause@suse.de> Date: 2019-10-21 (Mon, 21 Oct 2019) Changed paths: M src/api/app/models/concerns/staging_project.rb Log Message: ----------- Use each_with_object to collect and extract missing_reviews Using each_with_object to collect and extract the missing_reviews, reduces the amount of temporary used variables and makes the code a bit cleaner. Co-authored-by: Daniel Donisa <daniel.donisa@suse.com> Commit: e63f808ff5940976fc1ae889b8bba679b19c5d6f https://github.com/openSUSE/open-build-service/commit/e63f808ff5940976fc1ae8... Author: Victor Pereira <vpereira@suse.de> Date: 2019-10-21 (Mon, 21 Oct 2019) Changed paths: M src/api/app/helpers/webui/staging/workflow_helper.rb M src/api/app/models/bs_request.rb M src/api/app/models/concerns/staging_project.rb Log Message: ----------- Merge pull request #8580 from krauselukas/issue_7350_follow_up Get rid of n+1 queries and improve rendering time of staging project/workflow Compare: https://github.com/openSUSE/open-build-service/compare/8c47f71da304...e63f80...
participants (1)
-
Victor Pereira