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-5604: fix date for the github lambda bucket #163

Merged
merged 2 commits into from
Apr 19, 2024

Conversation

hyunnaye
Copy link
Contributor

Description
We noticed the events in the new github s3 bucket is creating folders with a wrong current date.

This was because the getMonth function is zero-index based so we have to add 1 to get the correct month.

Issue
https://ucsc-cgl.atlassian.net/browse/SEAB-5604

Security
If there are any concerns that require extra attention from the security team, highlight them here.

Please make sure that you've checked the following before submitting your pull request. Thanks!

  • Ensure that the PR targets the correct branch. Check the milestone or fix version of the ticket.

@hyunnaye hyunnaye self-assigned this Apr 19, 2024
const bucketPath = `${uploadDate.getFullYear()}-${uploadDate.getMonth()}-${uploadDate.getDay()}/${deliveryId}`; //formats path to YYYY-MM-DD/deliveryid
const bucketPath = `${uploadDate.getFullYear()}
-${uploadDate.getMonth() + 1}
-${uploadDate.getDate()}/${deliveryId}`; //formats path to YYYY-MM-DD/deliveryid
Copy link
Member

Choose a reason for hiding this comment

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

Worth double-checking that the date is 0 or 1 indexed?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@hyunnaye hyunnaye merged commit 1666f6e into develop Apr 19, 2024
12 checks passed
@denis-yuen denis-yuen deleted the feature/seab-5604-date-fix branch April 19, 2024 17:58
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.

3 participants