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

refactor(core): misc cleanups to App-related APIs #2731

Merged
merged 20 commits into from
Jun 5, 2019
Merged

Conversation

eladb
Copy link
Contributor

@eladb eladb commented Jun 3, 2019

Fixes #1891

Testing: all toolkit integration tests passed.

BREAKING CHANGE:

  • cli: This release requires CDK CLI >= 0.34.0
  • core: App.run() was renamed to App.synth() (soft deprecation, it will be removed in the next release).
  • core: The Stack.autoDeploy feature has been removed. You can use cdk deploy STACK ... to determine which stacks to deploy (and wildcards are supported, so cdk deploy '*' will deploy all stacks. We plan to change the CLI to require specifying stacks if there is more than a single stack in the app (cdk deploy: require argument if there is more than a single stack #2750).
  • core: ConstructNode.aspects is now private.
  • core: The Synthesizer has been removed. Use ConstructNode.synth(node) instead.
  • core: ISynthesizable.synthesize now accepts an ISynthesisSession which contains the CloudAssemblyBuilder object. This will allow further extension in the future.
  • cx-api: cxapi.MissingContext now includes the context key
  • core: Stack.reportMissingContext now accepts a single argument of type cxapi.MissingContext, which includes the missing context key
  • core: Stack.annotatePhysicalName has been removed (not used).
  • core: Stack.missingContext is now private.
  • cx-api: Multiple changes to the cloud assembly APIs to reduce surface area and clean up.
  • cdk-integ (private): if an integration test includes multiple stacks, use /// !cdk-integ STACK ... to explicitly specify which stacks to include in the test.

  • Decide if we want to rename app.run() to app.synth(). I think it will make it more clear that this is basically what "cdk synth" is invoking. Renamed!
  • Add a @deprecated "App.run()" method so that I won't get stoned.

Pull Request Checklist

  • Testing
    • Unit test added (prefer not to modify an existing test, otherwise, it's probably a breaking change)
    • CLI change?: coordinate update of integration tests with team
    • cdk-init template change?: coordinated update of integration tests with team
  • Docs
    • jsdocs: All public APIs documented
    • README: README and/or documentation topic updated
    • Design: For significant features, design document added to design folder
  • Title and Description
    • Change type: title prefixed with fix, feat and module name in parens, which will appear in changelog
    • Title: use lower-case and doesn't end with a period
    • Breaking?: last paragraph: "BREAKING CHANGE: <describe what changed + link for details>"
    • Issues: Indicate issues fixed via: "Fixes #xxx" or "Closes #xxx"
  • Sensitive Modules (requires 2 PR approvers)
    • IAM Policy Document (in @aws-cdk/aws-iam)
    • EC2 Security Groups and ACLs (in @aws-cdk/aws-ec2)
    • Grant APIs (only if not based on official documentation with a reference)

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

Ensure documentation coverage and clean up of the various APIs.

Fixes #1891


BREAKING CHANGE:
* **core:** `StackProps.autoDeploy` has been removed and replaced by `StackProps.hide` (with negated logic).
* **core:** `ISynthesizable.synthesize` now accepts an `ISynthesisSession` which contains the `CloudAssemblyBuilder` object.
* **cx-api:** Multiple changes to the cloud assembly APIs to reduce surface area and clean up.
@eladb eladb requested a review from a team as a code owner June 3, 2019 23:14
@eladb eladb changed the title refactor(core): Misc cleanups to App-related APIs refactor(core): misc cleanups to App-related APIs Jun 3, 2019
packages/@aws-cdk/assets/lib/staging.ts Outdated Show resolved Hide resolved
packages/@aws-cdk/assets/test/test.asset.ts Show resolved Hide resolved
packages/@aws-cdk/assets/test/test.asset.ts Outdated Show resolved Hide resolved
packages/@aws-cdk/cdk/lib/app.ts Show resolved Hide resolved
packages/@aws-cdk/cdk/lib/app.ts Show resolved Hide resolved
packages/@aws-cdk/cdk/lib/stack.ts Outdated Show resolved Hide resolved
packages/@aws-cdk/cdk/lib/stack.ts Outdated Show resolved Hide resolved
packages/@aws-cdk/cdk/lib/stack.ts Outdated Show resolved Hide resolved
packages/@aws-cdk/cdk/lib/stack.ts Outdated Show resolved Hide resolved
packages/@aws-cdk/cdk/lib/synthesis.ts Outdated Show resolved Hide resolved
BREAKING CHANGE:
- `StackProps.autoDeploy` renamed to `entrypoint` (still true by default).
- CLI must be upgraded to 0.34.0 (cx protocol changes)
packages/@aws-cdk/aws-ec2/lib/security-group.ts Outdated Show resolved Hide resolved
packages/@aws-cdk/cdk/lib/construct.ts Outdated Show resolved Hide resolved
packages/@aws-cdk/cdk/lib/construct.ts Show resolved Hide resolved
packages/@aws-cdk/cdk/lib/stack.ts Outdated Show resolved Hide resolved
@mergify
Copy link
Contributor

mergify bot commented Sep 23, 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

This was referenced Dec 12, 2019
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.

revisit App APIs
4 participants