-
Notifications
You must be signed in to change notification settings - Fork 60
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
[Integration] [AWS] | Added support to choose specific regions to query resources from #1099
Conversation
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.
Nice one!
Co-authored-by: Tom Tankilevitch <[email protected]>
integrations/aws/main.py
Outdated
) | ||
return fastapi.Response(status_code=status.HTTP_200_OK) | ||
else: | ||
logger.exception("Failed to describe resource") |
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.
which resource? add log containing more context about the resource, region etc.
@@ -46,16 +53,23 @@ def is_server_error(e: Exception) -> bool: | |||
|
|||
|
|||
def get_matching_kinds_and_blueprints_from_config( |
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.
can we test it? with the new expected behavior?
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.
LGTM
…into improvement-aws
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.
LGTM
integrations/aws/utils/resources.py
Outdated
logger.warning( | ||
f"Skipping resyncing {kind} resource in region {region} in account {account_id}; {error.response['Error']['Message']}" | ||
) |
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.
how the error will look like? if we know that its resource not found, can't we provide more accurate log? I also think that its a info rather than a warning
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 error message has info about the identifier of the resource which can support debugging..
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.
Skipping resyncing AWS::EC2::Instance resource in region eu-north-1 in account 213138413742; Resource of type 'AWS::EC2::Instance' with identifier 'i-0dfe65a174b846790' was not found
Description
What:
regionPolicy
in theselector
field.maximumConcurrentAccount
, to control the maximum number of concurrent accounts to sync.Why:
How:
selector
field to support theregionPolicy
for querying resources from specific regions.maximumConcurrentAccount
variable, which limits the number of accounts synced concurrently.Type of change
All tests should be run against the port production environment(using a testing org).
Core testing checklist
Integration testing checklist
examples
folder in the integration directory.Preflight checklist
Screenshots
Include screenshots from your environment showing how the resources of the integration will look.
API Documentation
Provide links to the API documentation used for this integration.