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(lambda): use enum values for applicationLogLevel and systemLogLevel #29904

Merged
merged 6 commits into from
May 29, 2024

Conversation

dali546
Copy link
Contributor

@dali546 dali546 commented Apr 19, 2024

Issue # (if applicable)

Reason for this change

Enumerate ApplicationLogLevel and SystemLogLevel to help with typing

Description of changes

Both fields should use the enum type for available options

Description of how you validated changes

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 19, 2024
@aws-cdk-automation aws-cdk-automation requested a review from a team April 19, 2024 10:23
@github-actions github-actions bot added the beginning-contributor [Pilot] contributed between 0-2 PRs to the CDK label Apr 19, 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.

@dali546
Copy link
Contributor Author

dali546 commented Apr 21, 2024

Exemption Request: minor typescript change

@aaythapa aaythapa self-assigned this Apr 22, 2024
@aaythapa
Copy link
Contributor

Hi @dali546, thanks for making this change! Not sure why it wasn't an enum before. I'll have to double check to see if this is backwards compatible. In the meantime looks like the build step is failing because the some integration test snapshots need updates. You can use yarn integ --update-on-failed to update the integ snapshots.

@dali546
Copy link
Contributor Author

dali546 commented Apr 22, 2024

Hi @aaythapa, thank you for taking a look at this PR... I've cloned down this repo, but unsure where to run yarn integ --update-on-failed? And it also suggests I should be authenticated with AWS for this too? Is this something I should be doing as a external contributor?

@aaythapa
Copy link
Contributor

aaythapa commented Apr 22, 2024

Hi @dali546, looking through the build log and I see API elements with incompatible change, this basically means that this PR in its current state is backwards incompatible :(.

You can enforce the enum type by making a new property (maybe called systemLogLevelV2) and have that property use the enum. You'd then deprecate the old systemLogLevel property. This would also fix the build failures you're seeing in the PR but you'd still have to add some integ tests.

This PR pretty much fixes the same issue you're trying to fix so feel free to use it as reference (note this PR doesn't deprecate the old property for some reason, this pr is a good example of adding a deprecated label). You can use our integ test guide to add new integ tests.

@dali546
Copy link
Contributor Author

dali546 commented Apr 24, 2024

Hi @aaythapa. I need a little help. Locally I am trying to run yarn run integ-runner --update-on-failed --directory packages/@aws-cdk-testing/test/aws-lambda but my results show as UNCHANGED for all of them. it's not generating a new snapshot

Any advice?

@aaythapa
Copy link
Contributor

Hi @dali546, sorry about the delay. Not sure what the exact issue could be. You can try deleting the snapshot folder for the test and re-making it. I see that integ.logging-config.js test is failing, so you can delete that tests snapshot folder and re-run so it creates a new folder, hopefully the different snapshot will show up.

@aws-cdk-automation aws-cdk-automation dismissed their stale review April 30, 2024 22:02

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

@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 Apr 30, 2024
@dali546 dali546 requested a review from aaythapa May 4, 2024 21:14
@dali546 dali546 force-pushed the patch-1 branch 3 times, most recently from f027aeb to bc42277 Compare May 6, 2024 14:12
Copy link
Contributor

@aaythapa aaythapa left a comment

Choose a reason for hiding this comment

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

@dali546 looks good, just some small final comments.

@aaythapa aaythapa changed the title fix: use enum values for applicationLogLevel and systemLogLevel fix(lambda): use enum values for applicationLogLevel and systemLogLevel May 8, 2024
@dali546
Copy link
Contributor Author

dali546 commented May 27, 2024

hi @dali546, this PR is really close, do you still have time to work on this? If not I can take it over the line

Hi @aaythapa , apologies. I will try and get it done this week, if not please takeover. I apologize for the delay

@aaythapa
Copy link
Contributor

hi @dali546, this PR is really close, do you still have time to work on this? If not I can take it over the line

Hi @aaythapa , apologies. I will try and get it done this week, if not please takeover. I apologize for the delay

Np, this isn't urgent so I'll let you take this all the way to the finish line

Copy link
Contributor

@aaythapa aaythapa 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 adding this

Copy link
Contributor

mergify bot commented May 29, 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-community-review This PR needs a review from a Trusted Community Member or Core Team Member. label May 29, 2024
@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildv2Project1C6BFA3F-wQm2hXv2jqQv
  • Commit ID: a267400
  • 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 3f53a45 into aws:main May 29, 2024
12 checks passed
Copy link
Contributor

mergify bot commented May 29, 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).

@dali546 dali546 deleted the patch-1 branch May 31, 2024 09:56
atanaspam pushed a commit to atanaspam/aws-cdk that referenced this pull request Jun 3, 2024
…el (aws#29904)

### Issue # (if applicable)

### Reason for this change

Enumerate `ApplicationLogLevel` and `SystemLogLevel` to help with typing

### Description of changes

Both fields should use the enum type for available options

### Description of how you validated changes



### 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*
vdahlberg pushed a commit to vdahlberg/aws-cdk that referenced this pull request Jun 10, 2024
…el (aws#29904)

### Issue # (if applicable)

### Reason for this change

Enumerate `ApplicationLogLevel` and `SystemLogLevel` to help with typing

### Description of changes

Both fields should use the enum type for available options

### Description of how you validated changes



### 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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants