Skip to content

ci: fix setup-python error of unavailable Python version#14875

Merged
suztomo merged 3 commits intogoogleapis:mainfrom
suztomo:fix_github_actions_python
Dec 5, 2022
Merged

ci: fix setup-python error of unavailable Python version#14875
suztomo merged 3 commits intogoogleapis:mainfrom
suztomo:fix_github_actions_python

Conversation

@suztomo
Copy link
Copy Markdown
Member

@suztomo suztomo commented Dec 5, 2022

Fixes #13409 .

As per actions/setup-python#162 , the error occurs due to the cache of GitHub Actions. Switching versions of the action resolves it. Using a test job on pull request, I confirmed it works:

Screen Shot 2022-12-05 at 11 49 20 AM

@suztomo suztomo requested a review from a team December 5, 2022 16:26
@suztomo
Copy link
Copy Markdown
Member Author

suztomo commented Dec 5, 2022

It works.

Screen Shot 2022-12-05 at 11 49 20 AM


generate:
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

This is ubuntu-latest == ubuntu-20.04 as of now. https://github.com/actions/runner-images

Setting exact version reduces the risk of this job suddenly stop working.

fetch-depth: 1
path: discovery-artifact-manager
- uses: actions/setup-python@v2
- uses: actions/setup-python@v4
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

This is the latest available version.

@suztomo suztomo changed the title ci: checking available python versions ci: fix setup-python error of unavailable Python version Dec 5, 2022
@suztomo suztomo merged commit d0e943a into googleapis:main Dec 5, 2022
@suztomo suztomo deleted the fix_github_actions_python branch December 5, 2022 16:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

codegen job has been failing

2 participants