Skip to content

Conversation

@pahud
Copy link
Contributor

@pahud pahud commented Jul 30, 2025

Fixes #35049

The deprecated 'role' property in ProviderProps interface had incorrect JSDoc @deprecated comment referencing non-existent property names:

  • frameworkOnEventLambdaRole (incorrect)
  • frameworkIsCompleteLambdaRole (incorrect)
  • frameworkOnTimeoutLambdaRole (incorrect)

Updated to reference the correct property names:

  • frameworkOnEventRole
  • frameworkCompleteAndTimeoutRole

This improves developer experience by providing accurate migration guidance when using the deprecated role property.

Issue # (if applicable)

Closes #35049.

Reason for this change

The JSDoc @deprecated comment for the role property in the ProviderProps interface contained incorrect property names that don't exist in the interface. This misleads developers who are trying to migrate away from the deprecated property, causing confusion and potential implementation errors.

Description of changes

Files Modified:

  • packages/aws-cdk-lib/custom-resources/lib/provider-framework/provider.ts (line 126)

Changes Made:
Updated the JSDoc @deprecated comment from:

@deprecated - Use frameworkOnEventLambdaRole, frameworkIsCompleteLambdaRole, frameworkOnTimeoutLambdaRole

To:

@deprecated - Use frameworkOnEventRole, frameworkCompleteAndTimeoutRole

Why these changes address the issue:

  • The corrected property names (frameworkOnEventRole and frameworkCompleteAndTimeoutRole) actually exist in the ProviderProps interface
  • These are the proper replacement properties that developers should use instead of the deprecated role property
  • The fix aligns the documentation with the actual API, preventing developer confusion

Alternatives considered:

  • No alternatives were considered as this is a straightforward documentation correction to match existing interface properties

Design decisions:

  • This is purely a documentation fix with no functional changes
  • The corrected property names were verified against the actual interface definition and existing test cases

Describe any new or updated permissions being added

No new or updated IAM permissions are needed. This is a documentation-only change that corrects JSDoc comments.

Description of how you validated changes

Build Validation:

  • ✅ Module builds successfully (yarn build in custom-resources)
  • ✅ JSII compilation passes without errors
  • ✅ ESLint passes without warnings

Property Name Verification:

  • ✅ Confirmed frameworkOnEventRole exists in the ProviderProps interface (lines 147-154)
  • ✅ Confirmed frameworkCompleteAndTimeoutRole exists in the ProviderProps interface (lines 156-166)
  • ✅ Verified these properties are used in existing unit tests (packages/aws-cdk-lib/custom-resources/test/provider-framework/provider.test.ts)

Documentation Impact:

  • ✅ JSDoc comments now reference actual interface properties
  • ✅ Generated language bindings will reflect corrected documentation
  • ✅ IDE tooltips will show accurate migration guidance

Checklist


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

…viderProps

Fixes aws#35049

The deprecated 'role' property in ProviderProps interface had incorrect
JSDoc @deprecated comment referencing non-existent property names:
- frameworkOnEventLambdaRole (incorrect)
- frameworkIsCompleteLambdaRole (incorrect)
- frameworkOnTimeoutLambdaRole (incorrect)

Updated to reference the correct property names:
- frameworkOnEventRole
- frameworkCompleteAndTimeoutRole

This improves developer experience by providing accurate migration
guidance when using the deprecated role property.
@aws-cdk-automation aws-cdk-automation requested a review from a team July 30, 2025 00:13
@github-actions github-actions bot added effort/small Small work item – less than a day of effort p2 labels Jul 30, 2025
@mergify mergify bot added the contribution/core This is a PR that came from AWS. label Jul 30, 2025
@pahud pahud marked this pull request as ready for review July 30, 2025 00:16
@aws-cdk-automation aws-cdk-automation added the pr/needs-maintainer-review This PR needs a review from a Core Team Member label Jul 30, 2025
@kumsmrit kumsmrit self-assigned this Jul 30, 2025
@mergify
Copy link
Contributor

mergify bot commented Jul 31, 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
Copy link
Contributor

mergify bot commented Jul 31, 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: e09439f
  • 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 9da53d2 into aws:main Jul 31, 2025
20 checks passed
@github-actions
Copy link
Contributor

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 Jul 31, 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. effort/small Small work item – less than a day of effort p2 pr/needs-maintainer-review This PR needs a review from a Core Team Member

Projects

None yet

Development

Successfully merging this pull request may close these issues.

custom-resources: Incorrect documentation/comment for deprecated ProviderProps.role property

3 participants