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

Update from upstream #2

Merged
merged 27 commits into from
Jun 12, 2019
Merged

Update from upstream #2

merged 27 commits into from
Jun 12, 2019

Commits on Jun 5, 2019

  1. Configuration menu
    Copy the full SHA
    0db32de View commit details
    Browse the repository at this point in the history
  2. refactor(core): misc cleanups to App-related APIs (#2731)

    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 (#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.
    Elad Ben-Israel committed Jun 5, 2019
    Configuration menu
    Copy the full SHA
    b2e1964 View commit details
    Browse the repository at this point in the history

Commits on Jun 6, 2019

  1. chore(pkglint): Require stability setting in package.json (#2736)

    And when set, demand that a NodeJS-style stability badge is present in the README.md
    RomainMuller committed Jun 6, 2019
    Configuration menu
    Copy the full SHA
    bbe0ea8 View commit details
    Browse the repository at this point in the history
  2. fix(pkglint): Adjust stability banner style (#2768)

    GitHub markdown does not allow use of inline CSS on `<div>` elements,
    resulting in a poor looking `README.md` experience on the website.
    Adjusted the style to use a blockquote in order to have the stability
    indication stand out more, while being visually pleasant.
    RomainMuller committed Jun 6, 2019
    Configuration menu
    Copy the full SHA
    da94d8b View commit details
    Browse the repository at this point in the history
  3. refactor(kms): Rename EncryptionKeyAlias to Alias (#2769)

    BREAKING CHANGE: The `EncryptionKeyAlias` class was renamed to `Alias`.
    Associated types (such as `EncryptionKeyAliasProps`) were renamed in the
    same way.
    RomainMuller committed Jun 6, 2019
    Configuration menu
    Copy the full SHA
    da8e1d5 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    9a34d47 View commit details
    Browse the repository at this point in the history
  5. refactor(core): improvements to Construct API (#2767)

    Closes #1934
    
    BREAKING CHANGE:
    * **core:** `node.stack` is now `Stack.of(construct)` (fixes #2766)
    * **core:** `node.resolve` has been moved to `stack.resolve`.
    * **core:** `node.stringifyJson` has been moved to `stack.stringifyJson`.
    * **core:** `node.validateTree` is now `ConstructNode.validate(node)`
    * **core:** `node.prepareTree` is now `ConstructNode.prepare(node)`
    * **core:** `node.getContext` is now `node.tryGetContext`
    * **core:** `node.recordReference` is now `node.addReference`
    * **core:** `node.apply` is now `node.applyAspect`
    * **core:** `node.ancestors()` is now `node.scopes`
    * **core:** `node.required` has been removed.
    * **core:** `node.typename` has been removed.
    * **core:** `node.addChild` is now private
    * **core:** `node.findReferences()` is now `node.references`
    * **core:** `node.findDependencies()` is now `node.dependencies`
    * **core:** `stack.dependencies()` is now `stack.dependencies`
    * **core:** `CfnElement.stackPath` has been removed.
    * **core:** `CloudFormationLang` is now internal (use `stack.toJsonString()`)
    Elad Ben-Israel committed Jun 6, 2019
    Configuration menu
    Copy the full SHA
    3f7a0ad View commit details
    Browse the repository at this point in the history

Commits on Jun 7, 2019

  1. Configuration menu
    Copy the full SHA
    a610017 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    6d83cb9 View commit details
    Browse the repository at this point in the history
  3. feat(route53): improve constructs for basic records (#2741)

    Constructs for records (CNAME, TXT, etc.) now extend the `RecordSet` construct and
    offer better typed properties interfaces.
    
    Add constructs for A, AAAA, CAA, MX and SRV records.
    
    Add support for multiple values in basic records.
    
    Make `recordName` optional with default to zone root.
    
    Add a "security" `CaaAmazonRecord` construct to easily restrict certificate authorities
    allowed to issue certificates for a domain to Amazon only.
    
    BREAKING CHANGE: `recordValue: string` prop in `route53.TxtRecord` changed to `values: string[]`
    * `recordValue` prop in `route53.CnameRecord` renamed to `domainName`
    * `route53.AliasRecord` has been removed, use `route53.ARecord` or `route53.AaaaRecord` with the `target` prop.
    jogold authored and rix0rrr committed Jun 7, 2019
    Configuration menu
    Copy the full SHA
    696f53f View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    2e0848c View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    5c90256 View commit details
    Browse the repository at this point in the history
  6. fix(core): Make filterUndefined null-safe (#2789)

    There are a couple of places where fields accept values that are typed
    as `Json` per the JSII type specification. This conveys that literal
    `null` values may be passed and need to be preserved (as far as JSII is
    concerned - see aws/jsii#523). However in the CloudFormation domain,
    `null` is semantically equivalent to `undefined`.
    
    Now enters Javascript's confusing type system, where `null` is an
    `object` that cannot be converted to `object` (you read this correctly):
    
    ```js
    typeof null === 'object'
    // => true
    
    Object.entries(null);
    // => Thrown:
    //    TypeError: Cannot convert undefined or null to object
    //        at Function.entries (<canonymous>)
    ```
    
    So this changes the `undefined` checks to the `null`-coercing way, so
    that `null` and `undefined` are handled the same way.
    RomainMuller authored and rix0rrr committed Jun 7, 2019
    Configuration menu
    Copy the full SHA
    e4fb811 View commit details
    Browse the repository at this point in the history

Commits on Jun 10, 2019

  1. chore: bump jsii to 0.11.2 (#2803)

    Fix a bug that generates invalid Java docstrings, fixing the build.
    rix0rrr committed Jun 10, 2019
    Configuration menu
    Copy the full SHA
    7bfa4ac View commit details
    Browse the repository at this point in the history
  2. v0.34.0 (#2791)

    See CHANGELOG
    rix0rrr committed Jun 10, 2019
    Configuration menu
    Copy the full SHA
    523807c View commit details
    Browse the repository at this point in the history

Commits on Jun 11, 2019

  1. feat: formalize the concept of physical names, and use them for cross…

    …-environment CodePipelines. (#1924)
    
    Introduces a new type, `PhysicalName`, that represents the physical ID of resources, and adds it to `IResource`.
    
    Adds a `ResourceIdentifiers` class that is supposed to be used inside the Construct Library.
    
    Introduces a concept of a late-bound name, that is automatically generated by the framework if a given resource is used in a cross-environment fashion. Implements it in IAM's Role, CodeBuild's Project, and S3's Bucket.
    
    Adds logic to the CodePipeline construct that automatically generates a Role with a physical name if an Action backed by a resource from a different account is added to it.
    
    BREAKING CHANGE:
    * iam: `roleName` in `RoleProps` is now of type `PhysicalName`
    * s3: `bucketName` in `BucketProps` is now of type `PhysicalName`
    * codebuild: `roleName` in `RoleProps` is now of type `PhysicalName`
    skinny85 committed Jun 11, 2019
    Configuration menu
    Copy the full SHA
    6daaca8 View commit details
    Browse the repository at this point in the history
  2. docs(changelog): add missing entries from the 0.34.0 release to the C…

    …hangelog (#2814)
    skinny85 authored and Elad Ben-Israel committed Jun 11, 2019
    Configuration menu
    Copy the full SHA
    9ce37e1 View commit details
    Browse the repository at this point in the history
  3. fix(sqs): remove 'Batch' permissions (#2806)

    Batch permissions are automatically implied when given regular API call
    permissions. For example, giving IAM permissions to `sqs:SendMessage`
    gives permission to call both `SendMessage` and `SendMessageBatch`.
    
    Fixes #2381.
    rix0rrr committed Jun 11, 2019
    Configuration menu
    Copy the full SHA
    654cb37 View commit details
    Browse the repository at this point in the history
  4. fix(ecs-patterns): update constructs for ECS/Fargate consistency (#2795)

    As per offline discussions within the team, updating L3 constructs to be consistent across ECS/Fargate launch types as well as within the module itself.
    
    LoadBalancedServices for both ECS and Fargate support the same properties.
    QueueWorkerService have been renamed to QueueProcessingService.
    Updated unit tests and added missing tests.
    Updated README and design docs
    
    BREAKING CHANGE: Renamed QueueWorkerService for base, ec2 and fargate to QueueProcessingService, QueueProcessingEc2Service, and QueueProcessingFargateService.
    piradeepk authored and rix0rrr committed Jun 11, 2019
    Configuration menu
    Copy the full SHA
    1378e2d View commit details
    Browse the repository at this point in the history
  5. refactor(core): refactor API of Tokens (#2757)

    Tokens are now represented by the interface `IResolvable`. The class `Token`
    still exists, but it is used to hold static routines for token encoding
    (`Token.asString()`).
    
    Actual token use is split into 2 categories:
    
    - *Intrinsics*, represented by static methods on `Token`: these are to represent values
      that will be understood by the deployment language formalism (e.g.
      CloudFormation), and can be used to escape language type checking.
    - *Lazy values*, represented by a `Lazy` class with static factories:
      these will be used to represent type-checked but lazily-produced
      values (evaluated at synthesis time).
    
    In order to be JSII-compatible (which does not currently support
    lambdas), `Lazy.stringValue()` et. al. take an interface with a single
    method instead of a function.
    
    Also changed in this commit: shoring up property names for encoded
    tokens in classes like `CfnParameter` and `CfnElement`.
    
    * `.stringValue` => `.valueAsString`, etc so `.value`, `.valueAsString`,
      `.valueAsList` etc. group together in autocomplete.
    * `.ref` now returns a Token, `.refAsString` returns the stringified
      version that token.
    
    To match the other standard the latter should actually be `.refAsString`
    but `.ref` is used in so many places that this might be uncomfortable?
    
    Fixes #1933.
    
    BREAKING CHANGES:
    
    * `Token` can no longer be instantiated. You probably want to use 
      `Lazy.stringValue` and others, or `Token.asString()` and others.
    * `Token.isToken()`/`Token.unresolved()` => `Token.isUnresolved()`.
    * `CfnOutput`: remove `.ref`, since they can't be referenced anyway.
    * `CfnParameter`: rename `.stringValue` => `.valueAsString` (and
      similar for lists and numbers).
    * `.ref` now returns an `IToken`, use `.refAsString` to get a
      string-encoded Token.
    * `TokenMap` is now no longer exported, some parts of its functionality
      are available through the static `Tokenization` class.
    * `IResolvedValuePostProcessor` => `IResolvableWithPostProcess`.
    rix0rrr committed Jun 11, 2019
    Configuration menu
    Copy the full SHA
    a12fcfa View commit details
    Browse the repository at this point in the history
  6. refactor(sns): move subscribers to aws-sns-subscribers (#2804)

    In accordance with new guidelines, we're centralizing cross-service
    integrations into their own package. In this case, centralizing
    SNS Subscribers into @aws-cdk/aws-sns-subscribers.
    
    BREAKING CHANGE: using a queue, lambda, email, URL as SNS Subscriber now
    requires an integration object from the `@aws-cdk/aws-sns-subscribers`
    package.
    rix0rrr committed Jun 11, 2019
    Configuration menu
    Copy the full SHA
    9ef899c View commit details
    Browse the repository at this point in the history
  7. docs: update READMEs and sample snippets so they don't reference cons…

    …tructs that have been renamed. (#2816)
    shivlaks authored and rix0rrr committed Jun 11, 2019
    Configuration menu
    Copy the full SHA
    bbc9ef7 View commit details
    Browse the repository at this point in the history
  8. fix(aws-cdk): Move version check TTL file to home directory (#2774)

    Originally, the version check TTL file was located alongside the CDK
    node installation directory. This caused issues for people who had CDK
    installed on a readonly filesystem.
    
    This change moves this file to the user's home directory, specifically
    under $HOMEDIR/.cdk/cache. This directory is already being used by
    account-cache.ts.
    
    The old logic is maintained where a repo check is run once a day against
    NPM, when a CDK command is invoked, and when a new version is present
    will generate a console banner notifying the user of this.
    
    The edge case with the updated implementation is when there are 2+
    active installations of CDK and they are used interchangably. When
    this happens, the user will only get one notification per non-latest
    installation of CDK per day.
    nija-at authored and rix0rrr committed Jun 11, 2019
    Configuration menu
    Copy the full SHA
    1ae11c0 View commit details
    Browse the repository at this point in the history
  9. feat(ecs): add metrics for Fargate services (#2798)

    The `BaseService` class had a `metric()` implementation missing the `clusterName` dimension (it was
    overriden in `Ec2Service` with a correct implementation).
    
    Moved correct `metric()`, `metricCpuUtilization()` and `metricMemoryUtilization()` methods to
    `BaseService`. Both `Ec2Service` and `FargateService` now have correct `metricXxx()` methods.
    
    Added tests for `metricXxx()` methods.
    jogold authored and rix0rrr committed Jun 11, 2019
    Configuration menu
    Copy the full SHA
    acf015d View commit details
    Browse the repository at this point in the history
  10. feat(stepfunctions): add grantStartExecution() (#2793)

    Grant the given identity permissions to start an execution of a
    state machine (`states:StartExecution`).
    jogold authored and rix0rrr committed Jun 11, 2019
    Configuration menu
    Copy the full SHA
    da32176 View commit details
    Browse the repository at this point in the history
  11. chore(docs): document grant* methods in IAM documentation (#2782)

    Sander Knape authored and rix0rrr committed Jun 11, 2019
    Configuration menu
    Copy the full SHA
    7c022cf View commit details
    Browse the repository at this point in the history
  12. feat(cli): Remove stack rename support (#2819)

    BREAKING CHANGE: The CLI no longer accepts `--rename`, and the stack
                     names are now immutable on the stack artifact.
    
    Fixes #2670
    RomainMuller committed Jun 11, 2019
    Configuration menu
    Copy the full SHA
    0f30e39 View commit details
    Browse the repository at this point in the history