[openSUSE/open-build-service] 470564: Move the accept logic into StagingProject
Branch: refs/heads/master Home: https://github.com/openSUSE/open-build-service Commit: 4705645c8ef82873a9d93804e22d9931e445f6b2 https://github.com/openSUSE/open-build-service/commit/4705645c8ef82873a9d938... Author: Henne Vogelsang <hvogel@opensuse.org> Date: 2022-07-21 (Thu, 21 Jul 2022) Changed paths: M src/api/.rubocop_todo.yml M src/api/app/controllers/staging/staging_projects_controller.rb M src/api/app/jobs/staging_project_accept_job.rb M src/api/app/models/concerns/staging_project.rb R src/api/spec/jobs/staging_project_accept_job_spec.rb M src/api/spec/models/project/staging_project_spec.rb Log Message: ----------- Move the accept logic into StagingProject Skinny controller/job, fat model. This is logic of the StagingProject. fixup refactoring Commit: 3a7a2f70b3bdab6c7ee4010e19c034450c01b96d https://github.com/openSUSE/open-build-service/commit/3a7a2f70b3bdab6c7ee401... Author: Henne Vogelsang <hvogel@opensuse.org> Date: 2022-07-22 (Fri, 22 Jul 2022) Changed paths: A src/api/spec/cassettes/Project/Staging_Project/_accept/when_the_staging_project_has_missing_reviews/1_1_7_2_1.yml A src/api/spec/cassettes/Project/Staging_Project/_accept/when_the_staging_project_is_in_acceptable_state/should_remove_staging_project_log_entries/1_1_7_1_2_1.yml A src/api/spec/cassettes/Project/Staging_Project/_accept/when_the_staging_project_is_in_acceptable_state/should_remove_staging_project_log_entries/1_1_7_1_2_2.yml A src/api/spec/cassettes/Project/Staging_Project/_accept/when_the_staging_project_is_in_acceptable_state/staging_project_should_be_accepted/1_1_7_1_1_1.yml A src/api/spec/cassettes/Project/Staging_Project/_accept/when_the_staging_project_is_in_acceptable_state/staging_project_should_be_accepted/1_1_7_1_1_2.yml A src/api/spec/cassettes/Project/Staging_Project/_accept/when_the_staging_project_is_in_acceptable_state/staging_project_should_be_accepted/1_1_7_1_1_3.yml A src/api/spec/cassettes/Project/Staging_Project/_accept/when_the_staging_project_is_in_acceptable_state/staging_project_should_be_accepted/1_1_7_1_1_4.yml A src/api/spec/cassettes/Project/Staging_Project/_accept/when_the_staging_project_is_in_acceptable_state/staging_project_should_be_accepted/1_1_7_1_1_5.yml A src/api/spec/cassettes/Project/Staging_Project/_accept/when_the_user_has_no_permissions_for_the_target/1_1_7_3_1.yml R src/api/spec/cassettes/Project/Staging_Project/_accept_staged_requests/when_the_staging_project_is_in_acceptable_state/1_1_7_1_1.yml R src/api/spec/cassettes/Project/Staging_Project/_accept_staged_requests/when_the_staging_project_is_in_acceptable_state/1_1_7_1_2.yml R src/api/spec/cassettes/Project/Staging_Project/_accept_staged_requests/when_the_staging_project_is_in_acceptable_state/1_1_7_1_3.yml R src/api/spec/cassettes/Project/Staging_Project/_accept_staged_requests/when_the_staging_project_is_in_acceptable_state/1_1_7_1_4.yml R src/api/spec/cassettes/Project/Staging_Project/_accept_staged_requests/when_the_staging_project_is_in_acceptable_state/1_1_7_1_5.yml R src/api/spec/cassettes/Project/Staging_Project/_accept_staged_requests/when_the_staging_project_is_not_in_state_acceptable/1_1_7_2_1.yml R src/api/spec/cassettes/Project/Staging_Project/_accept_staged_requests/when_the_staging_project_is_not_in_state_acceptable/1_1_7_2_2.yml R src/api/spec/cassettes/Project/Staging_Project/_accept_staged_requests/when_the_staging_project_is_not_in_state_acceptable/1_1_7_2_3.yml R src/api/spec/cassettes/Project/Staging_Project/_accept_staged_requests/when_the_staging_project_is_not_in_state_acceptable/1_1_7_2_4.yml R src/api/spec/cassettes/Project/Staging_Project/_accept_staged_requests/when_the_staging_project_is_not_in_state_acceptable/1_1_7_2_5.yml R src/api/spec/cassettes/Project/Staging_Project/_accept_staged_requests/when_the_user_has_no_permissions_for_the_target/1_1_7_3_1.yml M src/api/spec/cassettes/Project/Staging_Project/_assign_managers_group/when_the_group_was_already_assigned/1_1_4_2_1.yml M src/api/spec/cassettes/Project/Staging_Project/_assign_managers_group/when_the_group_wasn_t_assigned_before/1_1_4_1_1.yml M src/api/spec/cassettes/Project/Staging_Project/_copy/1_1_6_2.yml M src/api/spec/cassettes/Project/Staging_Project/_copy/copies_flags.yml M src/api/spec/cassettes/Project/Staging_Project/_copy/copies_the_project_config.yml M src/api/spec/cassettes/Project/Staging_Project/_copy/copies_the_relationships.yml M src/api/spec/cassettes/Project/Staging_Project/_copy/copies_the_repositories_and_it_s_relations.yml M src/api/spec/cassettes/Project/Staging_Project/_copy/creates_a_new_staging_project.yml M src/api/spec/cassettes/Project/Staging_Project/_copy/when_the_repository_contains_path_elements_that_link_to_repositories_of_the_same_project/ensures_that_the_new_created_path_is_also_self_referencing.yml M src/api/spec/cassettes/Project/Staging_Project/_copy/when_the_repository_contains_path_elements_that_link_to_repositories_of_the_same_project/renames_the_repository_link_if_it_contains_a_reference_to_the_project.yml M src/api/spec/cassettes/Project/Staging_Project/_missing_reviews/contains_all_open_reviews_of_staged_requests.yml M src/api/spec/cassettes/Project/Staging_Project/_missing_reviews/when_there_is_an_accepted_review/1_1_1_2_1.yml M src/api/spec/cassettes/Project/Staging_Project/_overall_state/when_request_got_revoked/1_1_3_2_1.yml M src/api/spec/cassettes/Project/Staging_Project/_overall_state/when_there_are_failed_checks_on_build_repo/1_1_3_7_1.yml M src/api/spec/cassettes/Project/Staging_Project/_overall_state/when_there_are_failed_checks_on_build_repo/1_1_3_7_2.yml M src/api/spec/cassettes/Project/Staging_Project/_overall_state/when_there_are_failed_checks_on_published_repo/1_1_3_6_1.yml M src/api/spec/cassettes/Project/Staging_Project/_overall_state/when_there_are_missing_checks_on_build_repo/1_1_3_4_1.yml M src/api/spec/cassettes/Project/Staging_Project/_overall_state/when_there_are_missing_checks_on_published_repo/1_1_3_3_1.yml M src/api/spec/cassettes/Project/Staging_Project/_overall_state/when_there_are_no_staged_requests/1_1_3_1_1.yml M src/api/spec/cassettes/Project/Staging_Project/_overall_state/when_there_are_pending_checks/1_1_3_5_1.yml M src/api/spec/cassettes/Project/Staging_Project/_overall_state/when_there_are_succeeded_checks/1_1_3_8_1.yml M src/api/spec/cassettes/Project/Staging_Project/_overall_state/when_we_only_have_outdated_checks/1_1_3_9_1.yml M src/api/spec/cassettes/Project/Staging_Project/_overall_state/when_we_only_have_outdated_checks/1_1_3_9_2.yml M src/api/spec/cassettes/Project/Staging_Project/_overall_state/when_we_only_have_outdated_checks/1_1_3_9_3.yml M src/api/spec/cassettes/Project/Staging_Project/_overall_state/with_disabled_repository/1_1_3_10_1.yml M src/api/spec/cassettes/Project/Staging_Project/_unassign_managers_group/1_1_5_1.yml M src/api/spec/cassettes/Project/Staging_Project/_untracked_requests/1_1_2_1.yml R src/api/spec/cassettes/StagingProjectAcceptJob/_perform/when_the_staging_project_has_missing_reviews/1_1_2_1.yml R src/api/spec/cassettes/StagingProjectAcceptJob/_perform/when_the_staging_project_is_in_acceptable_state/should_remove_staging_project_log_entries/1_1_1_2_1.yml R src/api/spec/cassettes/StagingProjectAcceptJob/_perform/when_the_staging_project_is_in_acceptable_state/should_remove_staging_project_log_entries/1_1_1_2_2.yml R src/api/spec/cassettes/StagingProjectAcceptJob/_perform/when_the_staging_project_is_in_acceptable_state/staging_project_should_be_accepted/1_1_1_1_1.yml R src/api/spec/cassettes/StagingProjectAcceptJob/_perform/when_the_staging_project_is_in_acceptable_state/staging_project_should_be_accepted/1_1_1_1_2.yml R src/api/spec/cassettes/StagingProjectAcceptJob/_perform/when_the_staging_project_is_in_acceptable_state/staging_project_should_be_accepted/1_1_1_1_3.yml R src/api/spec/cassettes/StagingProjectAcceptJob/_perform/when_the_staging_project_is_in_acceptable_state/staging_project_should_be_accepted/1_1_1_1_4.yml R src/api/spec/cassettes/StagingProjectAcceptJob/_perform/when_the_staging_project_is_in_acceptable_state/staging_project_should_be_accepted/1_1_1_1_5.yml R src/api/spec/cassettes/StagingProjectAcceptJob/_perform/when_the_user_has_no_permissions_for_the_target/1_1_3_1.yml M src/api/spec/cassettes/Staging_StagingProjectsController/POST_accept/when_project_has_a_request/with_nothing_missing/1_4_3_1_1.yml Log Message: ----------- Adopt cassettes to StagingProject.accept Commit: 650b010f4acd67f0f5ce4b1c0f11fdb50f517802 https://github.com/openSUSE/open-build-service/commit/650b010f4acd67f0f5ce4b... Author: Henne Vogelsang <hvogel@opensuse.org> Date: 2022-07-22 (Fri, 22 Jul 2022) Changed paths: R src/api/spec/cassettes/Staging_StagingProjectsController/POST_accept/when_project_has_a_request/with_nothing_missing/as_staging_owner/can_t_accept.yml R src/api/spec/cassettes/Staging_StagingProjectsController/POST_accept/when_project_has_a_request/with_nothing_missing/build_flags_should_be_disabled.yml R src/api/spec/cassettes/Staging_StagingProjectsController/POST_accept/when_project_has_a_request/with_nothing_missing/starts_the_accept_job_for_the_staging_projects.yml M src/api/spec/controllers/staging/staging_projects_controller_spec.rb Log Message: ----------- Remove some superflous specs - ActiveJob is tested in the ActiveJob spec - Flags are tested in the Flags spec - ProjectPolicy is tested in the ProjectPolicy spec Commit: 7381b16358d881cd1aa9cf45f5eef957c1be95dc https://github.com/openSUSE/open-build-service/commit/7381b16358d881cd1aa9cf... Author: Henne Vogelsang <hvogel@opensuse.org> Date: 2022-07-25 (Mon, 25 Jul 2022) Changed paths: M src/api/.rubocop_todo.yml M src/api/app/controllers/staging/staging_projects_controller.rb M src/api/app/jobs/staging_project_accept_job.rb M src/api/app/models/concerns/staging_project.rb A src/api/spec/cassettes/Project/Staging_Project/_accept/when_the_staging_project_has_missing_reviews/1_1_7_2_1.yml A src/api/spec/cassettes/Project/Staging_Project/_accept/when_the_staging_project_is_in_acceptable_state/should_remove_staging_project_log_entries/1_1_7_1_2_1.yml A src/api/spec/cassettes/Project/Staging_Project/_accept/when_the_staging_project_is_in_acceptable_state/should_remove_staging_project_log_entries/1_1_7_1_2_2.yml A src/api/spec/cassettes/Project/Staging_Project/_accept/when_the_staging_project_is_in_acceptable_state/staging_project_should_be_accepted/1_1_7_1_1_1.yml A src/api/spec/cassettes/Project/Staging_Project/_accept/when_the_staging_project_is_in_acceptable_state/staging_project_should_be_accepted/1_1_7_1_1_2.yml A src/api/spec/cassettes/Project/Staging_Project/_accept/when_the_staging_project_is_in_acceptable_state/staging_project_should_be_accepted/1_1_7_1_1_3.yml A src/api/spec/cassettes/Project/Staging_Project/_accept/when_the_staging_project_is_in_acceptable_state/staging_project_should_be_accepted/1_1_7_1_1_4.yml A src/api/spec/cassettes/Project/Staging_Project/_accept/when_the_staging_project_is_in_acceptable_state/staging_project_should_be_accepted/1_1_7_1_1_5.yml A src/api/spec/cassettes/Project/Staging_Project/_accept/when_the_user_has_no_permissions_for_the_target/1_1_7_3_1.yml R src/api/spec/cassettes/Project/Staging_Project/_accept_staged_requests/when_the_staging_project_is_in_acceptable_state/1_1_7_1_1.yml R src/api/spec/cassettes/Project/Staging_Project/_accept_staged_requests/when_the_staging_project_is_in_acceptable_state/1_1_7_1_2.yml R src/api/spec/cassettes/Project/Staging_Project/_accept_staged_requests/when_the_staging_project_is_in_acceptable_state/1_1_7_1_3.yml R src/api/spec/cassettes/Project/Staging_Project/_accept_staged_requests/when_the_staging_project_is_in_acceptable_state/1_1_7_1_4.yml R src/api/spec/cassettes/Project/Staging_Project/_accept_staged_requests/when_the_staging_project_is_in_acceptable_state/1_1_7_1_5.yml R src/api/spec/cassettes/Project/Staging_Project/_accept_staged_requests/when_the_staging_project_is_not_in_state_acceptable/1_1_7_2_1.yml R src/api/spec/cassettes/Project/Staging_Project/_accept_staged_requests/when_the_staging_project_is_not_in_state_acceptable/1_1_7_2_2.yml R src/api/spec/cassettes/Project/Staging_Project/_accept_staged_requests/when_the_staging_project_is_not_in_state_acceptable/1_1_7_2_3.yml R src/api/spec/cassettes/Project/Staging_Project/_accept_staged_requests/when_the_staging_project_is_not_in_state_acceptable/1_1_7_2_4.yml R src/api/spec/cassettes/Project/Staging_Project/_accept_staged_requests/when_the_staging_project_is_not_in_state_acceptable/1_1_7_2_5.yml R src/api/spec/cassettes/Project/Staging_Project/_accept_staged_requests/when_the_user_has_no_permissions_for_the_target/1_1_7_3_1.yml M src/api/spec/cassettes/Project/Staging_Project/_assign_managers_group/when_the_group_was_already_assigned/1_1_4_2_1.yml M src/api/spec/cassettes/Project/Staging_Project/_assign_managers_group/when_the_group_wasn_t_assigned_before/1_1_4_1_1.yml M src/api/spec/cassettes/Project/Staging_Project/_copy/1_1_6_2.yml M src/api/spec/cassettes/Project/Staging_Project/_copy/copies_flags.yml M src/api/spec/cassettes/Project/Staging_Project/_copy/copies_the_project_config.yml M src/api/spec/cassettes/Project/Staging_Project/_copy/copies_the_relationships.yml M src/api/spec/cassettes/Project/Staging_Project/_copy/copies_the_repositories_and_it_s_relations.yml M src/api/spec/cassettes/Project/Staging_Project/_copy/creates_a_new_staging_project.yml M src/api/spec/cassettes/Project/Staging_Project/_copy/when_the_repository_contains_path_elements_that_link_to_repositories_of_the_same_project/ensures_that_the_new_created_path_is_also_self_referencing.yml M src/api/spec/cassettes/Project/Staging_Project/_copy/when_the_repository_contains_path_elements_that_link_to_repositories_of_the_same_project/renames_the_repository_link_if_it_contains_a_reference_to_the_project.yml M src/api/spec/cassettes/Project/Staging_Project/_missing_reviews/contains_all_open_reviews_of_staged_requests.yml M src/api/spec/cassettes/Project/Staging_Project/_missing_reviews/when_there_is_an_accepted_review/1_1_1_2_1.yml M src/api/spec/cassettes/Project/Staging_Project/_overall_state/when_request_got_revoked/1_1_3_2_1.yml M src/api/spec/cassettes/Project/Staging_Project/_overall_state/when_there_are_failed_checks_on_build_repo/1_1_3_7_1.yml M src/api/spec/cassettes/Project/Staging_Project/_overall_state/when_there_are_failed_checks_on_build_repo/1_1_3_7_2.yml M src/api/spec/cassettes/Project/Staging_Project/_overall_state/when_there_are_failed_checks_on_published_repo/1_1_3_6_1.yml M src/api/spec/cassettes/Project/Staging_Project/_overall_state/when_there_are_missing_checks_on_build_repo/1_1_3_4_1.yml M src/api/spec/cassettes/Project/Staging_Project/_overall_state/when_there_are_missing_checks_on_published_repo/1_1_3_3_1.yml M src/api/spec/cassettes/Project/Staging_Project/_overall_state/when_there_are_no_staged_requests/1_1_3_1_1.yml M src/api/spec/cassettes/Project/Staging_Project/_overall_state/when_there_are_pending_checks/1_1_3_5_1.yml M src/api/spec/cassettes/Project/Staging_Project/_overall_state/when_there_are_succeeded_checks/1_1_3_8_1.yml M src/api/spec/cassettes/Project/Staging_Project/_overall_state/when_we_only_have_outdated_checks/1_1_3_9_1.yml M src/api/spec/cassettes/Project/Staging_Project/_overall_state/when_we_only_have_outdated_checks/1_1_3_9_2.yml M src/api/spec/cassettes/Project/Staging_Project/_overall_state/when_we_only_have_outdated_checks/1_1_3_9_3.yml M src/api/spec/cassettes/Project/Staging_Project/_overall_state/with_disabled_repository/1_1_3_10_1.yml M src/api/spec/cassettes/Project/Staging_Project/_unassign_managers_group/1_1_5_1.yml M src/api/spec/cassettes/Project/Staging_Project/_untracked_requests/1_1_2_1.yml R src/api/spec/cassettes/StagingProjectAcceptJob/_perform/when_the_staging_project_has_missing_reviews/1_1_2_1.yml R src/api/spec/cassettes/StagingProjectAcceptJob/_perform/when_the_staging_project_is_in_acceptable_state/should_remove_staging_project_log_entries/1_1_1_2_1.yml R src/api/spec/cassettes/StagingProjectAcceptJob/_perform/when_the_staging_project_is_in_acceptable_state/should_remove_staging_project_log_entries/1_1_1_2_2.yml R src/api/spec/cassettes/StagingProjectAcceptJob/_perform/when_the_staging_project_is_in_acceptable_state/staging_project_should_be_accepted/1_1_1_1_1.yml R src/api/spec/cassettes/StagingProjectAcceptJob/_perform/when_the_staging_project_is_in_acceptable_state/staging_project_should_be_accepted/1_1_1_1_2.yml R src/api/spec/cassettes/StagingProjectAcceptJob/_perform/when_the_staging_project_is_in_acceptable_state/staging_project_should_be_accepted/1_1_1_1_3.yml R src/api/spec/cassettes/StagingProjectAcceptJob/_perform/when_the_staging_project_is_in_acceptable_state/staging_project_should_be_accepted/1_1_1_1_4.yml R src/api/spec/cassettes/StagingProjectAcceptJob/_perform/when_the_staging_project_is_in_acceptable_state/staging_project_should_be_accepted/1_1_1_1_5.yml R src/api/spec/cassettes/StagingProjectAcceptJob/_perform/when_the_user_has_no_permissions_for_the_target/1_1_3_1.yml M src/api/spec/cassettes/Staging_StagingProjectsController/POST_accept/when_project_has_a_request/with_nothing_missing/1_4_3_1_1.yml R src/api/spec/cassettes/Staging_StagingProjectsController/POST_accept/when_project_has_a_request/with_nothing_missing/as_staging_owner/can_t_accept.yml R src/api/spec/cassettes/Staging_StagingProjectsController/POST_accept/when_project_has_a_request/with_nothing_missing/build_flags_should_be_disabled.yml R src/api/spec/cassettes/Staging_StagingProjectsController/POST_accept/when_project_has_a_request/with_nothing_missing/starts_the_accept_job_for_the_staging_projects.yml M src/api/spec/controllers/staging/staging_projects_controller_spec.rb R src/api/spec/jobs/staging_project_accept_job_spec.rb M src/api/spec/models/project/staging_project_spec.rb Log Message: ----------- Merge pull request #12845 from hennevogel/refactoring/skinny-staging-accept-job Move the accept logic into StagingProject Compare: https://github.com/openSUSE/open-build-service/compare/0709f8f566ce...7381b1...
participants (1)
-
Henne Vogelsang