Skip to content
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

Jobs and services: Define creation parameters #276 #471

Open
wants to merge 5 commits into
base: draft
Choose a base branch
from

Conversation

m-mohr
Copy link
Member

@m-mohr m-mohr commented Nov 15, 2022

GET /jobs and GET /services: Added create_parameters property in responses to define the parameters that can be submitted when creating jobs or services.

I'm not 100% sure whether adding these parameters to GET /jobs and GET /services is ideal as they would always be served whenever a job/service list will be served or paginated. We could also add the data to two new endpoints.

Implements #276

… define the parameters that can be submitted suring creation #276
@m-mohr m-mohr added job management incl. /result service management minor requires a minor-version (x.1.0 for example) labels Nov 15, 2022
@m-mohr m-mohr added this to the 1.2.0 milestone Nov 15, 2022
@m-mohr m-mohr linked an issue Nov 15, 2022 that may be closed by this pull request
@soxofaan
Copy link
Member

soxofaan commented Nov 15, 2022

I'm not 100% sure whether adding these parameters to GET /jobs and GET /services is ideal as they would always be served whenever a job/service list will be served or paginated. We could also add the data to two new endpoints.

Indeed, I also find it strange to add this to the endpoints were we currently list actual jobs/services.
Can't we just add this to the general capabilities doc / ?
We already list some request aspects there anyway, like

  "endpoints": [
...
    {
      "methods": [ "GET", "POST"],
      "path": "/jobs"
    },
    {
      "methods": ["GET", "DELETE"],
      "path": "/jobs/{job_id}"
    },
...

@m-mohr
Copy link
Member Author

m-mohr commented Nov 15, 2022

I'm hesistant to add it there to keep it simple/small and not delay the request too much, because it's the first one and should not block additional requests because it needs to wait for some options to be retrieved. We also have /service_types externally for this reason.

@soxofaan
Copy link
Member

to keep it simple/small and not delay the request too much,

maybe I'm misunderstanding, but I don't think a reasonable implementation of the API will be delayed by adding a couple of fields the the capabilities document.

@soxofaan
Copy link
Member

I get that it feels normal from the web editor point of view, because you probably list a user's jobs before they are able to create a new one.

But in case of less interactive or lazy client environments like python client usage: it's a bit weird that the client first has to request GET /jobs in order to create a new job.

@m-mohr
Copy link
Member Author

m-mohr commented Nov 15, 2022

No, I think you understood correctly, but I also assumed that with other endpoints and it did turnout that this was a false assumption. So maybe we just add a new endpoint that returns these options (then likely called job_create_parameters and service_create_parameters or so).

@m-mohr
Copy link
Member Author

m-mohr commented Nov 16, 2022

I've updated the PR to have a dedicated (optional) endpoint.

openapi.yaml Outdated Show resolved Hide resolved
@m-mohr m-mohr marked this pull request as ready for review November 28, 2022 14:43
@m-mohr m-mohr removed this from the 1.2.0 milestone Dec 21, 2022
@m-mohr
Copy link
Member Author

m-mohr commented Apr 18, 2023

This PR only specifies what happens for POST requests (reflected in descriptions and field names create_...), but doesn't say anything about update. -> todo

@m-mohr m-mohr self-assigned this Apr 18, 2023

The options specified here can be added to the corresponding `POST` requests
at the top-level of the object that is sent as the payload.
All options SHOULD explicitly be made optional with reasonable defaults
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Couple of slightly related notes/questions:

  • are the defaults global or can they depend on user (e.g. subscription level or some other property)?
  • is it allowed to use a default like null in the public parameter specification which allows the backend to use a an actual fallback value that is not public or dynamic in some sense (e.g. user dependent, dependent on current cluster load, automatically derived from spatial/temporal extent, ...)?
  • is it necessary to cover these concerns in the description?

@m-mohr m-mohr modified the milestones: 1.2.0, 1.3.0 May 2, 2023
@m-mohr
Copy link
Member Author

m-mohr commented May 3, 2023

Moved this from 1.2.0 to 1.3.0. Implementors are free to implement this proposal and give feedback, but it didn't feel fully fleshed out yet for a release in 1.2.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feedback required job management incl. /result minor requires a minor-version (x.1.0 for example) service management
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Batch job options/configuration settings
3 participants