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

feat(apigatewayv2): add description property for stage #30820

Merged
merged 8 commits into from
Jul 22, 2024

Conversation

yoyoyo-pg
Copy link
Contributor

Issue # (if applicable)

Reason for this change

The description property existed in the L1 construct but was not present in the L2 construct

Description of changes

Add the description property for HttpStage and WebSocketStage, which was missing in the L2 construct.

Description of how you validated changes

I Added both unit test and integration tests.

Checklist


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 requested a review from a team July 10, 2024 14:38
@github-actions github-actions bot added beginning-contributor [Pilot] contributed between 0-2 PRs to the CDK p2 labels Jul 10, 2024
Copy link
Collaborator

@aws-cdk-automation aws-cdk-automation left a comment

Choose a reason for hiding this comment

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

The pull request linter has failed. See the aws-cdk-automation comment below for failure reasons. If you believe this pull request should receive an exemption, please comment and provide a justification.

A comment requesting an exemption should contain the text Exemption Request. Additionally, if clarification is needed add Clarification Request to a comment.

@yoyoyo-pg
Copy link
Contributor Author

Exemption Request: It is possible to specify the description option when defining CfnApi as well, but there is no description in the apigatewayv2 README.
I don't think it is necessary to include a description for CfnStage as well as for CfnApi.

@aws-cdk-automation aws-cdk-automation added the pr-linter/exemption-requested The contributor has requested an exemption to the PR Linter feedback. label Jul 10, 2024
Copy link
Contributor

@go-to-k go-to-k left a comment

Choose a reason for hiding this comment

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

Thanks for this PR! It seems that the PR title has a typo poperty.
There are also errors in the Code Build CI. Could you please check the trailing spaces, and erase them?

aws-cdk-lib: /codebuild/output/src284929355/src/github.com/aws/aws-cdk/packages/aws-cdk-lib/aws-apigatewayv2/lib/common/stage.ts
aws-cdk-lib:   72:5  error  Trailing spaces not allowed  no-trailing-spaces
aws-cdk-lib: /codebuild/output/src284929355/src/github.com/aws/aws-cdk/packages/aws-cdk-lib/aws-apigatewayv2/test/websocket/stage.test.ts
aws-cdk-lib:   148:1  error  Trailing spaces not allowed  no-trailing-spaces
aws-cdk-lib: 笨� 2 problems (2 errors, 0 warnings)
aws-cdk-lib:   2 errors and 0 warnings 

@yoyoyo-pg yoyoyo-pg changed the title feat(apigatewayv2): add description poperty for stage feat(apigatewayv2): add description property for stage Jul 11, 2024
@yoyoyo-pg
Copy link
Contributor Author

@go-to-k
Thank you! I have modified the title of the pull request and removed the trailing space.

Copy link
Contributor

@go-to-k go-to-k left a comment

Choose a reason for hiding this comment

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

It's very nice. I made just a few minor comments.

packages/aws-cdk-lib/aws-apigatewayv2/lib/common/stage.ts Outdated Show resolved Hide resolved
@go-to-k
Copy link
Contributor

go-to-k commented Jul 12, 2024

Exemption Request: It is possible to specify the description option when defining CfnApi as well, but there is no description in the apigatewayv2 README.
I don't think it is necessary to include a description for CfnStage as well as for CfnApi.

Both the WebSocketStage and the HttpStage seem to be in the README. Could you include the property in the sample code?

https://github.com/go-to-k/aws-cdk/blob/7cd0f65a669abf5144a705fec0652f3b550a9340/packages/aws-cdk-lib/aws-apigatewayv2/README.md#publishing-http-apis

declare const api: apigwv2.HttpApi;

new apigwv2.HttpStage(this, 'Stage', {
  httpApi: api,
  stageName: 'beta',
  description: 'My Stage', // <- here
});

https://github.com/go-to-k/aws-cdk/blob/7cd0f65a669abf5144a705fec0652f3b550a9340/packages/aws-cdk-lib/aws-apigatewayv2/README.md#websocket-api

import { WebSocketLambdaIntegration } from 'aws-cdk-lib/aws-apigatewayv2-integrations';
// ...
// ...
new apigwv2.WebSocketStage(this, 'mystage', {
  webSocketApi,
  stageName: 'dev',
  description: 'My Stage', // <- here
  autoDeploy: true,
});

yoyoyo-pg and others added 2 commits July 13, 2024 11:50
Co-authored-by: Kenta Goto (k.goto) <24818752+go-to-k@users.noreply.github.com>
@aws-cdk-automation aws-cdk-automation dismissed their stale review July 13, 2024 03:03

✅ Updated pull request passes all PRLinter validations. Dismissing previous PRLinter review.

Copy link
Contributor

@go-to-k go-to-k left a comment

Choose a reason for hiding this comment

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

Thanks. LGTM.

@aws-cdk-automation aws-cdk-automation added the pr/needs-maintainer-review This PR needs a review from a Core Team Member label Jul 13, 2024
@yoyoyo-pg
Copy link
Contributor Author

@go-to-k
Thanks for the review!

@yoyoyo-pg yoyoyo-pg closed this Jul 16, 2024
@yoyoyo-pg yoyoyo-pg deleted the add-apigatewayv2-stage-description branch July 16, 2024 13:11
@yoyoyo-pg yoyoyo-pg restored the add-apigatewayv2-stage-description branch July 16, 2024 13:13
@yoyoyo-pg yoyoyo-pg reopened this Jul 16, 2024
@yoyoyo-pg
Copy link
Contributor Author

I'm sorry. I deleted the branch by mistake and reopened the pull request.

gracelu0
gracelu0 previously approved these changes Jul 22, 2024
Copy link
Contributor

@gracelu0 gracelu0 left a comment

Choose a reason for hiding this comment

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

LGTM, thank you for contributing!

Copy link
Contributor

mergify bot commented Jul 22, 2024

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

@aws-cdk-automation aws-cdk-automation removed the pr/needs-maintainer-review This PR needs a review from a Core Team Member label Jul 22, 2024
Copy link
Contributor

mergify bot commented Jul 22, 2024

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

@mergify mergify bot dismissed gracelu0’s stale review July 22, 2024 19:56

Pull request has been modified.

@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

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

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

@aws-cdk-automation aws-cdk-automation added the pr/needs-maintainer-review This PR needs a review from a Core Team Member label Jul 22, 2024
Copy link
Contributor

mergify bot commented Jul 22, 2024

Thank you for contributing! Your pull request will be updated from main 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 8651bbe into aws:main Jul 22, 2024
14 checks passed
Copy link

Comments on closed issues and PRs are hard for our team to see.
If you need help, please open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

@aws-cdk-automation aws-cdk-automation removed the pr/needs-maintainer-review This PR needs a review from a Core Team Member label Jul 22, 2024
obraafo pushed a commit to obraafo/aws-cdk that referenced this pull request Jul 25, 2024
### Issue # (if applicable)

### Reason for this change

The `description` property existed in the L1 construct but was not present in the L2 construct

### Description of changes

Add the `description`  property for `HttpStage` and `WebSocketStage`, which was missing in the L2 construct.

### Description of how you validated changes

I Added both unit test and integration 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
Copy link
Collaborator

Comments on closed issues and PRs are hard for our team to see. If you need help, please open a new issue that references this one.

@aws aws locked as resolved and limited conversation to collaborators Jul 25, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
beginning-contributor [Pilot] contributed between 0-2 PRs to the CDK p2 pr-linter/exemption-requested The contributor has requested an exemption to the PR Linter feedback.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants