Add legacy GCF Python 3.7 behavior#77
Conversation
| os.environ["FUNCTION_TRIGGER_TYPE"] = signature_type | ||
| os.environ["FUNCTION_NAME"] = os.environ.get("K_SERVICE", target) |
There was a problem hiding this comment.
I think this raises some questions about how the environment variables should be handled in the 3.7 buildpack runtime. This has the effect of setting some of them, which is good... but why these? Should we be setting all of them?
Furthermore, should we set FUNCTION_TRIGGER_TYPE and FUNCTION_NAME for 3.8 as well? It would make it easier for users to migrate from 3.7 to 3.8.
There was a problem hiding this comment.
The remaining env vars don't have an equivalent in newer GCF runtimes, so they have to be set outside of the functions framework/buildpack.
For the second question, there was precedent in the nodejs8 -> nodejs10 transition, where the older env vars were dropped. To prevent carrying on the tech debt I think they should not be available in Python 3.8.
There was a problem hiding this comment.
I'll take this discussion elsewhere 🙂
* Add legacy GCF Python 3.7 behavior * Add test * Modify tests
* Version 1.5.0 (#69) * Revert "Version 2.0.0 (#67)" This reverts commit f2471b4. * Revert "Add Cloud Events support for #55 (#56) (#64)" This reverts commit 8f3fe35. * Version 1.5.0 * Add legacy GCF Python 3.7 behavior (#77) * Add legacy GCF Python 3.7 behavior * Add test * Modify tests * Version 1.6.0 (#81) Co-authored-by: Arjun Srinivasan <[email protected]>
No description provided.