feat: Instantiate services at sync time rather than during init phase of sync#13059
Merged
hermanschaaf merged 35 commits intomainfrom Aug 15, 2023
Merged
feat: Instantiate services at sync time rather than during init phase of sync#13059hermanschaaf merged 35 commits intomainfrom
hermanschaaf merged 35 commits intomainfrom
Conversation
| Backend state.Client | ||
| specificRegions bool | ||
| Spec *Spec | ||
| // Do not rely on this field, it will be removed once https://github.com/aws/aws-sdk-go-v2/issues/2163 is resolved |
Contributor
There was a problem hiding this comment.
Is this comment not longer true? Will we keep AWSConfig?
Collaborator
Author
There was a problem hiding this comment.
We will need to because the initService function uses it to initialize the service:
func (s *Services) InitService(awsConfig *aws.Config, service string) {
c := awsConfig.Copy()
hermanschaaf
approved these changes
Aug 15, 2023
Contributor
hermanschaaf
left a comment
There was a problem hiding this comment.
Couple of suggestions & questions but overall LGTM and I like the idea!
bbernays
commented
Aug 15, 2023
hermanschaaf
approved these changes
Aug 15, 2023
Contributor
|
Because this PR touches more than 500 files we will have to manually merge it (I'll do so once the checks pass) |
kodiakhq bot
pushed a commit
that referenced
this pull request
Aug 21, 2023
🤖 I have created a release *beep* *boop* --- ## [22.7.0](plugins-source-aws-v22.6.0...plugins-source-aws-v22.7.0) (2023-08-21) ### Features * Instantiate services at sync time rather than during init phase of sync ([#13059](#13059)) ([99e6889](99e6889)) ### Bug Fixes * AWS foundational security controls for S3.8 query reference ([#13065](#13065)) ([7cde3d2](7cde3d2)), closes [#13064](#13064) * **deps:** Update AWS modules ([#13246](#13246)) ([49ee475](49ee475)) * **deps:** Update github.com/cloudquery/arrow/go/v13 digest to 5b83d4f ([#13203](#13203)) ([b0a4b8c](b0a4b8c)) * **deps:** Update module github.com/cloudquery/plugin-sdk/v4 to v4.5.1 ([#13195](#13195)) ([a184c37](a184c37)) * Panic while fetching `aws_codecommit_repositories` ([#13223](#13223)) ([4d9bcc1](4d9bcc1)) * Remove unused query ([#13152](#13152)) ([f050699](f050699)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This will reduce memory usage in most cases, unless a user is running
tables:["*"]. This will instantiate the service client the first time a client needs it rather than instantiating every single supported client during initialization phase of the sync.If a user doesn't use a service, it will never be instantiated