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: top level comment not replacing existing ones #12862

Open
wants to merge 2 commits into
base: dev
Choose a base branch
from

Conversation

juniarz
Copy link
Contributor

@juniarz juniarz commented Jun 25, 2023

Fixes the issue where top level comments are not replaced after an update to the function.

Description of changes

This fixes the issue where the regex for the function top level comments are not working, resulting in duplicates of the Amplify params that is generated after an update to a function (especially resources).

Image showing top level comments

Issue #, if available

NA

Description of how you validated changes

Updated a function in my local environment and the top level comments are correctly replaced.

Checklist

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Fixes the issue where top level comments are not updated after an update to the function.
@juniarz juniarz requested a review from a team as a code owner June 25, 2023 14:35
@jhockett
Copy link
Contributor

Hi @juniarz, thanks for your contribution!

It looks like a unit test in packages/amplify-category-function/src/__tests__/provider-utils/awscloudformation/service-walkthroughs/execPermissionsWalkthrough.test.ts is failing because the snapshot is out of date. You can run yarn jest --updateSnapshot <path to test> to update it automatically.

Additionally, are you able to add a test case to ensure the comment is updated correctly?

@juniarz
Copy link
Contributor Author

juniarz commented Jul 9, 2023

Hi @juniarz, thanks for your contribution!

It looks like a unit test in packages/amplify-category-function/src/__tests__/provider-utils/awscloudformation/service-walkthroughs/execPermissionsWalkthrough.test.ts is failing because the snapshot is out of date. You can run yarn jest --updateSnapshot <path to test> to update it automatically.

Additionally, are you able to add a test case to ensure the comment is updated correctly?

Hey, I resolved the issue, please check it out!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants