[openSUSE/open-build-service] 5c740e: [api] add attribute to enforce revisions in requests
Branch: refs/heads/master Home: https://github.com/openSUSE/open-build-service Commit: 5c740e33bbb92f3a3d014ddddbcaaa6c86a2a898 https://github.com/openSUSE/open-build-service/commit/5c740e33bbb92f3a3d014d... Author: Adrian Schröter <adrian@suse.de> Date: 2021-06-23 (Wed, 23 Jun 2021) Changed paths: M src/api/app/models/bs_request_action.rb M src/api/db/attribute_descriptions.rb A src/api/db/data/20210409135426_add_enforce_revision.rb M src/api/test/fixtures/attrib_types.yml M src/api/test/functional/attributes_test.rb M src/api/test/functional/request_controller_test.rb Log Message: ----------- [api] add attribute to enforce revisions in requests Target projects may decide always to get requests with versioned actions. Note: revisions to unexpanded sources are still possible! Commit: 201525425f1be220085c2174fc9cdaa5da1f53ea https://github.com/openSUSE/open-build-service/commit/201525425f1be220085c21... Author: Stephan Kulow <coolo@suse.de> Date: 2021-06-23 (Wed, 23 Jun 2021) Changed paths: M src/api/app/models/bs_request_action.rb Log Message: ----------- Fix Xmlhash usage in BsRequestAction Commit: e32b567f0ba7ca4e7ef40ba1f1248a1b48455e65 https://github.com/openSUSE/open-build-service/commit/e32b567f0ba7ca4e7ef40b... Author: Stephan Kulow <coolo@suse.de> Date: 2021-06-23 (Wed, 23 Jun 2021) Changed paths: A src/api/spec/cassettes/BsRequestAction/check_expand_errors/RevisionEnforcing_enabled/adds_revision.yml A src/api/spec/cassettes/BsRequestAction/check_expand_errors/Without_RevisionEnforcing/doesn_t_add_revision.yml M src/api/spec/models/bs_request_action_spec.rb Log Message: ----------- Add a spec for behavior with OBS:EnforceRevisionInRequests Commit: 0ce8b50e12b493b1b07086b24a4c024d440a4009 https://github.com/openSUSE/open-build-service/commit/0ce8b50e12b493b1b07086... Author: Stephan Kulow <coolo@suse.de> Date: 2021-06-23 (Wed, 23 Jun 2021) Changed paths: M src/api/app/models/bs_request_action.rb A src/api/spec/cassettes/BsRequestAction/check_expand_errors/RevisionEnforcing_enabled/with__link_in_submitted_source/adds_revision.yml A src/api/spec/cassettes/BsRequestAction/check_expand_errors/RevisionEnforcing_enabled/with__link_in_submitted_source/freezes_revision.yml M src/api/spec/models/bs_request_action_spec.rb Log Message: ----------- Always set the enforced revision in requests Once the request is created, we take the given revision, expand the sources and take the revision given by the backend in the database. So if any of the components of the submitted sources is changed afterwards, they don't invalidate reviews Commit: 313fb27dcd79f9ba07a4ae39cc8d3fdad1dd26ac https://github.com/openSUSE/open-build-service/commit/313fb27dcd79f9ba07a4ae... Author: Stephan Kulow <coolo@suse.de> Date: 2021-06-23 (Wed, 23 Jun 2021) Changed paths: M src/api/app/models/bs_request_action.rb Log Message: ----------- Update src/api/app/models/bs_request_action.rb Make the comment a little clearer Co-authored-by: Henne Vogelsang <hvogel@opensuse.org> Commit: 088b1b9931b45609e92efa8f7584d631dcccd80f https://github.com/openSUSE/open-build-service/commit/088b1b9931b45609e92efa... Author: Stephan Kulow <coolo@suse.de> Date: 2021-06-23 (Wed, 23 Jun 2021) Changed paths: M src/api/app/models/bs_request_action.rb A src/api/spec/cassettes/BsRequestAction/check_expand_errors/RevisionEnforcing_enabled/with__link_in_submitted_source/with_updatelink/throws_exception.yml M src/api/spec/factories/bs_requests.rb M src/api/spec/models/bs_request_action_spec.rb Log Message: ----------- Raise an exception if updatelink is used in enforced projects For OBS:EnforceRevisionsInRequests projects we want to be certain what we review is what we accept - and as such we don't want links to point anywhere, so that updatelink option is incompatible to that use case Commit: a054d7e6fdf4be79a6e4c891d02ea879def27079 https://github.com/openSUSE/open-build-service/commit/a054d7e6fdf4be79a6e4c8... Author: Stephan Kulow <coolo@suse.de> Date: 2021-06-23 (Wed, 23 Jun 2021) Changed paths: M src/api/app/models/bs_request_action.rb Log Message: ----------- EnforceRevision: Run the check unconditionally As Marcus pointed out if we skip the check if add_revision is set, then the user can skip that by setting add_revision, but having an updatelink option set. As we wouldn't throw the exception in these cases, it would end up in the database and potentially only noticed on accept Commit: 36b8d065961aebea83449993ba53e84c41586894 https://github.com/openSUSE/open-build-service/commit/36b8d065961aebea834499... Author: Henne Vogelsang <hvogel@opensuse.org> Date: 2021-06-23 (Wed, 23 Jun 2021) Changed paths: M src/api/app/models/bs_request_action.rb M src/api/db/attribute_descriptions.rb A src/api/db/data/20210409135426_add_enforce_revision.rb A src/api/spec/cassettes/BsRequestAction/check_expand_errors/RevisionEnforcing_enabled/adds_revision.yml A src/api/spec/cassettes/BsRequestAction/check_expand_errors/RevisionEnforcing_enabled/with__link_in_submitted_source/adds_revision.yml A src/api/spec/cassettes/BsRequestAction/check_expand_errors/RevisionEnforcing_enabled/with__link_in_submitted_source/freezes_revision.yml A src/api/spec/cassettes/BsRequestAction/check_expand_errors/RevisionEnforcing_enabled/with__link_in_submitted_source/with_updatelink/throws_exception.yml A src/api/spec/cassettes/BsRequestAction/check_expand_errors/Without_RevisionEnforcing/doesn_t_add_revision.yml M src/api/spec/factories/bs_requests.rb M src/api/spec/models/bs_request_action_spec.rb M src/api/test/fixtures/attrib_types.yml M src/api/test/functional/attributes_test.rb M src/api/test/functional/request_controller_test.rb Log Message: ----------- Merge pull request #11263 from coolo/adrianschroeter-add_revision_enforcement Add revision enforcement Compare: https://github.com/openSUSE/open-build-service/compare/04c6fe8cce61...36b8d0...
participants (1)
-
Henne Vogelsang