-
Notifications
You must be signed in to change notification settings - Fork 2
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
New server #130
New server #130
Conversation
12cbcb4
to
6594881
Compare
Please add |
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.
We may want to:
- Add pagination on endpoints that return a list.
- Use dedicated endpoints to allow
POST
on variables (such as/services/[service-id]/variables
and/services/[service-id]/components/[component-id]/variables
or even moving it under the/variables
endpoint). - Remove
POST
/variables/{import_file}
, this doesn't make sense. - Change
/variables/validation
from aPOST
to aGET
method. Also, it could be moved to only/validate-variables
or/validate
. - Drop the usage of nouns to describe actions endpoints. We are not exactly doing REST here.
- Remove the
/status
endpoint if its informations can be returned in the "services" and "components" endpoints. - Fix deployments
POST
routes (idk what "Post Dag", "Post Operations", "Post Resumumption" and "Post Reconfiguration" refer to). We may also want to move the deploy action out:-
GET
/deployments
: list past deployments. -
GET
/deployments/{deployment-id}
: display a deployment. -
GET
/deployments/{deployment-id}/operations/{operation-order}/logs
: display complete logs for an operation. -
POST
/deploy
: launch the planned deployment. -
POST
/plan/[from-dag|from-operations|import|reconfigure|resume]
: create a new deployment plan.
-
- Add the following missing endpoints:
-
GET
the variables schemas. -
POST
a custom deployment plan (used for plan edition and creation from scratch). -
GET
status history for a single component.
-
- Use
404
instead of400
when a given id doesn't exist.
I may miss some things but that would be a good start.
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.
-
Why did you dissociate
/services
from/services/status
? Same for specific services and components. You can send status infos on the main endpoints. For example,GET
/services/{service-id}
:{ ...pagination infos "items": [ { "id": "hdfs", "name": "HDFS", "status": "RUNNING", "configured_version": "ff4627859010bbd6f43808b51121972c0345bbc0", "running_version": "ff4627859010bbd6f43808b51121972c0345bbc0", "variables_url": "https://...", "schema_url": "https://..." }, ... ] }
-
It seems that you've also got some trouble with pagination. Pagination options should NOT appear on
POST
endpoints. -
/plan
endpoint miss options. -
We may want to use options instead of specific endpoint to filter operations (
/operations/dag
and/operations/others
). -
GET
/variables
is not useful. Variables are specified for a component or a service. That doesn't make sense to fetch all variables at once from the same endpoint. -
Same for
GET
/variables/schemas
, they are directly linked to a service, we could fetch them withGET
/service/{service-ud}/schema
. -
GET
/deployment/{deployment-id}
response could be more structured. You should dissociate values that are common to all deployments from the "deployment options" which depends on the deployment type. -
I'm not sure about the use of a
422
onGET
endpoints (GET
/services/{service-id}
for example). -
You can add a
GET
method on/services/{service-id}/variables
(same for components).
I saw that you didn't fixed all of my first batch of comments. Don't hesitate to comment if you want / need to discuss some of them.
|
Removed the methods put and patch in the endpoints services and components since their goal was to update the variables of the service/component and we have now a service/variables and component/variables endpoint. However I would like to have your opinion on that. |
|
|
I wonder if:
|
The response_schema for |
Also, we should list components available for a service somewhere. |
The |
I have alos added a test framework which for now only has 3 simple tests, but we will work on that once we start implementing the endpoint functions |
Discussion
This PR is a server started from scratch although it has been inspired by the previous one.
pyproject.toml
.Agreements