-
Notifications
You must be signed in to change notification settings - Fork 6.6k
testing: multi project noxfile-template.py #3700
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
Conversation
|
Note: Python 3.8 build should fail because the service account has no permission on my personal project. |
|
Oh I have typo in the project names, also there's no python3.8 presubmit. |
|
The python3.7 build failed as expected. |
|
py-3.6 successful build with our main project py-3.7 failed build with my personal project I'll add the permission and run the test again. |
0227d0f to
959e8c0
Compare
kurtisvg
left a comment
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.
It might be easier to propose changes to noxfile-template so it's easier to see what has changed, and also include a new file for testing/showing how its configured.
This comment has been minimized.
This comment has been minimized.
|
Initially I thought it was a good idea to have a file name But I changed my mind to use a valid file name as python module. For example, if the file name is I update the PR. @kurtisvg @busunkim96 PTAL |
tmatsuo
left a comment
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.
Thanks! I think I address most of the comments. PTAL
|
Currently py3.7 build is using my personal project and it should fail because I revoked the permissoin. |
|
Well, it doesn't work as expected on Kokoro. Locally the test failed when I set BUILD_SPECIFIC_GCLOUD_PROJECT. I need to think about why. |
|
I gave up being an armchair detective. I'm print-debugging now. |
|
Ok, now the py-3.7 buid is correctly failing. |
also simplified the config stop runnint `gcloud update` add a warning about editing noxfile.py
| # We currently look at pytest.ini for flake8 config. | ||
| # You can add your own exclude and ignore by using `extend-` | ||
| # | ||
| # Example config: | ||
| # [flake8] | ||
| # extend-ignore = I100 | ||
| # extend-exclude = myapp1,myapp2 | ||
| if os.path.isfile("pytest.ini"): | ||
| options += [ | ||
| "--append-config", | ||
| "pytest.ini", | ||
| ] | ||
| options.append(".") | ||
| args = FLAKE8_COMMON_ARGS + options |
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.
nit: IMO, I don't think we should let style checks be configurable, but we can discuss on the next sync
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 agree in general, but it's required for the cloud-run case.
Example:
my_proj
\
e2e_test.py
requirements.txt
my_app1
\
main.py
main_test.py
requirements.txt
The lint session for the parent my_proj will report that import main is in the wrong place because it doesn't recognize the local import files correctly.
So in this case having following pytest.ini is the cleanest solution IMO:
[pytest]
norecursedirs = *
[flake8]
extend-exclude = myapp1
This file allows to skip subdirectories both for pytest and flake8.
|
The test failed with "google.api_core.exceptions.Aborted: 409 Too many concurrent edits to the project configuration. Please try again.", but this is within our expectation. Restarting the build. |
This is a part of #3310 (comment)
This PR also adds
cloud-runsession.