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 GCF Handler documentation. #16284

Merged
merged 2 commits into from Jul 24, 2022
Merged

Fix GCF Handler documentation. #16284

merged 2 commits into from Jul 24, 2022

Conversation

jsirois
Copy link
Member

@jsirois jsirois commented Jul 23, 2022

We were providing incorrect advice for setting the handler function name
when deploying a GCF Lambdex. Correct our incorrect documentation and
misleading logging and expand a code comment to cover what's going on
here.

Fixes #16242

[ci skip-rust]
[ci skip-build-wheels]

We were providing incorrect advice for setting the handler function name
when deploying a GCF Lambdex. Correct our incorrect documentation, and
misleading logging and expand a code comment to cover what's going on
here.

Fixes pantsbuild#16242

[ci skip-rust]
[ci skip-build-wheels]
@@ -103,7 +103,7 @@ def complete_platform(rule_runner: RuleRunner) -> bytes:
{
"pex_exe/BUILD": dedent(
"""\
python_requirement(name="req", requirements=["pex==2.1.66"])
python_requirement(name="req", requirements=["pex==2.1.99"])
Copy link
Member Author

Choose a reason for hiding this comment

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

The tests were failing for me since I'm defaulting to Python 3.11 right now. Pex 2.1.66 does not support 3.11.

@@ -88,4 +88,4 @@ Step 4: Upload to Google Cloud

You can use any of the various Google Cloud methods to upload your zip file, such as the Google Cloud console or the [Google Cloud CLI](https://cloud.google.com/functions/docs/deploying/filesystem#deploy_using_the_gcloud_tool).

You must specify the handler as `main.handler`.
You must specify the handler as `handler`.
Copy link
Sponsor Member

Choose a reason for hiding this comment

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

The "For example" section above still says main.handler: assuming that that is supposed to be aligned here, it might be good for this line to say something like "as demonstrated in the example above."

Copy link
Member Author

Choose a reason for hiding this comment

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

I'm not really following your suggestion, but the "For example" output was no longer accurate. I fixed that just like I was forced to fix it in the tests.

@jsirois jsirois merged commit 1b8067a into pantsbuild:main Jul 24, 2022
@jsirois jsirois deleted the issues/16242 branch July 24, 2022 22:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

google_cloud_function backend: __path__ attribute not found on 'main' while trying to find 'main.handler'
2 participants