-
Notifications
You must be signed in to change notification settings - Fork 437
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
[api] fix trigger route behaviour #15119
[api] fix trigger route behaviour #15119
Conversation
adrianschroeter
commented
Oct 26, 2023
•
edited by eduardoj
Loading
edited by eduardoj
- fail when wrong operation type is used (instead of executing the token operation)
- allow to use /trigger without specifing the operation type (is defined by the token)
- verify given project/package parameter with possible token package
- fix triggering rebuilds and releases of entire projects
- improve test coverage and api docu
- A preview of the changes in the api documentation can be seen with the review-app here.
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 would require changes in the current API documentation...
@eduardoj are you saying |
@dirkmueller, yes. Either we modify that file or we split that file in three:
Not only that, a new endpoint has been introduced: |
8ec8770
to
58c5d38
Compare
I just renamed it now, given that the new endpoint is just a different name without the so far missing operation type check. |
Review app will appear here: http://obs-reviewlab.opensuse.org/adrianschroeter-fix_trigger_operations |
@adrianschroeter, I see you added changes to the current documentation. Thanks. But renaming the open-build-service/src/api/public/apidocs/OBS-v2.10.50.yaml Lines 503 to 504 in 929e967
I can imagine solving this issue using one of these two options:
I prefer the first option, renaming back the file to |
okay, will rename the docu file back to origin name. |
58c5d38
to
038ec0e
Compare
- fail when wrong operation type is used (instead of executing the token operation) - allow to use /trigger without specifing the operation type (is defined by the token) - verify given project/package parameter with possible token package - fix triggering rebuilds and releases of entire projects - improve test coverage and api docu
038ec0e
to
58e39d8
Compare
I added a commit to fix the RuboCop offenses. Let's see if the previous changes make some other fail. |
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 following specs must be adapted:
spec/controllers/person/token_controller_spec.rb
spec/controllers/trigger_controller_spec.rb
spec/controllers/webui/users/token_triggers_controller_spec.rb
@eduardoj can you update the specs please? I do not have currently an environment to run these. |
I added a commit to get rid of the codeclimate complaint. I'll try to adapt the failing tests:
|
7f64c9c
to
29fb3ae
Compare
29fb3ae
to
58e39d8
Compare
Solve codeclimate issue.
b0c44f6
to
272f742
Compare
8ff6edd
to
3d9950d
Compare
Superseded by #15261 |