Skip to content
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

feat: generate deployment group name #135

Merged
merged 2 commits into from
Sep 9, 2021
Merged

feat: generate deployment group name #135

merged 2 commits into from
Sep 9, 2021

Conversation

samchungy
Copy link
Contributor

@samchungy samchungy commented Aug 30, 2021

Proposed changes

  • Generates a Deployment Group Name in the format of ${stackName}-${logicalId} to avoid a circular dependency when used with the aws-alerts plugin.
  • Reference generated group name in IAM role instead of using !Sub to reference, thereby removing the circular dependency.
  • Fix lint issues
  • Ran npm audit fix

Resolves #127
Resolves #114

Types of changes

What types of changes does your code introduce to the plugin?
Put an x in the boxes that apply

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist

Put an x in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code.

  • Lint and unit tests pass locally with my changes
  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (if appropriate)

Further comments

Ran on sls-canary-example repo
Before:
image

After:
image

@@ -2,12 +2,12 @@ const aws = require('aws-sdk')
const codedeploy = new aws.CodeDeploy({ apiVersion: '2014-10-06' })

module.exports.pre = (event, context, callback) => {
var deploymentId = event.DeploymentId
var lifecycleEventHookExecutionId = event.LifecycleEventHookExecutionId
const deploymentId = event.DeploymentId
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ran standard --fix due to lint issues

image

@@ -1,19 +1,11055 @@
{
"name": "serverless-plugin-canary-deployments",
"version": "0.4.8",
"lockfileVersion": 1,
"version": "0.6.0",
Copy link
Contributor Author

@samchungy samchungy Aug 30, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ran npm audit fix since it was yelling at me.

image

@samchungy samchungy marked this pull request as ready for review August 30, 2021 11:15
Copy link
Contributor

@72636c 72636c left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for fixing this 🙇

@samchungy
Copy link
Contributor Author

@davidgf could you take a look at this one? :)

@davidgf davidgf merged commit 1b70114 into davidgf:master Sep 9, 2021
@davidgf
Copy link
Owner

davidgf commented Sep 9, 2021

Thank you very much for your contribution!

@davidgf davidgf mentioned this pull request Sep 9, 2021
@srkiNZ84
Copy link

srkiNZ84 commented Sep 9, 2021

Thank you so much for this @samchungy! 🎉 🙌

@samchungy samchungy deleted the deployment-group-name branch September 10, 2021 00:55
@DebarshiMondal-06
Copy link

Finally Fixed the issue of Circular Dependency... Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
5 participants