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

fix(lambda): SingletonFunction ignores explicit declared dependencies #7997

Merged
merged 3 commits into from
May 15, 2020

Conversation

nija-at
Copy link
Contributor

@nija-at nija-at commented May 15, 2020

Commit Message

fix(lambda): SingletonFunction ignores explicit declared dependencies (#7997)

The problem here is that the Function construct underlying the
SingletonFunction construct is attached directly to the Stack to enforce
the Stack-wide singleton behaviour.

This commit adds additional methods addDependencies() and dependOn()
methods to let customers declare these.

fixes #7568

End Commit Message


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license

The problem here is that the Function construct underlying the
SingletonFunction construct is attached directly to the Stack to enforce
the Stack-wide singleton behaviour.

This commit adds additional methods `addDependencies()` and `dependOn()`
methods to let customers declare these.

fixes #7568
@nija-at nija-at requested a review from a team May 15, 2020 11:53
@nija-at nija-at self-assigned this May 15, 2020
@mergify mergify bot added the contribution/core This is a PR that came from AWS. label May 15, 2020
@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildProject6AEA49D1-qxepHUsryhcu
  • Commit ID: 8c76343
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@mergify
Copy link
Contributor

mergify bot commented May 15, 2020

Thank you for contributing! Your pull request will be updated from master and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildProject6AEA49D1-qxepHUsryhcu
  • Commit ID: f21da0a
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildProject6AEA49D1-qxepHUsryhcu
  • Commit ID: c9fa3f5
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@mergify
Copy link
Contributor

mergify bot commented May 15, 2020

Thank you for contributing! Your pull request will be updated from master and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

@mergify mergify bot merged commit 91f913f into master May 15, 2020
@mergify mergify bot deleted the nija-at/lambda-singleton-dependencies branch May 15, 2020 14:20
@@ -65,6 +65,22 @@ export class SingletonFunction extends FunctionBase {
return this.lambdaFunction.addPermission(name, permission);
}

/**
* Using node.addDependency() does not work on this method as the underlying lambda function is modeled
Copy link
Contributor

Choose a reason for hiding this comment

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

does not work on this construct?

karupanerura pushed a commit to karupanerura/aws-cdk that referenced this pull request May 22, 2020
…aws#7997)

The problem here is that the Function construct underlying the
SingletonFunction construct is attached directly to the Stack to enforce
the Stack-wide singleton behaviour.

This commit adds additional methods `addDependencies()` and `dependOn()`
methods to let customers declare these.

fixes aws#7568
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contribution/core This is a PR that came from AWS.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

SingletonFunction ignores explicit dependencies via node.add_dependency (or node.addDependency)
4 participants