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

SEAB-6452: add hour to bucket key for GitHub redelivery #166

Merged
merged 1 commit into from
Jun 26, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion upsertGitHubTag/deployment/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,8 @@ function logPayloadToS3(body, deliveryId) {
const uploadYear = date.getFullYear();
const uploadMonth = (date.getMonth() + 1).toString().padStart(2, "0"); // ex. get 05 instead of 5 for May
const uploadDate = date.getDate().toString().padStart(2, "0"); // ex. get 05 instead of 5 for the 5th date
const bucketPath = `${uploadYear}-${uploadMonth}-${uploadDate}/${deliveryId}`;
const uploadHour = date.getHours().toString().padStart(2, "0"); // ex. get 05 instead of 5 for the 5th hour
const bucketPath = `${uploadYear}-${uploadMonth}-${uploadDate}/${uploadHour}/${deliveryId}`;
Copy link
Contributor

Choose a reason for hiding this comment

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

Apologies, I should have noted this in the previous PR, but why not separate each date component by a slash? That way they'd be more browseable.

Also, would recommend changing Date to Day, more specific.


const command = new PutObjectCommand({
Bucket: process.env.BUCKET_NAME,
Expand Down
Loading