-
Notifications
You must be signed in to change notification settings - Fork 40
fix: Continue fetching on incorrect account permissions #1030
fix: Continue fetching on incorrect account permissions #1030
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.
Looks good. This code section in general might need additional refactor in the future but for the sake of unblocking this and fixing number of issues that block customers we can push this now.
Just some idea - remove InitServicesForPartitionAccountAndScope
as we only need to create aws clients per region per account rather per some parameter - Otherwise we are not alligned with AWS server side throttling mechanism and we will get throttle more.
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 the partition business? A credential only be valid in a single partition, no? So why not have the partition as a property in Client
and get rid of the additional map levels?
@disq - We need to store the partition in that serviceregion map because the |
@yevgenypats - Completely agree that more code can be refactored, but was trying to balance changing code with fixing issues. I would not delete |
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 like LGTM Account
struct can be removed now,otherwise
} | ||
return accounts |
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.
do we care about duplicates here?
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 don't think an AWS account can span multiple partitions
π Thank you for making CloudQuery awesome by submitting a PR π
Summary
Use the following steps to ensure your PR is ready to be reviewed
go fmt
to format your code πgolangci-lint run
π¨ (install golangci-lint here)go run ./docs/docs.go
and committing the changes π