Skip to content

fix: Move backwards-compatible logic before function source load - #152

Merged
di merged 4 commits into
masterfrom
legacy-envvar-init
Oct 12, 2021
Merged

di merged 4 commits into
masterfrom
legacy-envvar-init

Conversation

@asriniva

@asriniva asriniva commented Oct 11, 2021

Copy link
Copy Markdown
Contributor

Functions that rely on legacy Python 3.7 env vars (FUNCTION_NAME for example) cannot currently use them in the global scope, since the env var assignment is done after the function source is loaded. This changes the order of the env var assignment and the source load to allow functions access to the env vars even in global scope.

@google-cla google-cla Bot added the cla: yes label Oct 11, 2021
@asriniva
asriniva requested a review from anniefu October 11, 2021 21:14

@anniefu anniefu left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

[nit] Could you add a short explanation in the description? or attach a GitHub Issue if there is one

@asriniva asriniva added the bug Something isn't working label Oct 11, 2021
@asriniva asriniva changed the title Move backwards-compatible logic before function source load fix: Move backwards-compatible logic before function source load Oct 11, 2021
@di
di merged commit d5651bb into master Oct 12, 2021
@di
di deleted the legacy-envvar-init branch October 12, 2021 08:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working cla: yes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants