-
Notifications
You must be signed in to change notification settings - Fork 1.1k
feat: Make dynamo table tagging opt-in #5438
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
base: master
Are you sure you want to change the base?
Conversation
Signed-off-by: Rob Howley <rhowley@seatgeek.com>
Signed-off-by: Rob Howley <rhowley@seatgeek.com>
8a96b86
to
acbaad4
Compare
Signed-off-by: Rob Howley <rhowley@seatgeek.com>
pass | ||
|
||
|
||
class _DynamoTableManager: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the online store class has become a cluttered god class, move the dynamo table creation/destruction to a helper class
@retry( | ||
wait=wait_exponential(multiplier=1, max=4), | ||
retry=retry_if_exception_type(RetryableBotoError), | ||
stop=stop_after_attempt(3), | ||
reraise=True, | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tagging a lot of dynamo tables can lead to api rate limiting errors, retry with backoff
tag_aws_resources: StrictBool = False | ||
"""Add the feature-view tags to the underlying AWS dynamodb tables""" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this feature isnt strictly necessary (though a good idea!) and results in a a few extra aws api calls per feature view, so make it opt in.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks Good , some comments!
|
||
class _DynamoTableManager: | ||
def __init__( | ||
self, dynamodb_resource, config: RepoConfig, feature_view: FeatureView |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
self, dynamodb_resource, config: RepoConfig, feature_view: FeatureView | |
self, dynamodb_resource, config: RepoConfig, table: FeatureView |
I would rather keep the parameter name in the context of Database that is table but accept FeatureView object as is suggests.
self, dynamodb_resource, config: RepoConfig, feature_view: FeatureView | ||
): | ||
self.config = config | ||
self.feature_view = feature_view |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
self.feature_view = feature_view | |
self.feature_view = table |
AttributeDefinitions=[ | ||
{"AttributeName": "entity_id", "AttributeType": "S"} | ||
], | ||
BillingMode="PAY_PER_REQUEST", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think billing mode should be taken for parameters and not hardcoded ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- @robhowley can you set this as something configurable with the default being
PAY_PER_REQUEST
?
BillingMode="PAY_PER_REQUEST", | ||
**kwargs, | ||
) | ||
do_tag_update = False |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are we setting it to False ? Good to annotate ?
What this PR does / why we need it:
tag_aws_resources: bool = False
sample error one can get on apply
Which issue(s) this PR fixes:
Misc