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

api: Soft deletion of object store objects #1276

Merged
merged 5 commits into from
Sep 16, 2022

Conversation

victorges
Copy link
Member

What does this pull request do? Explain your changes. (required)
Differently from other APIs, we were not only soft deleting Object Stores when their
deletion was requested. This is bad because the references to ObjectStore objects are
made in other objects like assets and stream recordings, so we don't really want to lose
all data regarding those deleted OSes.

Specific updates (required)

  • Migrate object-store controller to TypeScript
  • Starting using markDeleted instead of delete on object store for soft deletion behavior
  • Fix usage of object store by always checking deleted field (and disabled)

-

  • How did you test each of these updates (required)
    yarn test

Does this pull request close any open issues?
No.

Checklist:

  • I have read the CONTRIBUTING document.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.

@victorges victorges requested a review from a team as a code owner September 14, 2022 20:18
@vercel
Copy link

vercel bot commented Sep 14, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
livepeer-studio ✅ Ready (Inspect) Visit Preview Sep 14, 2022 at 8:18PM (UTC)

@codecov
Copy link

codecov bot commented Sep 14, 2022

Codecov Report

Merging #1276 (a2aaaed) into master (213992d) will decrease coverage by 0.09093%.
The diff coverage is 48.93617%.

Impacted file tree graph

@@                 Coverage Diff                 @@
##              master       #1276         +/-   ##
===================================================
- Coverage   51.11983%   51.02890%   -0.09094%     
===================================================
  Files             66          66                 
  Lines           4331        4325          -6     
  Branches         785         801         +16     
===================================================
- Hits            2214        2207          -7     
+ Misses          1838        1837          -1     
- Partials         279         281          +2     
Impacted Files Coverage Δ
packages/api/src/controllers/asset.ts 55.67010% <0.00000%> (ø)
packages/api/src/controllers/stream.ts 49.20635% <40.00000%> (-0.08051%) ⬇️
packages/api/src/controllers/helpers.ts 47.77070% <50.00000%> (-0.61640%) ⬇️
packages/api/src/controllers/object-store.ts 64.17910% <54.28571%> (ø)
packages/api/src/store/model.ts 41.37931% <0.00000%> (-8.04599%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 213992d...a2aaaed. Read the comment docs.

Impacted Files Coverage Δ
packages/api/src/controllers/asset.ts 55.67010% <0.00000%> (ø)
packages/api/src/controllers/stream.ts 49.20635% <40.00000%> (-0.08051%) ⬇️
packages/api/src/controllers/helpers.ts 47.77070% <50.00000%> (-0.61640%) ⬇️
packages/api/src/controllers/object-store.ts 64.17910% <54.28571%> (ø)
packages/api/src/store/model.ts 41.37931% <0.00000%> (-8.04599%) ⬇️

Copy link
Member

@gioelecerati gioelecerati left a comment

Choose a reason for hiding this comment

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

LGTM!

packages/api/src/schema/schema.yaml Show resolved Hide resolved
@victorges victorges merged commit d6044aa into master Sep 16, 2022
@victorges victorges deleted the vg/fix/object-store-delete branch September 16, 2022 22:29
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.

None yet

2 participants