Skip to content
This repository was archived by the owner on Feb 26, 2025. It is now read-only.

Add build_bundles command #1474

Merged
merged 8 commits into from
Jul 4, 2024
Merged

Add build_bundles command #1474

merged 8 commits into from
Jul 4, 2024

Conversation

leplatrem
Copy link
Contributor

@leplatrem leplatrem commented Jul 1, 2024

  • POC
  • Only build for opted in collections
  • Align file names with ADR
  • Upload to Cloud Storage

@leplatrem leplatrem marked this pull request as ready for review July 2, 2024 17:18
f"{base_url}{DESTINATION_FOLDER}/changesets.zip"
)
if existing_bundle_timestamp is None:
print("No previous bundle found") # Should only happen once.

Choose a reason for hiding this comment

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

This could happen multiple times.Ex: if the bundle cannot be built due it being too large.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The changesets.zip will always be produced (and it's currently ~6MB) so once the job has ran once, the file will be there

attachments_bundle_filename = f"{bid}--{cid}.zip"

if not should_bundle:
bundles_to_delete.append(attachments_bundle_filename)

Choose a reason for hiding this comment

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

Nice, doing all the writes at the end later will prevent some possible contention issues.

Copy link

@alexcottner alexcottner left a comment

Choose a reason for hiding this comment

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

This looks great. Things on my mind now:

  1. We will need to emit some metrics to look at (have a ticket opened for that to follow up on later). We'll have a dashboard with basic stats on it to know how healthy things are.
  2. We will probably encounter at least 1 unknown after deploying. But since this will be out before any client code is even being tested, that's fine.

@leplatrem leplatrem merged commit 2a91ce1 into master Jul 4, 2024
2 checks passed
@leplatrem leplatrem deleted the bundle-job branch July 4, 2024 09:35
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants