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

feat: remove og lts recording storage #25945

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open

Conversation

pauldambra
Copy link
Member

@pauldambra pauldambra commented Nov 1, 2024

We changed the format we store recordings into the long term storage S3 bucket on 1st August 2023

Recordings last at most 1 year in LTS

So, they have all been deleted.

We can therefore delete all of the code to do with handling the old version


## TODO

  • tidy up persistence code
  • test that loading recordings from ingestion s3 still works
  • test that persistence to LTS still works
  • test that loading recordings from LTS s3 still works
  • delete front-end code that handles multiple formats maybe??


recording.load_metadata()

if not recording.start_time or timezone.now() < recording.start_time + MINIMUM_AGE_FOR_RECORDING:
# Recording is too recent to be persisted.
# We can save the metadata as it is still useful for querying, but we can't move to S3 yet.
logger.info(
Copy link
Member Author

Choose a reason for hiding this comment

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

i've not looked at these logs in a year, let's remove them

return "/".join(path_parts)
elif version == "2023-08-01":
return self._build_session_blob_path(settings.OBJECT_STORAGE_SESSION_RECORDING_LTS_FOLDER)
def build_object_lts_path(self, version: Literal["2023-08-01"]) -> str:
Copy link
Member Author

Choose a reason for hiding this comment

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

this method name confused me even in the context of dealing with LTS storage -> rename

Comment on lines +101 to +105
assert object_storage_client().list_objects(OBJECT_STORAGE_BUCKET, blob_path) == [
f"{blob_path}/a",
f"{blob_path}/b",
f"{blob_path}/c",
]
Copy link
Member Author

Choose a reason for hiding this comment

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

my change at first broke this test but it failed elsewhere... added this assertion so that i got a meaningful failure

might_have_realtime = False
blob_prefix = recording.object_storage_path
blob_keys = object_storage.list_objects(cast(str, blob_prefix))
might_have_realtime = False
Copy link
Member Author

Choose a reason for hiding this comment

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

there was a bug here, that we didn't set might_have_realtime as false for these recordings

good job it didn't take a year to spot it 🙈

@pauldambra pauldambra requested a review from a team November 1, 2024 21:05
Copy link
Contributor

github-actions bot commented Nov 1, 2024

Size Change: 0 B

Total Size: 1.15 MB

ℹ️ View Unchanged
Filename Size
frontend/dist/toolbar.js 1.15 MB

compressed-size-action

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.

1 participant