Closed wasabigeek closed 3 years ago
Sorry I realise this doesn't quite work the way I think it does for Push, there are some edge cases if it was synced with S3 and then later an exclude attempt was made >_<
Made such that the flag is set on the Fetcher struct instead, also added it to the YamlDumper so it should work even if there was a previous S3 pull which has been desynced. Would love to hear your thoughts - I do think it’ll be nice to set a more permanent config (perhaps an environment variable or a special YAML config?) but that could be a separate enhancement.
@mtibben hope I'm not being a bother, let me know if I can help this along (e.g. adding more tests). I've stopped short of moving the split up Fetchers to their own files
Thanks @patrobinson! I don’t have permissions to merge this, is this still pending something?
I want to do some local testing and cut a release, so it's pending me for now.
@patrobinson is this still something you'd like to include? I can try to clean it up and resolve conflicts if so :)
@wasabigeek sorry for taking so long to get back to you. If you could resolve the conflicts I will take a look at this.
are this feature ready?
@mtibben @patrobinson am trying to set aside some time to look at this again, wanted to get your thoughts on implementation.
In this PR I attempted to split some of the AwsFetcher
logic into AwsAccountFetcher
, AwsIamFetcher
, AwsS3Fetcher
, mostly so they could be mocked in tests. Now that https://github.com/99designs/iamy/pull/72 is merged, I'm also thinking of extracting the isSkippableManagedResource
logic into an AwsSkippableResourceChecker
, which will be injected into the previously mentioned classes. How does that sound?
Also, were there any concerns previously that prevented this from being merged in?
Fixes https://github.com/99designs/iamy/issues/64.
I'm not familiar with Go so this was pretty much winging it. Appreciate some advice on the implementation (passing a param to Fetch doesn’t feel ideal to me), then I'll make the required changes.