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: remove default fallback when target function does not exist #497

Merged

Conversation

garethgeorge
Copy link
Contributor

The function framework's current behavior is to load an exported function named 'function' if one exists as a fallback if the user's declared target function is not found. This behavior is counter intuitive and can hide misconfiguration from the user.

In this CL a breaking change is made to disable this fallback behavior in favor of failing fast so that the configuration error is highly visible to the user.

Copy link
Contributor

@anniefu anniefu left a comment

Choose a reason for hiding this comment

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

Actually, I'm not sure we want to release this as a breaking change. I think it's just a small bug fix rather than an API change and doesn't really warrant a major version increment.

Could you change the commit description to just fix:?

https://github.com/googleapis/release-please#how-should-i-write-my-commits

@garethgeorge garethgeorge changed the title fix!: remove default fallback when target function does not exist fix: remove default fallback when target function does not exist Jan 3, 2023
Functions framework will no longer load a default function named
'function' if one is exported and the configured target can
not be found. This behavior is unexpected and inconsistent with
other function framework implementations.
@garethgeorge
Copy link
Contributor Author

Done, I wasn't sure if we might want to prevent users from updating to the new behavior. I suspect very few customers are depending on this behavior as it is not part of the contract & is not very expected.

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