-
Notifications
You must be signed in to change notification settings - Fork 118
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
chore: run buildpack integration test on pull request #255
chore: run buildpack integration test on pull request #255
Conversation
a979e31
to
0e2b5e7
Compare
0e2b5e7
to
2a4c8ed
Compare
tests/conformance/prerun.sh
Outdated
cat requirements.txt | ||
|
||
echo $PYTHON_VERSION >.python-version |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this required for the test to use the right python version? Was the builder-runtime
env not being used for this purpose?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For some reason it was not picking up the correct version. See https://github.com/GoogleCloudPlatform/functions-framework-python/actions/runs/5073551086/jobs/9112706450#step:6:493 for example of the builder getting and using python v 3.11 when the action was asking for python37 . See https://github.com/GoogleCloudPlatform/functions-framework-python/actions/runs/5480718756/jobs/9984237010?pr=255#step:6:287 on example of how after adding file it is using the right version.
Not sure if we have been always testing with latest python version or if this bug appeared later on.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was able to reproduce by just running builder in local function
Steps to repro:
1. mkdir ~/my-repro cd ~/my-repro
2. main.py
import functions_framework
@functions_framework.http
def hello(request):
return "Hello world!"
- requirements file requirements.txt
functions-framework==3.4.0
-
Run buildpack
pack build --builder gcr.io/buildpacks/builder:latest --env GOOGLE_FUNCTION_TARGET=hello--env X_GOOGLE_TARGET_PLATFORM=gcf --env GOOGLE_FUNCTION_SOURCE=. --env GOOGLE_RUNTIME=python37 --trust-builder --verbose my-first-function > test.log
-
It logs:
Python version not specified, using the latest available version.
2a4c8ed
to
66fecc2
Compare
66fecc2
to
67d5ce3
Compare
@KaylaNguyen I modified conformance client to accept a runtime version flag that populates |
No description provided.