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

Random object IDs ADR and implementation #34

Merged
merged 6 commits into from
Mar 28, 2024
Merged

Conversation

philipnbbc
Copy link
Contributor

Details

This PR proposes a change to the /<flow-id>/storage endpoint to essentially return a list of PUT URLs for uploading media objects, where each request generates a unique list of object IDs. The segmentation and timeranges restrictions have been removed.

The implementation has:

  • removed timerange from the storage endpoint request and response
  • renamed "segments" to "media_objects" in the response
  • removed paging headers as there is no longer an ordered list of pages
  • removed the requirement that the start timestamp of a media object starts within a storage segment's timerange
  • changed instance of "segment", "flow segment object" and "storage segment" to use "media object" instead to reflect that there is no longer a need for a distinct storage segment concept.

Pivotal Story (if relevant)

Story URL: https://www.pivotaltracker.com/story/show/187193684

Related PRs

Where appropriate. Indicate order to be merged.

Submitter PR Checks

(tick as appropriate)

  • PR completes task/fixes bug
  • API version has been incremented if necessary
  • ADR status has been updated, and ADR implementation has been recorded
  • Documentation updated (README, etc.)
  • PR added to Pivotal story (if relevant)
  • Follow-up stories added to Pivotal

Reviewer PR Checks

(tick as appropriate)

  • PR completes task/fixes bug
  • Design makes sense, and fits with our current code base
  • Code is easy to follow
  • PR size is sensible
  • Commit history is sensible and tidy

Info on PRs

The checks above are guidelines. They don't all have to be ticked, but they should all have been considered.

The response of /<flow id>/storage has "segments" renamed to
"media_objects" to reflect there is no longer a need for the concept
of a storage segment that is distinct from the media object. The
request and response have no timeranges. The response no longer has
paging headers.

Some wording has been changed to use media object instead of "flow
segment media object" or "flow segment object" or "storage segment".

The start timestamp falling within the storage segment timerange
restriction has been removed

sem-ver: api-break
@philipnbbc philipnbbc force-pushed the philipn-random-object-ids branch from 89f0172 to 57df67b Compare March 21, 2024 12:38
@philipnbbc philipnbbc marked this pull request as ready for review March 21, 2024 12:39
@philipnbbc philipnbbc requested a review from a team as a code owner March 21, 2024 12:39
Copy link
Member

@samdbmg samdbmg left a comment

Choose a reason for hiding this comment

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

LGTM - couple of nits and comments on the ADR inlined

docs/adr/decisions/0011-random-storage-object-ids.md Outdated Show resolved Hide resolved
docs/adr/decisions/0011-random-storage-object-ids.md Outdated Show resolved Hide resolved
docs/adr/decisions/0011-random-storage-object-ids.md Outdated Show resolved Hide resolved
docs/adr/decisions/0011-random-storage-object-ids.md Outdated Show resolved Hide resolved
api/schemas/flow-storage.json Outdated Show resolved Hide resolved
philipnbbc and others added 3 commits March 22, 2024 13:35
Co-authored-by: Sam Mesterton-Gibbons <[email protected]>
Implements part of ADR0012 to make the `get_url` and `put_url` fields in
Flow Segments mandatory.
@philipnbbc philipnbbc force-pushed the philipn-random-object-ids branch from 2030c2b to 2d7f63b Compare March 22, 2024 13:46
@philipnbbc philipnbbc force-pushed the philipn-random-object-ids branch from 2d7f63b to 7443d38 Compare March 22, 2024 13:48
@philipnbbc philipnbbc merged commit dfbc8f5 into main Mar 28, 2024
3 checks passed
@philipnbbc philipnbbc deleted the philipn-random-object-ids branch March 28, 2024 10:02
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

Successfully merging this pull request may close these issues.

2 participants