-
Notifications
You must be signed in to change notification settings - Fork 1
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
Resolve "Provide japi handler that lists registered commands" #116
Resolve "Provide japi handler that lists registered commands" #116
Conversation
avoid crashing if the user did not register one theirself + docs + test
In GitLab by @vornkat-iis on Jul 4, 2023, 17:36 added 1 commit
|
In GitLab by @vornkat-iis on Jul 4, 2023, 17:38 marked this merge request as ready |
In GitLab by @vornkat-iis on Jul 4, 2023, 17:38 requested review from @Michael-M-Baron |
In GitLab by @vornkat-iis on Jul 4, 2023, 17:42 changed target branch from |
In GitLab by @Michael-M-Baron on Jul 5, 2023, 11:30 Looks good so far. One thing I am thinking about. In the Interstellar-Project we are returning success and failure after a JAPI-Request. If the japi request was successfull, we return something like.
On Failure.
This is specific to the Interstellar-Project. We should discuss, if this could/should be generalized. I am not sure right now, but I think the Interstellar-Frontend expects the JAPI_RESPONSE key, what means that the new command "japi_cmd_list" cannot be used. |
In GitLab by @Michael-M-Baron on Jul 5, 2023, 11:32 added 10 commits
|
In GitLab by @vornkat-iis on Jul 7, 2023, 11:42 For push service subscribe and unsubscribe, there is a field "success" with the value true or false, see libjapi-demo/README.md We should really discuss which way to go but for the list commands, failure would mean no response to the client as an empty list is a valid result and there are at least three commands registered anyways: "japi_response": "japi_cmd_list",
"data": {
"commands": [
"request_not_found_handler",
"japi_cmd_list",
"japi_pushsrv_list"
]
} |
In GitLab by @vornkat-iis on Jul 7, 2023, 11:59 @jannismain What would you expect as result? There are several default commands, which are currently listed only partially: "japi_response": "japi_cmd_list",
"data": {
"commands": [
"request_not_found_handler",
"japi_cmd_list",
"japi_pushsrv_list"
]
} missing: |
In GitLab by @Michael-M-Baron on Jul 7, 2023, 13:30 added 3 commits
|
In GitLab by @Michael-M-Baron on Jul 7, 2023, 13:30 approved this merge request |
In GitLab by @Michael-M-Baron on Jul 7, 2023, 13:32 Ok I would sugggest to keep the software as it is for the moment and merge this branch and open a new issue/feature to discuss this topic. |
In GitLab by @Michael-M-Baron on Jul 7, 2023, 13:32 resolved all threads |
In GitLab by @Michael-M-Baron on Jul 7, 2023, 13:32 enabled an automatic merge when the pipeline for 5da958d4b73e55f1f1fc1a5cf2d304e3b15d4eeb succeeds |
In GitLab by @jannismain on Jul 7, 2023, 13:32 I agree, Otherwise, I like the fact that all system commands (i.e. those provided by libjapi) are prefixed with All commands useful to the user should be returned. IMO that includes everything other than the |
In GitLab by @jannismain on Jul 7, 2023, 13:36 marked this merge request as draft |
In GitLab by @jannismain on Jul 7, 2023, 13:38 @Michael-M-Baron there are still commands missing from the return list. I would wait with merging until As an aside, I noticed that the MR was about to be merged with open discussions. I think it is sensible to only allow MRs to be merged when all discussions are resolved. Could you change the repository configuration accordingly? For now, I marked this MR as draft again to halt the merge for now. If you think it should still be merged, go ahead. |
In GitLab by @vornkat-iis on Jul 7, 2023, 15:16 I just found out: The user has to provide and register the |
In GitLab by @jannismain on Jul 7, 2023, 17:47 What happens if it is not registered by the user and a non-existing command is requested? I think there should be a sensible default, if the alternative is crashing. |
In GitLab by @vornkat-iis on Jul 8, 2023, 14:48 aborted the automatic merge because source branch was updated |
In GitLab by @vornkat-iis on Jul 8, 2023, 14:48 added 1 commit
|
In GitLab by @vornkat-iis on Jul 11, 2023, 10:33 added 1 commit
|
In GitLab by @vornkat-iis on Jul 11, 2023, 10:39 added 2 commits
|
In GitLab by @vornkat-iis on Jul 11, 2023, 14:14 added 1 commit
|
In GitLab by @vornkat-iis on Jul 11, 2023, 14:16 I added a |
In GitLab by @vornkat-iis on Jul 11, 2023, 14:16 resolved all threads |
In GitLab by @vornkat-iis on Jul 11, 2023, 14:57 added 1 commit
|
In GitLab by @jannismain on Jul 11, 2023, 15:53 For me, the tests are not running locally (even on dev or another branch):
|
In GitLab by @jannismain on Jul 11, 2023, 16:04 On When I |
In GitLab by @jannismain on Jul 11, 2023, 16:07 The failing test is |
In GitLab by @vornkat-iis on Jul 11, 2023, 17:39 added 1 commit
|
In GitLab by @jannismain on Jul 11, 2023, 17:45 resolved all threads |
In GitLab by @vornkat-iis on Jul 11, 2023, 17:52 added 7 commits |
In GitLab by @vornkat-iis on Jul 11, 2023, 17:52 marked this merge request as ready |
In GitLab by @vornkat-iis on Jul 11, 2023, 17:55 added 4 commits |
Co-authored-by: Jannis Mainczyk <jannis.mainczyk@iis.fraunhofer.de>
In GitLab by @vornkat-iis on Jul 4, 2023, 15:16
Closes #27