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

Removing container in PUT /flows/<flowid> doesn't unset it #11

Closed
samdbmg opened this issue Feb 5, 2025 · 3 comments
Closed

Removing container in PUT /flows/<flowid> doesn't unset it #11

samdbmg opened this issue Feb 5, 2025 · 3 comments
Assignees

Comments

@samdbmg
Copy link

samdbmg commented Feb 5, 2025

If you create a Flow with a container property set, and then try and remove the container property, I'd expect it to get removed, but it doesn't.

For example:

PUT /flows/e6d4de80-9a09-4ea8-a214-c16cc354ca68
{
  "id": "e6d4de80-9a09-4ea8-a214-c16cc354ca68",
  "source_id": "42088fcb-ce09-4215-baeb-2a18691c081d",
  "label": "My Flow",
  "container": "video/mp2t",
  "format": "urn:x-nmos:format:multi"
}

Then do (note the absence of the container property)

PUT /flows/e6d4de80-9a09-4ea8-a214-c16cc354ca68
{
  "id": "e6d4de80-9a09-4ea8-a214-c16cc354ca68",
  "source_id": "42088fcb-ce09-4215-baeb-2a18691c081d",
  "label": "My Flow",
  "format": "urn:x-nmos:format:multi"
}

I'd expect a GET /flows/e6d4de80-9a09-4ea8-a214-c16cc354ca68 to omit the container property, given the PUT semantic of replacing the object with the given body, but container is still there.
I've not tested this with any other property, but I could imagine the same bug affecting others too.

@danjhd
Copy link
Contributor

danjhd commented Feb 5, 2025

Acknowledged. Thank you. You are correct this behaviour will happen for any property used in a previous PUT that is then omitted in the follow up PUT.
This is not how this should behave.
As you suggest the correct behaviour should be to remove a property if it is not present in the follow up PUT.

@danjhd danjhd self-assigned this Feb 5, 2025
@danjhd
Copy link
Contributor

danjhd commented Feb 5, 2025

As a workaround in the meantime the solution would be to delete the flow and then re-create it. Be aware that deleting a flow will delete any associated segments.

This was referenced Feb 8, 2025
Merged
@danjhd
Copy link
Contributor

danjhd commented Feb 12, 2025

Resolved in v3.0 release

@danjhd danjhd closed this as completed Feb 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants