diff --git a/src/sentry/profiles/data_export.py b/src/sentry/profiles/data_export.py index 07a5cacd88b532..791c51c67b9d28 100644 --- a/src/sentry/profiles/data_export.py +++ b/src/sentry/profiles/data_export.py @@ -44,7 +44,7 @@ def export_profiles_data( gcp_project_id=gcp_project_id, transfer_job_name=None, source_bucket=source_bucket, - source_prefix=f"{organization_id}", + source_prefix=f"{organization_id}/", destination_bucket=destination_bucket, destination_prefix=destination_prefix, notification_topic=pubsub_topic_name, diff --git a/src/sentry/replays/data_export.py b/src/sentry/replays/data_export.py index 43beb5938ca811..1e3dff441e63e4 100644 --- a/src/sentry/replays/data_export.py +++ b/src/sentry/replays/data_export.py @@ -593,7 +593,7 @@ def export_replay_blob_data[T]( gcp_project_id=gcp_project_id, transfer_job_name=None, source_bucket=source_bucket, - source_prefix=f"{retention_days}/{project_id}", + source_prefix=f"{retention_days}/{project_id}/", destination_bucket=destination_bucket, destination_prefix=destination_prefix, notification_topic=pubsub_topic_name, diff --git a/tests/sentry/replays/unit/test_data_export.py b/tests/sentry/replays/unit/test_data_export.py index 831f0921d7dd37..5f9dfa8949796b 100644 --- a/tests/sentry/replays/unit/test_data_export.py +++ b/tests/sentry/replays/unit/test_data_export.py @@ -109,6 +109,6 @@ def test_export_replay_blob_data() -> None: # Assert a job is created for each retention-period. assert len(jobs) == 3 - assert jobs[0].transfer_job.transfer_spec.gcs_data_source.path == "30/1" - assert jobs[1].transfer_job.transfer_spec.gcs_data_source.path == "60/1" - assert jobs[2].transfer_job.transfer_spec.gcs_data_source.path == "90/1" + assert jobs[0].transfer_job.transfer_spec.gcs_data_source.path == "30/1/" + assert jobs[1].transfer_job.transfer_spec.gcs_data_source.path == "60/1/" + assert jobs[2].transfer_job.transfer_spec.gcs_data_source.path == "90/1/"