Skip to content

fix(dynamodb-global): cannot deploy global tables due to unresolved resource dependencies#4748

Merged
skinny85 merged 2 commits intoaws:masterfrom
skinny85:fix/dynamodb-global-table-parent
Nov 5, 2019
Merged

fix(dynamodb-global): cannot deploy global tables due to unresolved resource dependencies#4748
skinny85 merged 2 commits intoaws:masterfrom
skinny85:fix/dynamodb-global-table-parent

Conversation

@skinny85
Copy link
Copy Markdown
Contributor

@skinny85 skinny85 commented Oct 29, 2019

The DynamoDB global table construct was incorrectly declaring its dependencies,
having the coordinator stack depend on the resources in the table stacks,
instead of on the stacks themselves.
That resulted in resources in the coordinator stack depending on the global tables,
which cannot work, as those are from different stacks.
Changed the logic to declare dependencies between the stacks explicitly.

Fixes #4676


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

The DynamoDB global table construct was incorrectly declaring its dependencies.
That resulted in resources in the coordinator stack depending on the global tables,
which cannot work, as those are from different stacks.
Changed the logic to declare dependencies between the stacks explicitly.

Fixes aws#4676
@skinny85 skinny85 requested a review from rix0rrr October 29, 2019 22:34
@mergify
Copy link
Copy Markdown
Contributor

mergify bot commented Oct 29, 2019

Thanks so much for taking the time to contribute to the AWS CDK ❤️

We will shortly assign someone to review this pull request and help get it
merged. In the meantime, please take a minute to make sure you follow this
checklist
:

  • PR title type(scope): text
    • type: fix, feat, refactor go into CHANGELOG, chore is hidden
    • scope: name of module without aws- or cdk- prefix or postfix (e.g. s3 instead of aws-s3-deployment)
    • text: use all lower-case, do not end with a period, do not include issue refs
  • PR Description
    • Rationale: describe rationale of change and approach taken
    • Issues: indicate issues fixed via: fixes #xxx or closes #xxx
    • Breaking?: last paragraph: BREAKING CHANGE: <describe what changed + link for details>
  • Testing
    • Unit test added. Prefer to add a new test rather than modify existing tests
    • CLI or init templates change? Re-run/add CLI integration tests
  • Documentation
    • README: update module README to describe new features
    • API docs: public APIs must be documented. Copy from official AWS docs when possible
    • Design: for significant features, follow design process

@SomayaB SomayaB added the contribution/core This is a PR that came from AWS. label Oct 29, 2019
@aws-cdk-automation
Copy link
Copy Markdown
Collaborator

AWS CodeBuild CI Report

  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

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

Copy link
Copy Markdown
Contributor

@eladb eladb left a comment

Choose a reason for hiding this comment

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

Seems odd the test expectations were not updated.

Also, the PR description says that the dependencies were not correctly defined but it doesn’t explain what was the incorrect definition.

PR title for bugs should describe the bug and not the solution. The title is used in Changelog under “fixes” so it should speak in terms of the bug that was fixed and not the solution.

@skinny85
Copy link
Copy Markdown
Contributor Author

skinny85 commented Nov 4, 2019

Also, the PR description says that the dependencies were not correctly defined but it doesn’t explain what was the incorrect definition.

Updated.

PR title for bugs should describe the bug and not the solution. The title is used in Changelog under “fixes” so it should speak in terms of the bug that was fixed and not the solution.

That's what I tried to do; the bug was an incorrect dependency declaration, but it manifested itself with being unable to use global DynamoDB tables with Stack as the parent.

If you have a suggestion for a better title, I'm all ears.

@eladb
Copy link
Copy Markdown
Contributor

eladb commented Nov 4, 2019

If you have a suggestion for a better title, I'm all ears.

Usually the title of the bug (#4676) is a good title for the fix. Maybe rephrased and shortened a little:

fix(dynamodb-global): cannot deploy global tables due to unresolved resource dependencies

@skinny85 skinny85 changed the title fix(dynamodb): make global tables work with stack parents fix(dynamodb-global): cannot deploy global tables due to unresolved resource dependencies Nov 4, 2019
@skinny85
Copy link
Copy Markdown
Contributor Author

skinny85 commented Nov 4, 2019

If you have a suggestion for a better title, I'm all ears.

Usually the title of the bug (#4676) is a good title for the fix. Maybe rephrased and shortened a little:

fix(dynamodb-global): cannot deploy global tables due to unresolved resource dependencies

Changed.

@skinny85 skinny85 added the pr/do-not-merge This PR should not be merged at this time. label Nov 5, 2019
@aws-cdk-automation
Copy link
Copy Markdown
Collaborator

AWS CodeBuild CI Report

  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

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

@skinny85 skinny85 merged commit 45f0e02 into aws:master Nov 5, 2019
@skinny85 skinny85 deleted the fix/dynamodb-global-table-parent branch November 5, 2019 17:42
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. pr/do-not-merge This PR should not be merged at this time.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

"Unresolved resource dependencies" when doing a CDK Deployment of Global DynamoDB Table

4 participants