GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — CI: Include Python version in cache.config key by hugovk · Pull Request #111410 · python/cpython

Conversation

@hugovk

@hugovk hugovk commented Oct 27, 2023

Copy link
Copy Markdown
Member

Yesterday, the actions/setup-python updated the Python version 3.x from 3.11 to 3.12 which caused build failures in the "Configure CPython" step of the check_generated_files job:

configure: loading cache config.cache
configure: error: `PKG_CONFIG_PATH' has changed since the previous run:
configure:   former value:  `/opt/hostedtoolcache/Python/3.11.6/x64/lib/pkgconfig'
configure:   current value: `/opt/hostedtoolcache/Python/3.12.0/x64/lib/pkgconfig'
configure: error: in `/home/runner/work/cpython/cpython':
configure: error: changes in the environment can compromise the build
configure: error: run `make distclean' and/or `rm config.cache'
	    and start over
Error: Process completed with exit code 1.

https://github.com/python/cpython/actions/runs/6658472864/job/18096250159

Deleting the check_generated_files-Linux-52d68ba849d6fda1735c7031561b5102961493401ad71cfb10f4fcbca7a3c9d4 file from https://github.com/python/cpython/actions/caches and restarting the job, fixed it (the filename was shown in the "Restore config.cache" step.

The root problem is the Python version isn't part of the cache file's key.

We need to include it, so when the version changes, there'll be a new key, and so the old cache file won't be used anymore (and eventually deleted), and a new one will be generated.

So let's add ${{ env.pythonLocation }} to the key used by actions/cache.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
hugovk added 2 commits October 27, 2023 22:22
@hugovk
Include Python version in cache.config key, after Python setup
b538145
@hugovk
Remove EOL 3.7 from branch triggers
a970299
@hugovk
hugovk requested a review from ezio-melotti as a code owner October 27, 2023 19:29
@bedevere-app bedevere-app Bot added the awaiting core review label Oct 27, 2023
@hugovk hugovk added skip issue skip news labels Oct 27, 2023
hauntsaninja
hauntsaninja approved these changes Oct 27, 2023
View reviewed changes

@hauntsaninja hauntsaninja left a comment

Copy link
Copy Markdown
Contributor

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 for figuring it out and fixing!

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

hugovk reacted with rocket emoji
All reactions
  • 🚀 1 reaction
@bedevere-app bedevere-app Bot added awaiting merge and removed awaiting core review labels Oct 27, 2023
ezio-melotti
ezio-melotti approved these changes Oct 28, 2023
View reviewed changes
@hugovk
hugovk merged commit 9d4a1a4 into python:main Oct 28, 2023
@hugovk
hugovk deleted the ci-cache.config-key branch October 28, 2023 07:23
@bedevere-app bedevere-app Bot removed the awaiting merge label Oct 28, 2023
@hugovk hugovk added needs backport to 3.11 only security fixes needs backport to 3.12 only security fixes labels Oct 28, 2023
@miss-islington-app

miss-islington-app Bot commented Oct 28, 2023

Copy link
Copy Markdown

Thanks @hugovk for the PR 🌮🎉.. I'm working now to backport this PR to: 3.12.
🐍🍒⛏🤖

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@miss-islington-app

miss-islington-app Bot commented Oct 28, 2023

Copy link
Copy Markdown

Thanks @hugovk for the PR 🌮🎉.. I'm working now to backport this PR to: 3.11.
🐍🍒⛏🤖

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Oct 28, 2023
@hugovk @miss-islington
CI: Include Python version in cache.config key (pythonGH-111410)
2932360
* Include Python version in cache.config key, after Python setup

* Remove EOL 3.7 from branch triggers
(cherry picked from commit 9d4a1a4)

Co-authored-by: Hugo van Kemenade <[email protected]>
@bedevere-app

bedevere-app Bot commented Oct 28, 2023

Copy link
Copy Markdown

GH-111421 is a backport of this pull request to the 3.12 branch.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-app bedevere-app Bot removed the needs backport to 3.12 only security fixes label Oct 28, 2023
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Oct 28, 2023
@hugovk @miss-islington
CI: Include Python version in cache.config key (pythonGH-111410)
33bd7e0
* Include Python version in cache.config key, after Python setup

* Remove EOL 3.7 from branch triggers
(cherry picked from commit 9d4a1a4)

Co-authored-by: Hugo van Kemenade <[email protected]>
@bedevere-app

bedevere-app Bot commented Oct 28, 2023

Copy link
Copy Markdown

GH-111422 is a backport of this pull request to the 3.11 branch.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-app bedevere-app Bot removed the needs backport to 3.11 only security fixes label Oct 28, 2023
hugovk added a commit that referenced this pull request Oct 28, 2023
@miss-islington @hugovk
[3.11] CI: Include Python version in cache.config key (GH-111410) (#1…
da1736b
…11422)

CI: Include Python version in cache.config key (GH-111410)

* Include Python version in cache.config key, after Python setup

* Remove EOL 3.7 from branch triggers
(cherry picked from commit 9d4a1a4)

Co-authored-by: Hugo van Kemenade <[email protected]>
hugovk added a commit that referenced this pull request Oct 28, 2023
@miss-islington @hugovk
[3.12] CI: Include Python version in cache.config key (GH-111410) (#1…
cf29a2f
…11421)

CI: Include Python version in cache.config key (GH-111410)

* Include Python version in cache.config key, after Python setup

* Remove EOL 3.7 from branch triggers
(cherry picked from commit 9d4a1a4)

Co-authored-by: Hugo van Kemenade <[email protected]>
iritkatriel pushed a commit to iritkatriel/cpython that referenced this pull request Oct 29, 2023
@hugovk @iritkatriel
CI: Include Python version in cache.config key (python#111410)
b632fc1
* Include Python version in cache.config key, after Python setup

* Remove EOL 3.7 from branch triggers
@hugovk hugovk added needs backport to 3.11 only security fixes needs backport to 3.12 only security fixes labels Oct 31, 2023
@miss-islington-app

miss-islington-app Bot commented Oct 31, 2023

Copy link
Copy Markdown

Thanks @hugovk for the PR 🌮🎉.. I'm working now to backport this PR to: 3.11.
🐍🍒⛏🤖

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@miss-islington-app

miss-islington-app Bot commented Oct 31, 2023

Copy link
Copy Markdown

Thanks @hugovk for the PR 🌮🎉.. I'm working now to backport this PR to: 3.12.
🐍🍒⛏🤖

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@hugovk hugovk removed needs backport to 3.12 only security fixes needs backport to 3.11 only security fixes labels Oct 31, 2023
@miss-islington-app

miss-islington-app Bot commented Oct 31, 2023

Copy link
Copy Markdown

Sorry, @hugovk, I could not cleanly backport this to 3.11 due to a conflict.
Please backport using cherry_picker on command line.

cherry_picker 9d4a1a480b65196c3aabbcd2d165d1fb86d0c8e5 3.11
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@miss-islington-app miss-islington-app Bot assigned hugovk Oct 31, 2023
@miss-islington-app

miss-islington-app Bot commented Oct 31, 2023

Copy link
Copy Markdown

Sorry, @hugovk, I could not cleanly backport this to 3.12 due to a conflict.
Please backport using cherry_picker on command line.

cherry_picker 9d4a1a480b65196c3aabbcd2d165d1fb86d0c8e5 3.12
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@hugovk

hugovk commented Oct 31, 2023

Copy link
Copy Markdown
Member Author

This was already backported 🙃

AlexWaygood reacted with laugh emoji
All reactions
  • 😄 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

aisk pushed a commit to aisk/cpython that referenced this pull request Feb 11, 2024
@hugovk @aisk
CI: Include Python version in cache.config key (python#111410)
208ef64
* Include Python version in cache.config key, after Python setup

* Remove EOL 3.7 from branch triggers
Glyphack pushed a commit to Glyphack/cpython that referenced this pull request Sep 2, 2024
@hugovk @Glyphack
CI: Include Python version in cache.config key (python#111410)
0e1d4f6
* Include Python version in cache.config key, after Python setup

* Remove EOL 3.7 from branch triggers
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@hauntsaninja hauntsaninja hauntsaninja approved these changes
@ezio-melotti ezio-melotti ezio-melotti approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@hugovk hugovk

Labels

skip issue skip news

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@hugovk @hauntsaninja @ezio-melotti
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.