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 — gh-115383: Use runner version to compute config.cache key by colesbury · Pull Request #115409 · python/cpython

Conversation

@colesbury

@colesbury colesbury commented Feb 13, 2024 •
edited
Loading

Uh oh!

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

Copy link
Copy Markdown
Contributor

Our GitHub actions build caches the results of "configure" on macOS and Linux. Periodically, GitHub releases new images for their actions runners. This incorporates the runner's OS and image version to compute the config.cache restore key to avoid using a stale configure cache.

  • Issue: Undeclared function 'is_pad' on macos-13 GitHub runners #115383

Sorry, something went wrong.

Uh oh!

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

All reactions
@colesbury colesbury added the skip news label Feb 13, 2024
@colesbury
colesbury requested a review from hugovk February 13, 2024 14:52
@colesbury
colesbury requested a review from ezio-melotti as a code owner February 13, 2024 14:52
@bedevere-app bedevere-app Bot added the awaiting core review label Feb 13, 2024
@bedevere-app bedevere-app Bot mentioned this pull request Feb 13, 2024
Undeclared function 'is_pad' on macos-13 GitHub runners #115383
Closed
@colesbury
pythongh-115383: Use runner version to compute config.cache key
cb945c2
Our GitHub actions build caches the results of "configure" on macOS and
Linux. Periodically, GitHub releases new images for their actions
runners. This incorporates the runner's OS and image version to compute
the config.cache restore key to avoid using a stale configure cache.
@colesbury
colesbury force-pushed the gh-115383-configure branch from 06b31ef to cb945c2 Compare February 13, 2024 14:58
@colesbury colesbury changed the title gh-115383: Use runner version to compute config cache key gh-115383: Use runner version to compute config.cache key Feb 13, 2024
@colesbury
colesbury marked this pull request as draft February 13, 2024 15:03
@bedevere-app bedevere-app Bot removed the awaiting core review label Feb 13, 2024
@colesbury
Fix ImageVersion environment variable access.
e0771be
Default environment variables like "ImageVersion" are not available
through the env context. Unfortunately, ImageVersion is not available in
the "github" context either so we manually re-add it to the environment
as IMAGE_VERSION.
@colesbury
colesbury marked this pull request as ready for review February 13, 2024 16:13
@bedevere-app bedevere-app Bot added the awaiting core review label Feb 13, 2024
@colesbury

colesbury commented Feb 13, 2024

Copy link
Copy Markdown
Contributor Author

@hugovk - after a few false starts, I think this is ready for review!

The macOS tests passed, but I'm going to manually re-run them to see how they behave on subsequent runs.

All reactions

Sorry, something went wrong.

Uh oh!

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

@hugovk

hugovk commented Feb 13, 2024

Copy link
Copy Markdown
Member

Of the three runs, I looked at the just the macos-14 jobs.

Each run has two jobs running in parallel (free-threaded and regular). For the first run, there's no cache, as expected.

At the end of the first run, they try and save the cache. One succeeds. The other doesn't, because "another job may be creating this cache". Fair enough.

For the second run, I would have expected the cache to be there, but both said it wasn't found, even though they used the same key as the first run. That is odd. At the end of the run, one job saves the cache, and the other tries but can't.

For the third run, the same thing happens -- no cache found, then one saves, one doesn't.

I wonder what was going on? Not enough time between runs?

All reactions

Sorry, something went wrong.

Uh oh!

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

@colesbury

colesbury commented Feb 13, 2024 •
edited
Loading

Uh oh!

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

Copy link
Copy Markdown
Contributor Author

For the second run, I would have expected the cache to be there, but both said it wasn't found

It looks to me like the cache is successfully restored on subsequent runs, but things might be confusing because I only re-ran one macOS runner each time 1. GitHub shows the jobs from attempt 1 in attempt 2 if they were not re-run.

Attempt Type Link Cache Hit Saved? Why?
1 default link No Yes
1 free-threaded link No No Conflict
2 free-threaded link Yes No Cache hit
3 default link Yes No Cache hit
4 default link Yes No Cache hit

These look the expected behavior to me. All the runners happened to use image "20240204.1", which is either lucky or unlucky depending on how you look at it.

Footnotes

  1. I couldn't figure out a way in the UI to re-run both macos-13 jobs and I didn't want to re-run all the jobs to avoid hammering the CI any more. ↩

hugovk reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

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

@colesbury

colesbury commented Feb 13, 2024

Copy link
Copy Markdown
Contributor Author

Of the three runs, I looked at the just the macos-14 jobs.

Oh, I only re-ran the macos-13 jobs because that's where we saw failures. Feel free to re-run some or all jobs.

hugovk reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

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

hugovk
hugovk approved these changes Feb 13, 2024
View reviewed changes

@hugovk hugovk left a comment

Copy link
Copy Markdown
Member

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.

Looks good, let's merge and get the CI unblocked! Thanks!

Sorry, something went wrong.

Uh oh!

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

colesbury reacted with hooray emoji
All reactions
  • 🎉 1 reaction
@bedevere-app bedevere-app Bot added awaiting merge and removed awaiting core review labels Feb 13, 2024
@hugovk hugovk added needs backport to 3.11 only security fixes needs backport to 3.12 only security fixes labels Feb 13, 2024
@hugovk
hugovk merged commit 4deb705 into python:main Feb 13, 2024
@miss-islington-app

miss-islington-app Bot commented Feb 13, 2024

Copy link
Copy Markdown

Thanks @colesbury for the PR, and @hugovk for merging it 🌮🎉.. I'm working now to backport this PR to: 3.11, 3.12.
🐍🍒⛏🤖

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 awaiting merge label Feb 13, 2024
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Feb 13, 2024
@colesbury @miss-islington
pythongh-115383: Use runner version to compute config.cache key (pyth…
9273c67
…onGH-115409)

(cherry picked from commit 4deb705)

Co-authored-by: Sam Gross <[email protected]>
@miss-islington-app

miss-islington-app Bot commented Feb 13, 2024

Copy link
Copy Markdown

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

cherry_picker 4deb70590e1829081fb6d110e9dc6d060a49d95d 3.11
All reactions

Sorry, something went wrong.

Uh oh!

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

@bedevere-app

bedevere-app Bot commented Feb 13, 2024

Copy link
Copy Markdown

GH-115427 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.

@miss-islington-app miss-islington-app Bot assigned hugovk Feb 13, 2024
@bedevere-app bedevere-app Bot removed the needs backport to 3.12 only security fixes label Feb 13, 2024
@bedevere-app

bedevere-app Bot commented Feb 13, 2024

Copy link
Copy Markdown

GH-115428 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 Feb 13, 2024
hugovk pushed a commit to hugovk/cpython that referenced this pull request Feb 13, 2024
@colesbury @hugovk
[3.11] pythongh-115383: Use runner version to compute config.cache key (
4dac16f
pythonGH-115409)

(cherry picked from commit 4deb705)

Co-authored-by: Sam Gross <[email protected]>
@ned-deily ned-deily mentioned this pull request Feb 13, 2024
gh-115383: Install ncurses in reusable macos workflow #115389
Closed
@colesbury
colesbury deleted the gh-115383-configure branch February 13, 2024 21:13
hugovk pushed a commit that referenced this pull request Feb 14, 2024
@miss-islington @colesbury
[3.12] gh-115383: Use runner version to compute config.cache key (GH-…
9c73075
…115409) (#115427)

Co-authored-by: Sam Gross <[email protected]>
hugovk added a commit that referenced this pull request Feb 14, 2024
@hugovk @colesbury
[3.11] gh-115383: Use runner version to compute config.cache key (GH-…
b587379
…115409) (#115428)

Co-authored-by: Sam Gross <[email protected]>
fsc-eriker pushed a commit to fsc-eriker/cpython that referenced this pull request Feb 14, 2024
@colesbury @fsc-eriker
pythongh-115383: Use runner version to compute config.cache key (pyth…
26e1145
…on#115409)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@hugovk hugovk hugovk approved these changes
@ezio-melotti ezio-melotti Awaiting requested review from ezio-melotti ezio-melotti is a code owner

Uh oh!

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

Assignees

@hugovk hugovk

Labels

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.

2 participants

@colesbury @hugovk
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 01402520 — 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.