Flow profiles#130
Conversation
himslm01
left a comment
There was a problem hiding this comment.
A few readability improvements.
Updated wording Co-authored-by: James Sandford <james.sandford@bbc.co.uk>
… flow-profiles
… flow-profiles
samdbmg
left a comment
There was a problem hiding this comment.
Looks good to me overall: a good approach of maintaining flexibility while constraining in a way to make it easier to use.
I've inlined a handful of suggestions, and a couple of nits
|
I've also kicked off the CI for you, so you should be able to see if it passes validation |
| { | ||
| "type": "object", | ||
| "description": "Describes the technical characteristics of a Flow (common properties to all Flows, imported by type-specific specifications)", | ||
| "title": "Flow Core", |
There was a problem hiding this comment.
NIT: Would be good to have the title updated as it keeps the rendered version more readable, there are currently two schemas rendered out as Flow Core
Co-authored-by: Sam Mesterton-Gibbons <sam@samn.co.uk>
Co-authored-by: Sam Mesterton-Gibbons <sam@samn.co.uk>
… flow-profiles
Co-authored-by: Georgina Shippey <9370167+GeorginaShippey@users.noreply.github.com>
Co-authored-by: Georgina Shippey <9370167+GeorginaShippey@users.noreply.github.com>
… flow-profiles
| For workflows where replication of the same content formats are happening on a regular basis then it is recommended that the same Profile is loaded into both stores using the same UUID. | ||
| This will mean than when Flows are replicated between the stores then the Profile identifier will continue to link to the metadata. | ||
|
|
||
| If the Profile does not exist within the destination store then the Profile ID should continue to be preserved. |
There was a problem hiding this comment.
Do we need to describe how this interacts with the Profiles endpoint? Should the Profile be created if it doesn't exist? If not, how does it interact with the creation of a Profile with a matching ID? I think the paragraph below covers some of this. It might help if that is moved above this para?
There was a problem hiding this comment.
I think there is a larger issue here which I'd not spotted. To create a flow you provide either a profile or the full flow metadata. If the profile does not exist in the store then you can't actually create the flow as there is no where to get the technical metadata from. So I think you either have to fail the creation and then the calling system either needs to create the profile and then re-try and flow creation or drop the profile and just create the flow directly. The first should be the preferred option as it retains the profile information.
| It is up to the store implementation whether this is normalised on the flow creation or read-only. | ||
|
|
||
| When creating a flow using a Profile it is not possible to override any specific fields as this would invalidate the link to the Profile. | ||
| Supplying a Profile ID and technical metadata should result in a 400 validation error |
There was a problem hiding this comment.
| Supplying a Profile ID and technical metadata should result in a 400 validation error | |
| Supplying a Profile ID and technical metadata defined within the specified Profile should result in a 400 validation error |
There was a problem hiding this comment.
The line above clearly says it is not possible to override the technical parameters of a profile, so the thinking was you supply a profile or technical metadata not both. So possibly might be better saying Supplying a Profile ID and any technical metadata should result in a 400 validation error
There was a problem hiding this comment.
Sorry, yes. I had it in my head that a partial profile could be used. But I think that's a future iteration. I think your tweaked message helps. Have we explicitly defined what constitutes "technical metadata" anywhere? Specifically in the human readable version of the spec.
| "204": | ||
| description: No content. The Flow has been updated. | ||
| "400": | ||
| description: Bad request. Invalid Flow JSON. |
There was a problem hiding this comment.
Do we need to add conflicting Profiles, and invalid Profile IDs to this return code?
Updated wording Co-authored-by: James Sandford <james.sandford@bbc.co.uk>
… flow-profiles
| @@ -1,10 +1,10 @@ | |||
| { | |||
| "title": "Audio Flow", | |||
| "description": "Describes an audio Flow", | |||
There was a problem hiding this comment.
When rendered, these descriptions end up as the flow_metadata description for each type at the /profiles endpoint. I think this is unintended given the specific description in the profile schema
There was a problem hiding this comment.
It's a little ugly, but the best way I could find to make this work is to move the description under the items in oneOf. I think it's because the description is tied to the selectable items, rather than the top level parameter.
| "type": "string", | ||
| "pattern": "^[^\\s\/]+/[^\\s\/]+$" | ||
| }, | ||
| "avg_bit_rate": |
There was a problem hiding this comment.
I think avg_bit_rate and max_bit_rate either need re-locating such that they aren't in the profile, or we need to add notes to their specific CRUD endpoints stating they can't be modified where profile is set. iirc, they are update-able because they can't always be known when the Flow ingest is configured (e.g. when configuring a push-based live ingest sink) and they may vary over time in some cases.
There was a problem hiding this comment.
For tracking purposes, after discussion the plan is as follows:
-
max_bit_ratewill move back to being in the flow as this is something that should be measured at the point of content creation and since it's not fixed should not be in the profile -
avg_bit_ratewill remain in the profile as in practise this should be the same as the value the encoder is using as it's target bitrate. Also for profiles to work you need to specify the target bitrate to be able to distinguish between different bitrate versions of the same codec (eg 50Mbps v 100Mbps). This change does effectively move average to being an expectation, which is how it's really being used and achieves the aim of the field, so the ADR which talks about this is going to need updating -
Wording needs to be added around what happens if someone tries to update a field in a flow which has come from a profile. It is expected that to do this the calling system will remove the
profile_idby leaving it blank which will break the link to the profile as part of update message. Updates where theprofile_idis still present SHOULD be rejected by the store as invalid with a suitable error message.
There was a problem hiding this comment.
I've put in #236 to consider making the bitrate thing clearer overall in the spec
Co-authored-by: James Sandford <james.sandford@bbc.co.uk>
Co-authored-by: James Sandford <james.sandford@bbc.co.uk>
Co-authored-by: James Sandford <james.sandford@bbc.co.uk>
Co-authored-by: James Sandford <james.sandford@bbc.co.uk>
Co-authored-by: James Sandford <james.sandford@bbc.co.uk>
Co-authored-by: James Sandford <james.sandford@bbc.co.uk>
… flow-profiles
| When a Flow is created from a Profile then it inherits all the technical characteristics from the Profile. | ||
| This means if that Flow then needs to be updated then consideration needs to be given to the fields which were inherited. | ||
|
|
||
| For the standard fields (eg label, description, tags) which form part of the common Flow metadata and provided directly regardless of the Profile then these can be updated through the standard process. |
There was a problem hiding this comment.
I think this and the following paragraph need to be moved/copied to the top level Flow PUT endpoint's top level description (the one in the main YAML file) and the average bitrate PUT as it describes normative behaviour Service implementations should implement and Clients should expect. AppNotes are usually considered Informative/advisory.
Details
Add the content of flow profiles to aid with the creation of flows in stores where there are house formats being used. Also significantly simplifies matching flows across edit by reference workflows
Jira Issue (if relevant)
Jira URL:
Related PRs
If merged before #115, add the new endpoints to the auth logic listings in that PR. If merged after, add that logic in this PR
Submitter PR Checks
(tick as appropriate)
Reviewer PR Checks
(tick as appropriate)
Info on PRs
The checks above are guidelines. They don't all have to be ticked, but they should all have been considered.