Root cause:
The method to authenticate Github Actions code to Google Cloud is described here (this is code provided by Google). After a checkout of the repository, the authentication methods create temporary JSON files in the repository folders. However, nbdev 2.0 CI code checks out the repository again using the Github actions/checkout@v3 with the default clean=true option, overwriting the Google Cloud JSON authentication files. Subsequent calls to Google Cloud therefore cannot be authenticated anymore.
The proper way to fix this would be:
Fork fastai/workflows
Add an option clean_repo to fastai/workflows/nbdev-ci/actions.yml to allow setting the clean option for actions/checkout@v3 (default: true)
Add the code to add Google Cloud authentication to this repository in .github/workflows/test.yaml with the option clean_repo=false set
Test this fix with the forked fastai workflows
Submit PR to fastai
After PR is accepted change .github/workflows/test.yaml to use fastai/workflows again instead of the fork
The workaround is to run unit tests with nbdev_test on a local Jupyter notebook instance (ideally with GPU support) or on Google Colab (also ideally with GPU runtime)
Root cause: The method to authenticate Github Actions code to Google Cloud is described here (this is code provided by Google). After a checkout of the repository, the authentication methods create temporary JSON files in the repository folders. However, nbdev 2.0 CI code checks out the repository again using the Github actions/checkout@v3 with the default
clean=true
option, overwriting the Google Cloud JSON authentication files. Subsequent calls to Google Cloud therefore cannot be authenticated anymore.The proper way to fix this would be:
fastai/workflows
clean_repo
tofastai/workflows/nbdev-ci/actions.yml
to allow setting theclean
option foractions/checkout@v3
(default:true
).github/workflows/test.yaml
with the optionclean_repo=false
set.github/workflows/test.yaml
to usefastai/workflows
again instead of the fork