Skip to content

Conversation

paulhcsun
Copy link
Contributor

Description of changes

  1. Add README for enum-updater.
  2. Fix exclusion mechanism where values were not matching because they were not being normalized prior to matching.

Checklist


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

@github-actions github-actions bot added the p2 label Apr 30, 2025
@aws-cdk-automation aws-cdk-automation requested a review from a team April 30, 2025 00:09
@mergify mergify bot added the contribution/core This is a PR that came from AWS. label Apr 30, 2025
@aws-cdk-automation aws-cdk-automation added the pr/needs-maintainer-review This PR needs a review from a Core Team Member label Apr 30, 2025
Copy link
Member

@Leo10Gama Leo10Gama left a comment

Choose a reason for hiding this comment

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

Overall looks good, just a few minor nits on README formatting. Requesting changes instead of just a comment because I think we should have unit tests for the exclusion logic so we can confirm the exclusion mechanism works as intended this time.

@aws-cdk-automation aws-cdk-automation removed the pr/needs-maintainer-review This PR needs a review from a Core Team Member label Apr 30, 2025
Copy link
Member

@Leo10Gama Leo10Gama 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 including in the tests! I noticed there's a bit of a unique implementation for the static-enum-mapping-updater ones mocking the string split. I have a feeling that there might be a simpler way to implement those checks without going through that approach, but if not, I think we ought to comment in why we're taking that approach instead. I'm happy to discuss other alternative implementations and get this off the ground!

'module1': {
'Enum1': {
cdk_path: 'path/to/enum1',
missing_values: ['VALUE3']
Copy link
Member

Choose a reason for hiding this comment

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

I'm noticing this check is consistent with this test, but the other tests are expect(result).toEqualing the non-normalized, lowercase value. Wondering if that might cause issues later down the line, and if we should normalize the output of the findMissingValues method as well. Thoughts?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think for the purpose of this test which is to check that it is able to identify missing values through normalization, it's fine to leave it as is. I don't expect this test to cause issues later on since the values are being normalized within the method itself.

Copy link
Member

Choose a reason for hiding this comment

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

Fair enough. Future improvement could probably be to validate that final output, but that's out of scope for these changes.

Copy link
Member

@Leo10Gama Leo10Gama left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

@Leo10Gama
Copy link
Member

@Mergifyio update

Copy link
Contributor

mergify bot commented May 2, 2025

update

❌ Mergify doesn't have permission to update

For security reasons, Mergify can't update this pull request. Try updating locally.
GitHub response: refusing to allow a GitHub App to create or update workflow .github/workflows/enum-static-mapping-updater.yml without workflows permission

Copy link
Contributor

mergify bot commented May 2, 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

mergify bot commented May 2, 2025

This pull request has been removed from the queue for the following reason: pull request branch update failed.

The pull request can't be updated.

You should update or rebase your pull request manually. If you do, this pull request will automatically be requeued once the queue conditions match again.
If you think this was a flaky issue, you can requeue the pull request, without updating it, by posting a @mergifyio requeue comment.

@Leo10Gama
Copy link
Member

@Mergifyio update

Copy link
Contributor

mergify bot commented May 2, 2025

update

❌ Mergify doesn't have permission to update

For security reasons, Mergify can't update this pull request. Try updating locally.
GitHub response: refusing to allow a GitHub App to create or update workflow .github/workflows/enum-static-mapping-updater.yml without workflows permission

@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildv2Project1C6BFA3F-wQm2hXv2jqQv
  • Commit ID: 5ab3952
  • 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 May 2, 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).

@mergify mergify bot merged commit 98713be into aws:main May 2, 2025
14 of 15 checks passed
Copy link
Contributor

github-actions bot commented May 2, 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 May 2, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
contribution/core This is a PR that came from AWS. p2
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants