-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
fix(aws-machine-image): lazily load ec2client #13437
Conversation
I can't request a review from @markussiebert, but tagging for visibility as you created this datasource. |
4b969a3
to
b905176
Compare
abe74bc
to
aecfcaf
Compare
Rebased and accidentally invalidated the reviews 😭 |
🎉 This PR is included in version 31.21.2 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
"@aws-sdk/client-ec2": "3.46.0", | ||
"@aws-sdk/client-ecr": "3.46.0", |
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.
Are we properly grouping the @aws-sdk/client-ec2
, @aws-sdk/client-ecr
and @aws-sdk/client-s3
packages in our renovatebot/.github
rules, or in our own repo's renovate.json
file?
Is there a way to prevent these packages to get out of sync with each other?
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.
@HonkingGoose hey are grouped, but they need dashborad aproval. They got out of sync, because some are added later in a PR and the main branch was already on a newer version.
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.
@HonkingGoose they are grouped, but they need dashborad aproval. They got out of sync, because some are added later in a PR and the main branch was already on a newer version.
Are you sure these packages are grouped together???
Quote from our renovatebot/github/default.json
1 file:
{
"description": "Require approval for aws-sdk as it updates too often",
"matchDatasources": ["npm"],
"matchPackageNames": ["aws-sdk"],
"matchPackagePatterns": ["^@aws-sdk\\/"],
"dependencyDashboardApproval": true
},
I do not see anything here that actually groups the aws-sdk
packages together?
Footnotes
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.
yes:
'aws-sdk-js-v3': 'https://github.com/aws/aws-sdk-js-v3', |
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.
That line only groups any aws-sdk-js-v3
packages, I think.
Would it be a good idea to have a patternGroups
entry that puts these packages into one group?
@aws-sdk/client-ec2
@aws-sdk/client-ecr
@aws-sdk/client-s3
renovate/lib/config/presets/internal/monorepo.ts
Lines 194 to 203 in 2e258d8
const patternGroups = { | |
babel6: '^babel6$', | |
clarity: ['^@cds/', '^@clr/'], | |
wordpress: '^@wordpress/', | |
angularmaterial: ['^@angular/material', '^@angular/cdk'], | |
'aws-java-sdk': '^com.amazonaws:aws-java-sdk-', | |
'aws-java-sdk-v2': '^software.amazon.awssdk:', | |
embroider: '^@embroider/', | |
fullcalendar: '^@fullcalendar/', | |
}; |
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.
@HonkingGoose They are grouped via sourceUrl
, checkout https://www.npmjs.com/package/@aws-sdk/client-ec2. All @aws-sdk/*
js pacvkages are published from https://github.com/aws/aws-sdk-js-v3
Lets move this to a discussion if you need further clarification.
Changes:
@aws-sdk/*
packagesLazy
class for lazily loading expensive callsEC2Client
in the constructor forAwsMachineImageDataSource
Context:
I attempted a couple of different fixes for this:
mockClient
fromaws-sdk-client-mock
globallyIn the end, lazily loading
EC2Client
was the only fix I could get to work reliably, with the smallest code changes. I also think thatLazy
could come in useful elsewhere in the codebase.Closes #13389
Documentation (please check one with an [x])
How I've tested my work (please tick one)
I have verified these changes via: