-
Notifications
You must be signed in to change notification settings - Fork 48
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
pipeline-manager: pipeline GET selector and allow missing in POST/PUT #3161
Conversation
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.
There is a lot of unwrap() added now which wasnt there before? I wonder why these fields are now optional? Generally its nice to know that some fields are set (which they should be, e.g. pipeline name) and unwrap shouldnt be necessary so I am not convinced its a good change?
7559c03
to
654b760
Compare
Fair point, I've made the 13 fields which are common across both selectors to be required again (id, name, description, created_at, version, platform_version, program_version, program_status, program_status_since, deployment_status, deployment_status_since, deployment_desired_status, deployment_error). The other 6 fields (runtime_config, program_code, udf_rust, udf_toml, program_config, program_info) are still kept optional. I've also separated it into Could you take another look @gz ? |
Does it need changes to Python as well (cc @abhizer ) |
As far as I could see, the Python API could take advantage of e.g., GET of only status, but it shouldn't be affected by the changes themselves. What do you think @abhizer ? |
I think this change makes sense, I'm not so sure about the next ones though
I don't understand the problem we're trying to solve? Bandwidth of loading a big pipeline? Why do we need to separate with a selector (could we just have a different endpoint to get status information only?). Or if bandwidth was a problem why isn't just having a
why do we need to remove them? is there harm in showing it? |
No, it doesn't require any changes to python. But once this goes in, I'll create a PR to use |
Selecting only some of the fields can be relatively large (10-50 KiB for each pipeline, depending on program size, really large can be up to 4 MiB). The UI displays a status list of all the pipelines, which it fetches every 500ms or 1s. As such, let's say 10 pipelines, it can be 1 MiB/s, though it can get a lot higher when we're talking about 100s of pipelines (pagination might even be necessary in future). Hence the name The current Regarding internal fields, if they are not exposed through the API, then the internal workings can still be changed without having to do a major version bump. If that is not an issue/it's important for debugging at this stage, I can keep them in. |
I'm not sure making it a separate endpoint would be a good idea, it seems difficult to name consistently. E.g., |
The `code` query parameter for the retrieval of a list of pipelines is replaced because it is not descriptive enough and its boolean value is not expressive enough. It is replaced by the `selector` query parameter, which can be set to `status` for only status-related information or `all` (default) for all fields. The internal fields of the pipeline descriptor are no longer included in the API response. When POST or PUT a pipeline, currently the API requires supplying a value for all fields. This commit instead allows the `description`, `runtime_config`, `udf_rust`, `udf_toml`, and `program_config` to not be specified (or `null`). Fields `name` and `program_code` remain required. This commit includes edits to the CLI client `fda` and the Web Console to handle the aforementioned API changes. Signed-off-by: Simon Kassing <[email protected]>
The
code
query parameter for the retrieval of a list of pipelines is replaced because it is not descriptive enough and its boolean value is not expressive enough. It is replaced by theselector
query parameter, which can be set tostatus
for only status-related information orall
(default) for all fields. The internal fields of the pipeline descriptor are no longer included in the API response.When POST or PUT a pipeline, currently the API requires supplying a value for all fields. This commit instead allows the
description
,runtime_config
,udf_rust
,udf_toml
, andprogram_config
to not be specified (ornull
). Fieldsname
andprogram_code
remain required.This commit includes edits to the CLI client
fda
and the Web Console to handle the aforementioned API changes.