Skip to content

Conversation

@leplatrem
Copy link
Contributor

No description provided.

referenced attachments
datetime.timezone.utc
) + datetime.timedelta(days=POSTPONE_DELETION_MARK_DAYS)
blob.patch()
blob.reload()
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we're going to need to do a rewrite here instead of setting it into the future.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

In the end, downloading and reuploading at that same spot is what worked

@leplatrem
Copy link
Contributor Author

AUTH=$STAGE_AUTH ENV=dev python bin/check-workspace-attachments.py
132 collections to analyze
Found 1857 draft attachments in total
32 attachments are only referenced in workspace buckets
0 missing attachments found.

Checking GCS for deletion marks...
3084 attachments are marked for deletion in GCS.
⚠️ 32 attachments referenced in workspace/preview/main buckets are marked for deletion in GCS.
Rewrite gs://remote-settings-nonprod-dev-attachments/main-workspace/content-relevance/d241b523-5112-4d67-b6d4-907ff51cc1a6.json using backup at /tmp/tmp5jjh_qzw ..... Done.
Removed deletion mark of gs://remote-settings-nonprod-dev-attachments/main-workspace/content-relevance/d241b523-5112-4d67-b6d4-907ff51cc1a6.json
Rewrite gs://remote-settings-nonprod-dev-attachments/main-workspace/content-relevance/6582ec92-5a8c-4e8a-96f1-90beebc5ab76.json using backup at /tmp/tmpmfhqjfm0 ..... Done.
Removed deletion mark of gs://remote-settings-nonprod-dev-attachments/main-workspace/content-relevance/6582ec92-5a8c-4e8a-96f1-90beebc5ab76.json
Rewrite gs://remote-settings-nonprod-dev-attachments/main-workspace/content-relevance/2b5b36f3-109c-4fe8-bdbc-002828ea7a5a.json using backup at /tmp/tmpiu1qohq8 ..... Done.
Removed deletion mark of gs://remote-settings-nonprod-dev-attachments/main-workspace/content-relevance/2b5b36f3-109c-4fe8-bdbc-002828ea7a5a.json
Rewrite gs://remote-settings-nonprod-dev-attachments/main-workspace/content-relevance/5a8c4ebf-c019-4ac0-9f45-1959ce48d593.json using backup at /tmp/tmpmcp1898n ..... Done.
Removed deletion mark of gs://remote-settings-nonprod-dev-attachments/main-workspace/content-relevance/5a8c4ebf-c019-4ac0-9f45-1959ce48d593.json
Rewrite gs://remote-settings-nonprod-dev-attachments/main-workspace/content-relevance/ae58fac4-a2bb-4d72-9f56-94e8e598b224.json using backup at /tmp/tmpczs2_ntw ..... Done.
Removed deletion mark of gs://remote-settings-nonprod-dev-attachments/main-workspace/content-relevance/ae58fac4-a2bb-4d72-9f56-94e8e598b224.json
Rewrite gs://remote-settings-nonprod-dev-attachments/main-workspace/content-relevance/567b1561-cf27-4f69-b968-0e15910f1fd2.json using backup at /tmp/tmpv87g_g4i ..... Done.
Removed deletion mark of gs://remote-settings-nonprod-dev-attachments/main-workspace/content-relevance/567b1561-cf27-4f69-b968-0e15910f1fd2.json
Rewrite gs://remote-settings-nonprod-dev-attachments/main-workspace/content-relevance/2e229335-d387-41b9-813a-6121278defdd.json using backup at /tmp/tmpeu5jkbq2 ..... Done.
Removed deletion mark of gs://remote-settings-nonprod-dev-attachments/main-workspace/content-relevance/2e229335-d387-41b9-813a-6121278defdd.json
Rewrite gs://remote-settings-nonprod-dev-attachments/main-workspace/content-relevance/0c9e279c-ea08-4820-a7d3-69d36af06e79.json using backup at /tmp/tmpoc40p2j6 ..... Done.
Removed deletion mark of gs://remote-settings-nonprod-dev-attachments/main-workspace/content-relevance/0c9e279c-ea08-4820-a7d3-69d36af06e79.json
...

Then

✗ AUTH=$STAGE_AUTH ENV=dev python bin/check-workspace-attachments.py
auth= <kinto_http.BearerTokenAuth object at 0x106edaff0>
132 collections to analyze
Found 1857 draft attachments in total
32 attachments are only referenced in workspace buckets
0 missing attachments found.

Checking GCS for deletion marks...
3052 attachments are marked for deletion in GCS.
✅ No attachment referenced in workspace/preview/main buckets is marked for deletion in GCS.

@leplatrem leplatrem merged commit cd7cc1b into main Jan 20, 2026
11 checks passed
@leplatrem leplatrem deleted the check-workspace-attachments-2 branch January 20, 2026 15:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants