[management/client] create job channel between management and client#4367
[management/client] create job channel between management and client#4367aliamerj merged 16 commits intofeature/remote-debugfrom
Conversation
… receive responses from the client
|
@pascal-fischer |
|
Ah I just had a look at the proto. Let me review the whole thing now |
|
@pascal-fischer |
|
Almost. I just accepted sonar for this case (usually, there should be no code quality issues, but I loosened the rules a bit here) If you could just fix the linter complaint should be ready |
|
The Docs test is failing because you did not set a mark here. In the PR description just set "Documentation is not needed for this change (explain why)" then this failed test is gone as well. The Benchmarks are a bit flaky depending on the runner they are executed on (we can rerun those, usually is fixed on the next run). And when all the tests are green you can merge |
the linter complaint comes from the codespell in the generated code from .proto |
|
|
|
Ok no maybe we are not done. I just reviewed the thing as a whole again. One sec I will share |
| Read Operation = "read" | ||
| Update Operation = "update" | ||
| Delete Operation = "delete" | ||
| Job Operation = "job" |
There was a problem hiding this comment.
this is also not right. Those are CRUD operations. You need this as a module and the Create for starting a job and get to check the status. This stays pretty much in sync with the http operation GET, POST, PUT, DELETE. We do plan on moving the whole permission validation into the http router middleware then it might get even clearer.
This repo contains a new design for our management service. You can read this repo, this is where we want to go towards with out code. Here is the example how how permissions gonna be used in the future https://github.com/netbirdio/management-refactor/blob/main/internals/modules/peers/manager/api.go
|
…#4367) * new bi-directional stream for jobs * create bidirectional job channel to send requests from the server and receive responses from the client * fix tests * fix lint and close bug * fix lint * clean up & fix close of closed channel * add nolint:staticcheck * remove some redundant code from the job channel PR since this one is a cleaner rewrite * cleanup removes a pending job safely * change proto * rename to jobRequest * apply feedback 1 * apply feedback 2 * fix typo * apply feedback 3 * apply last feedback



Describe your changes
This PR sets up a communication channel between the management server and the client to handle job requests and responses.
What was done:
Issue ticket number and link #4354
Stack
feature/remote-debug-Checklist
Documentation
Select exactly one:
Docs PR URL (required if "docs added" is checked)
Paste the PR link from https://github.com/netbirdio/docs here:
https://github.com/netbirdio/docs/pull/__