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

chore(merge-back): 2.132.1 #29459

Merged
merged 5 commits into from
Mar 12, 2024
Merged

chore(merge-back): 2.132.1 #29459

merged 5 commits into from
Mar 12, 2024

Conversation

aws-cdk-automation
Copy link
Collaborator

@aws-cdk-automation aws-cdk-automation commented Mar 12, 2024

See CHANGELOG

SankyRed and others added 4 commits March 11, 2024 22:18
…9447)

### Issue # (if applicable)

Closes #29420 

### Reason for this change

The `cdk list` functionality displays the stacks .

For instance
```
> cdk ls
producer
consumer
```
With the latest changes for list stack dependencies we did add a new flag `-d` to show the dependencies.

The dependencies between stacks can be established in 2 ways:
1. Using the resource defined from one stack in another.
2. Using `addDependency()` to add dependency among stacks.

Current we are fetching the dependency details through the `CloudStackArtifact`.

* Establishing the dependency between stacks through the first method would have the same `displayName` and `id` for the stacks.
Using the `-d` flag to display dependencies -

```
❯ cdk list --show-dependencies
- id: producer
  dependencies: []
- id: consumer
  dependencies:
    - id: producer
      dependencies: []
```
* Establishing the dependency through `addDependency()` will create a different `displayName` and `id`.
In such a case when a user runs `cdk ls` we would want to show the `displayName` and if not present then use the `id`

For instance:
```
> cdk ls
producer
producer/consumer
```
With the `-d` flag we would want to display something like:
```
> cdk ls -d
- id: producer
  dependencies: []
- id: producer/consumer
  dependencies:
    - id: producer
      dependencies: []
```
With our previous change we didn't consider `displayName` and just fetched `id`s which changes the previous functionality and caused a regression.

### Description of changes

With the new changes we are looking out for `displayName` first and if it does not exist we fetch the `id`.

### Description of how you validated changes

Added a new unit test and updated integ tests.

### Checklist
- [x] My code adheres to the [CONTRIBUTING GUIDE](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and [DESIGN GUIDELINES](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md)

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
### Issue # (if applicable)

Closes #[29420](#29420).

### Reason for this change

The latest release has changed the output of the `list` command, removing the path hierarchy.

### Description of changes

With the new changes we are looking out for `displayName` first and if it does not exist we fetch the `id`.

### Description of how you validated changes

Added unit tests and updated integ tests.

### Checklist
- [x] My code adheres to the [CONTRIBUTING GUIDE](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and [DESIGN GUIDELINES](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md)

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
@aws-cdk-automation aws-cdk-automation added auto-approve pr/no-squash This PR should be merged instead of squash-merging it labels Mar 12, 2024
@github-actions github-actions bot added the p2 label Mar 12, 2024
github-actions[bot]
github-actions bot previously approved these changes Mar 12, 2024
@aws-cdk-automation aws-cdk-automation requested a review from a team March 12, 2024 07:44
@aws-cdk-automation aws-cdk-automation added the pr/needs-community-review This PR needs a review from a Trusted Community Member or Core Team Member. label Mar 12, 2024
@mergify mergify bot dismissed github-actions’s stale review March 12, 2024 08:06

Pull request has been modified.

@aws-cdk-automation
Copy link
Collaborator Author

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildv2Project1C6BFA3F-wQm2hXv2jqQv
  • Commit ID: 7b8eb66
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

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

Copy link
Contributor

mergify bot commented Mar 12, 2024

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

@mergify mergify bot merged commit 0c73143 into main Mar 12, 2024
14 checks passed
@mergify mergify bot deleted the merge-back/2.132.1 branch March 12, 2024 08:33
@aws-cdk-automation aws-cdk-automation removed the pr/needs-community-review This PR needs a review from a Trusted Community Member or Core Team Member. label Mar 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto-approve p2 pr/no-squash This PR should be merged instead of squash-merging it
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants