Skip to content

Conversation

@jonavellecuerdo
Copy link
Contributor

Purpose and background context

The S3 bucket configured for DSC will include MITL's AWS account ID to ensure that the name of the bucket meets S3's requirement of uniqueness "across all AWS accounts in all the AWS regions within a partition". Since the AWS account IDs differ for Dev, Stage, and Prod, it would be difficult to dyna- mically generate the name of the S3 bucket; it also wouldn't be ideal to include the AWS account IDs as part of version control. Accessing the name of the S3 bucket via environment variable is the ideal and most secure option.

How can a reviewer manually see the effects of these changes?

Running make test and verifying all tests are passing is sufficient for this review.

Includes new or updated dependencies?

NO

Changes expectations for external applications?

YES - Env var S3_BUCKET must be set in the ECS task definition

What are the relevant tickets?

Developer

  • All new ENV is documented in README
  • All new ENV has been added to staging and production environments
  • All related Jira tickets are linked in commit message(s)
  • Stakeholder approval has been confirmed (or is not needed)

Code Reviewer(s)

  • The commit message is clear and follows our guidelines (not just this PR message)
  • There are appropriate tests covering any new functionality
  • The provided documentation is sufficient for understanding any new functionality introduced
  • Any manual tests have been performed or provided examples verified
  • New dependencies are appropriate or there were no changes

Why these changes are being introduced:
* The S3 bucket configured for DSC will include MITL's
AWS account ID to ensure that the name of the bucket meets
S3's requirement of uniqueness "across all AWS accounts in all
the AWS regions within a partition". Since the AWS account IDs
differ for Dev, Stage, and Prod, it would be difficult to dyna-
mically generate the name of the S3 bucket; it also wouldn't be
ideal to include the AWS account IDs as part of version control.
Accessing the name of the S3 bucket via environment variable
is the ideal and most secure option.

How this addresses that need:
* Add 'S3_BUCKET' as a required env var
* Set Workflow.s3_bucket as a final, property method that accesses
'S3_BUCKET' env var via Config
* Remove 's3_bucket' property methods from all workflows

Side effects of this change:
* The environment variable 'S3_BUCKET' must be set as part of the
ECS task definition.

Relevant ticket(s):
* https://mitlibraries.atlassian.net/browse/IN-1227
@jonavellecuerdo jonavellecuerdo marked this pull request as ready for review April 15, 2025 16:47
@jonavellecuerdo jonavellecuerdo requested a review from a team as a code owner April 15, 2025 16:47
@coveralls
Copy link

coveralls commented Apr 15, 2025

Pull Request Test Coverage Report for Build 14478397248

Details

  • 13 of 14 (92.86%) changed or added relevant lines in 2 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.2%) to 95.59%

Changes Missing Coverage Covered Lines Changed/Added Lines %
dsc/config.py 11 12 91.67%
Totals Coverage Status
Change from base Build 13923176460: 0.2%
Covered Lines: 737
Relevant Lines: 771

💛 - Coveralls

Copy link

@ghukill ghukill left a comment

Choose a reason for hiding this comment

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

Approved! Left a comment where some additional explanation could be helpful in the README, but not required.

@jonavellecuerdo jonavellecuerdo merged commit 42a3d19 into main Apr 15, 2025
3 checks passed
@jonavellecuerdo jonavellecuerdo deleted the IN-1227-update-dsc-to-use-s3-bucket branch April 15, 2025 20:08
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.

4 participants