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

fix(integ-tests): allow multiple AwsApiCalls with the same action and different parameters #25241

Merged
merged 3 commits into from
Apr 28, 2023

Conversation

guiyom-e
Copy link
Contributor

This PR allows multiple AwsApiCalls with the same action and different parameters.
Closes #25014

To be able to test the new behavior, a new integration test has been added in aws-redshift-alpha package.

Next possible step (to be discussed): add an optional callNumber in awsApiCall method to be able to use this method twice with the same action and same parameters.

@gitpod-io
Copy link

gitpod-io bot commented Apr 21, 2023

@github-actions github-actions bot added beginning-contributor [Pilot] contributed between 0-2 PRs to the CDK bug This issue is a bug. p1 labels Apr 21, 2023
@aws-cdk-automation aws-cdk-automation requested a review from a team April 21, 2023 16:22
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.

@guiyom-e guiyom-e changed the title Allow multiple AwsApiCalls with the same action and different parameters fix(integ-tests): allow multiple AwsApiCalls with the same action and different parameters Apr 21, 2023
@aws-cdk-automation aws-cdk-automation dismissed their stale review April 21, 2023 16:31

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

@guiyom-e guiyom-e force-pushed the fix/multiple-aws-api-call branch from a250089 to 94900ec Compare April 22, 2023 13:09
Copy link
Contributor

@corymhall corymhall left a comment

Choose a reason for hiding this comment

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

Looks great! Just one minor change.

@@ -59,7 +59,12 @@ export class DeployAssert extends Construct implements IDeployAssert {
}

public awsApiCall(service: string, api: string, parameters?: any, outputPaths?: string[]): IApiCall {
return new AwsApiCall(this.scope, `AwsApiCall${service}${api}`, {
let hash = 'NoParameter';
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
let hash = 'NoParameter';
let hash = '';

Can we default to no hash instead.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, sure, and it's simpler! I've just pushed changes.

@corymhall corymhall self-assigned this Apr 24, 2023
@guiyom-e guiyom-e force-pushed the fix/multiple-aws-api-call branch from 94900ec to 8a6724c Compare April 28, 2023 13:14
@mergify mergify bot dismissed corymhall’s stale review April 28, 2023 13:14

Pull request has been modified.

corymhall
corymhall previously approved these changes Apr 28, 2023
Copy link
Contributor

@corymhall corymhall 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 the update! 🚀

@mergify
Copy link
Contributor

mergify bot commented Apr 28, 2023

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).

@guiyom-e
Copy link
Contributor Author

guiyom-e commented Apr 28, 2023

@corymhall the merge train github action fails with error refusing to allow a GitHub App to create or update workflow .github/workflows/github-merit-badger.yml without workflows permission err-code: 8A27E
Is it an known error that can be fixed ? Or do I need to rebase manually the PR ?

Note that I checked the "Allow edits and access to secrets by maintainers" checkbox, so the action should be able to rebase itself.

@mergify mergify bot dismissed corymhall’s stale review April 28, 2023 15:31

Pull request has been modified.

@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

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

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

@mergify
Copy link
Contributor

mergify bot commented Apr 28, 2023

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 75967e1 into aws:main Apr 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
beginning-contributor [Pilot] contributed between 0-2 PRs to the CDK bug This issue is a bug. p1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

(integ-test): multiple AwsApiCalls with the same action creates duplicate names
3 participants