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

Add validation during build time for Handler max length #1778

Open
2 tasks
matthewyost opened this issue Jul 18, 2024 · 4 comments
Open
2 tasks

Add validation during build time for Handler max length #1778

matthewyost opened this issue Jul 18, 2024 · 4 comments
Labels
annotations bug This issue is a bug. p1 This is a high priority issue queued

Comments

@matthewyost
Copy link

Describe the feature

Include validation on the LambdaFunction attribute that notifies developer that the generated function handler is over the maximum character length (128) so that it can be fixed at build time.

Use Case

When using the Amazon.Lambda.Annotations you can hit the limit for max length of a FunctionHandler string in Cloudformation and only recognize this after attempting to deploy it

Proposed Solution

No response

Other Information

No response

Acknowledgements

  • I may be able to implement this feature request
  • This feature might incur a breaking change

AWS .NET SDK and/or Package version used

Amazon.Lambda.Annotations version 1.5.0.0

Targeted .NET Platform

.NET 6/8

Operating System and version

All

@matthewyost matthewyost added feature-request A feature should be added or improved. needs-triage This issue or PR still needs to be triaged. labels Jul 18, 2024
@bhoradc bhoradc added needs-review p2 This is a standard priority issue annotations and removed needs-triage This issue or PR still needs to be triaged. labels Jul 18, 2024
@bhoradc
Copy link

bhoradc commented Jul 18, 2024

Hi @matthewyost,

Thanks for submitting the feature request. I will review it with the team.

Regards,
Chaitanya

@ashishdhingra
Copy link
Contributor

Also refer #1642 where the last character is stripped from the handler name. It's an open issue with the Lambda runtime team and they might plan to fix it in near future. So, currently, handler name of 127 would be supported actually due to issue in runtime.

@matthewyost
Copy link
Author

While I understand that there is a boundary concern here (still valid), the request is more for the DevX around finding this in the IDE before we execute it in CloudFormation. I spent a lot of time trying to determine exactly why this was happening only to figure out that it was being cause by the SourceGenerator inside the Annotations library.

If we had the ability to have this lintable, that would be ideal.

@ashishdhingra
Copy link
Contributor

While I understand that there is a boundary concern here (still valid), the request is more for the DevX around finding this in the IDE before we execute it in CloudFormation. I spent a lot of time trying to determine exactly why this was happening only to figure out that it was being cause by the SourceGenerator inside the Annotations library.

If we had the ability to have this lintable, that would be ideal.

@matthewyost Thanks for your reply. I added #1778 (comment) just for reference. It would still be a good idea to add some validation.

@bhoradc bhoradc added p3 This is a minor priority issue xs Effort estimation: tiny queued p1 This is a high priority issue and removed p2 This is a standard priority issue needs-review p3 This is a minor priority issue feature-request A feature should be added or improved. labels Jul 19, 2024
@96malhar 96malhar added bug This issue is a bug. and removed xs Effort estimation: tiny labels Jul 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
annotations bug This issue is a bug. p1 This is a high priority issue queued
Projects
None yet
Development

No branches or pull requests

4 participants