-
Notifications
You must be signed in to change notification settings - Fork 32
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
api/vod: Inline storage info in the asset resource #1014
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
489bab1
to
406227f
Compare
1ebf61d
to
d63aa24
Compare
This avoid the bug where we would call withPlaybackUrl on an un-compated asset as well.
0448167
to
8af6016
Compare
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.
Saving my comments mid review before I lose them
Codecov Report
@@ Coverage Diff @@
## master #1014 +/- ##
===================================================
+ Coverage 46.14048% 48.63870% +2.49822%
===================================================
Files 64 65 +1
Lines 4029 4077 +48
Branches 679 689 +10
===================================================
+ Hits 1859 1983 +124
+ Misses 1971 1866 -105
- Partials 199 228 +29
Continue to review full report at Codecov.
|
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.
LGTM
What does this pull request do? Explain your changes. (required)
This is an improvement proposal to the VOD API, from some feedback that we've already got from users
and evolutions we would like to make to the API for easier use, like. for example for abstraction-matching
the new VOD dashboard pages. The changes are specifically regarding the relation between assets and
tasks and more extensively with the export to IPFS task.
The idea is that instead of having an asset loosely tied to a bunch of export tasks, it will now have explicit
fields for the current desired storage for the asset and status for those storages (as it can take a while until
the desired state becomes reality). This storage is currently only IPFS, but we will add other d3 storages in
the future. The object store ID is not changeable for now.
There's a whole migration strategy for the
status
field of the assets that have changed:0
), we can remove the compatibility codeWe are actually breaking the public schema of assets, but I believe this should be OK since it's not being
used in many places. This new design is more extensible and will allow us to make other changes in the future
without breaking compatibility again.
Specific updates (required)
status
field in the asset be an object just like from tasks. The previousstatus
becomesstatus.phase
and the previousupdatedAt
becomesstatus.updatedAt
.storage
field in the asset and allow patching itstorage
andstatus
field on the right places (when exporting an asset on IPFS, when tasks finish, etc)www
code to use the newstatus
field (all responses will come with that from day1, old schema will be only in the DB)Pending:
video-nft
SDK with new asset schema-
yarn test
, running all the new VOD tests!I'll try to add some unit tests here while this gets reviewed, otherwise will test locally and/or on staging.
Does this pull request close any open issues?
Implements #1020
Checklist: