-
Notifications
You must be signed in to change notification settings - Fork 6
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
Aspect to enforce unique app/region/stack on lambdas #2567
base: main
Are you sure you want to change the base?
Conversation
🦋 Changeset detectedLatest commit: 0aaed07 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
6cda6ce
to
f5ddf8b
Compare
], | ||
}); | ||
expect(() => Template.fromStack(stack)).toThrow( | ||
"GuLambdaFunction must have a unique combination of app, region and stack", |
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 message above also includes "Found duplicate: ${node.app}". Any reason to not capture that here?
What does this change?
Introduce an
Aspect
to enforce unique combinations of app/region/stack onGuLambdaFunction
.A few projects at the Guardian seem to be mistakenly doing this, and when used in combination with a generated
riff-raff.yaml
can cause unexpected behaviour where only the last lambda defined will make it into the the deployments as the app/region/stack combination is used for the key.I ran into some circular dependency issues, so had to make some imports more specific in some other modules to resolve.