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

Move field roleInstance from Function to CallbackFunction #2645

Merged

Conversation

iwahbe
Copy link
Member

@iwahbe iwahbe commented Jul 26, 2023

Fixes #2639

This actually makes the mixin more self-contained, since we previously added a field to a normal pulumi resource, making TS's lambda.Function different then Go's lambda.Function. With this change, lambda.Function is the same in all languages.


2c09c53: serverless.Function has been deprecated in favor of lambda.CallbackFunction since 2018 (#327). Since it depends on the removed functionality, I have bundled its removal.

Fixes #2639

This actually makes the mixin more self-contained, since we previously added a field to a
normal pulumi resource, making TS's `lambda.Function` different then Go's
`lambda.Function`. With this change, `lambda.Function` is the same in all languages.
@iwahbe iwahbe self-assigned this Jul 26, 2023
@pulumi pulumi deleted a comment from github-actions bot Jul 26, 2023
Copy link
Contributor

@thomas11 thomas11 left a comment

Choose a reason for hiding this comment

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

Looks like some tests need to be updated after the change. How disruptive will this be for existing Function users? I know we can make breaking changes for v6 but is it an easy source code update?

`serverless.Function` has been deprecated in favor of `lambda.CallbackFunction` since
2018 (#327). Since it depends on the removed
functionality, I have bundled its removal.
@iwahbe iwahbe force-pushed the iwahbe/2639/move-roleInstance-from-function-to-callbackFunction branch from 2af82de to 2c09c53 Compare July 26, 2023 13:31
@iwahbe
Copy link
Member Author

iwahbe commented Jul 26, 2023

Looks like some tests need to be updated after the change. How disruptive will this be for existing Function users? I know we can make breaking changes for v6 but is it an easy source code update?

It should be an easy update. roleInstance was always undefined on all lambda.Functions except lambda.CallbackFunction, so the user is not loosing access to any data. Because this is TS with progressive typing, even if you had a collection of lambda.Function, you could always check if ('roleInstance' in f) { // then... to recover old information.

@iwahbe iwahbe requested a review from thomas11 July 26, 2023 13:37
@pulumi pulumi deleted a comment from github-actions bot Jul 26, 2023
@iwahbe iwahbe merged commit 787fa51 into v6 Jul 26, 2023
15 checks passed
@iwahbe iwahbe deleted the iwahbe/2639/move-roleInstance-from-function-to-callbackFunction branch July 26, 2023 14:50
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.

2 participants