Skip to content

Conversation

@sliu008
Copy link
Contributor

@sliu008 sliu008 commented Aug 19, 2025

  • Added in requester pay to s3 download and upload function if it is in the config settings

def _get_s3_extra(self):
"""Helper to build the extra dict for S3 operations."""
extra = {}
if self.config.get("requester_pay", False):

Choose a reason for hiding this comment

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

Do we need to parse the value as a boolean here?

Suggested change
if self.config.get("requester_pay", False):
if f'{self.config.get("requester_pay", False)}.lower() == 'true':

or is the value in self.config already a boolean?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

i just tested the value is already a boolean

def _get_s3_extra(self):
"""Helper to build the extra dict for S3 operations."""
extra = {}
if self.config.get("requester_pay", False):
Copy link
Contributor

Choose a reason for hiding this comment

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

Would it be possible to update this config location to align with the other dmrpp flags like get_dmrpp_timeout i.e. the config.collection.meta.dmrpp (from collection) or config.dmrpp (from workflow)

The terraform variable is likely not needed for this PR, but it would be nice to keep these dmrpp specific variable flags consolidated to one location.

For this PR, it would just mean updating self.config.get to self.dmrpp_meta.get

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It’s technically possible, but I’m not sure it makes sense. This seems like it would apply on a per-collection basis, whereas what we actually need is for it to depend on where the DMRPP generator runs relative to the bucket location. Our goal is to enable requester pays specifically for cross-account S3 requests. If i were to do it on the collection config that means i would need to modify my collection configuration based on which env were running the dmrpp generator on.

I think i would prefer it on the config level where it is based on the step function workflow setup.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ahh ok i see, so in the dmrpp override in the workflows, i can work that in.

Copy link
Contributor

@camposeddie camposeddie left a comment

Choose a reason for hiding this comment

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

Looks good! Going to allow Charles some time to update #83 with the unit test/README updates then we should be able to merge both in and get a release available.

Thanks for the PR @sliu008 !

@camposeddie camposeddie merged commit 9df232c into ghrcdaac:master Aug 26, 2025
1 check failed
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