Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

mazyu36
Copy link
Contributor

@mazyu36 mazyu36 commented Mar 29, 2025

Issue # (if applicable)

N/A

I found this problem while working on #33962.

Reason for this change

Re-running packages/@aws-cdk/aws-amplify-alpha/test/integ.app.ts, got the following error:

Resource handler returned message: "Invalid request provided: Status field in rewrite custom rules should not be empty (Service: Amplify, Status Code: 400, Request ID: 3f3694f1-3eeb-4af3-8cdf-8b77b6387e57) (SDK Attempt Count: 1)" (RequestToken: 5748aef8-c0e1-1a1d-ab27-1bab938e0bd3, HandlerErrorCode: InvalidRequest)

If status is omitted in customRules, App cannot be deployed.

Description of changes

Specify status property in integ test.

Describe any new or updated permissions being added

N/A

Description of how you validated changes

Re-ran integ test.

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 March 29, 2025 14:30
@github-actions github-actions bot added p2 distinguished-contributor [Pilot] contributed 50+ PRs to the CDK labels Mar 29, 2025
@mazyu36
Copy link
Contributor Author

mazyu36 commented Mar 29, 2025

I'm not sure whether the status property should be changed to required or not.

In Management Console, this property appears to be required.
image

But in CFn docs, this property is optional.

Considering the possibility that it was optional in the past, I have left it as is.

Copy link

codecov bot commented Mar 29, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 83.98%. Comparing base (74cbe27) to head (14442bd).
Report is 6 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #33973   +/-   ##
=======================================
  Coverage   83.98%   83.98%           
=======================================
  Files         120      120           
  Lines        6976     6976           
  Branches     1178     1178           
=======================================
  Hits         5859     5859           
  Misses       1005     1005           
  Partials      112      112           
Flag Coverage Δ
suite.unit 83.98% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
packages/aws-cdk ∅ <ø> (∅)
packages/aws-cdk-lib/core 83.98% <ø> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@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 29, 2025
Copy link
Contributor

@badmintoncryer badmintoncryer left a comment

Choose a reason for hiding this comment

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

Thank you for your contribution! I've added just a comment.

Can we deploy App with CustomRule without specifying status?
This means that is it possible that the CloudFormation documentation is incorrect?


new IntegTest(app, 'cdk-amplify-app-integ', {
testCases: [stack],
enableLookups: true,
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm curious that why is it needed to enable enableLookups?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks.
This is not needed. I've removed.

@mazyu36
Copy link
Contributor Author

mazyu36 commented Apr 6, 2025

Thank you for the review.

Can we deploy App with CustomRule without specifying status?

At the moment, this cannot be deployed.
I've encountered the following error.

Resource handler returned message: "Invalid request provided: Status field in rewrite custom rules should not be empty (Service: Amplify, Status Code: 400, Request ID: 3f3694f1-3eeb-4af3-8cdf-8b77b6387e57) (SDK Attempt Count: 1)" (RequestToken: 5748aef8-c0e1-1a1d-ab27-1bab938e0bd3, HandlerErrorCode: InvalidRequest)

Since the previous integ could be deployed, this may be due to a change in Amplify's behavior, but I'm not sure.
I plan to submit an issue to https://github.com/aws-cloudformation/cloudformation-coverage-roadmap.

Copy link
Contributor

@badmintoncryer badmintoncryer left a comment

Choose a reason for hiding this comment

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

Thank you for your assistance!

@aws-cdk-automation aws-cdk-automation added pr/needs-maintainer-review This PR needs a review from a Core Team Member and removed pr/needs-community-review This PR needs a review from a Trusted Community Member or Core Team Member. labels Apr 6, 2025
@paulhcsun
Copy link
Contributor

@Mergifyio update

Copy link
Contributor

mergify bot commented Apr 7, 2025

update

✅ Branch has been successfully updated

Copy link
Contributor

mergify bot commented Apr 7, 2025

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

1 similar comment
Copy link
Contributor

mergify bot commented Apr 7, 2025

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 Apr 7, 2025
Copy link
Contributor

mergify bot commented Apr 7, 2025

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
Copy link
Collaborator

AWS CodeBuild CI Report

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

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

@mergify mergify bot merged commit 6638c08 into aws:main Apr 7, 2025
20 checks passed
Copy link
Contributor

mergify bot commented Apr 7, 2025

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

Copy link
Contributor

github-actions bot commented Apr 7, 2025

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 7, 2025
@mazyu36 mazyu36 deleted the fix/amplify-custom-rule branch April 8, 2025 13:17
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
distinguished-contributor [Pilot] contributed 50+ PRs to the CDK p2
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants