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 — Use Alpine Linux in WSL on CI by EliahKagan · Pull Request #1945 · gitpython-developers/GitPython

Conversation

@EliahKagan

@EliahKagan EliahKagan commented Jul 24, 2024 •
edited
Loading

Uh oh!

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

Copy link
Copy Markdown
Member

Some of the CI tests use WSL. This switches the WSL distribution from Debian to Alpine, which might be slightly faster. For the way it is being used here, the main expected speed improvement would be to how long the image would take to download*, as Alpine is smaller.

(The reason for this is thus unrelated to the reason for the Alpine docker CI test job added in #1826. There, the goal was to test on a wider variety of systems and environments, and that runs the whole test suite in Alpine. This just changes the WSL distro, used by a few tests on Windows, from Debian to Alpine.)

Two things have changed that, taken together, have unblocked this:

  • action failing with a 403 on Alpine etc Vampire/setup-wsl#50 was fixed, so the action we are using is able to install Alpine Linux. See: Bump Vampire/setup-wsl from 3.0.0 to 3.1.0 #1917 (review)

  • Some xfail markings fail to validate their exception types #1893 was fixed in lint: add typos check #1888. So if switching the WSL distro from Debian to Alpine breaks any tests, including by making them fail in an unexpected way that raises the wrong exception, we are likely to find out.


* Alpine Linux doesn't ship with bash so this has the setup-wsl action install the bash package. Updating package indexes and installing the package in the WSL system adds to the overhead. It is still much faster to set up than Debian... except that obtaining the Alpine Linux image, even though it is smaller than the Debian image, tends to take longer, because it is not available from as fast of a source. This relates to Vampire/setup-wsl#50 (comment); the issue there was about the action not being able to download from the second source at all, which was fixed.

The effect is that Alpine Linux takes longer to download from outside of GitHub, but is faster to retrieve from the GitHub Actions cache and install. Looking at the total time difference added up from all six Windows jobs that use it, this change does slightly better than with Debian. But the slight increase in complexity would likely make it unjustified given the mixed returns. But that's on the feature branch. I believe the cached download will be reusable across separate workflow runs if this is merged, so I would expect a significant overall improvement, with a total time spent getting WSL set up decreased well under half the original total time. So I think it's probably justified.

This is subjective and I will not be sad if you choose to close this without merging.

Sorry, something went wrong.

Uh oh!

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

All reactions
EliahKagan added 2 commits July 24, 2024 02:32
@EliahKagan
Use Alpine Linux in WSL on CI
58a9a58
Some of the CI tests use WSL. This switches the WSL distribution
from Debian to Alpine, which might be slightly faster. For the way
it is being used here, the main expected speed improvement would be
to how long the image would take to download, as Alpine is smaller.

(The reason for this is thus unrelated to the reason for the Alpine
docker CI test job added in gitpython-developers#1826. There, the goal was to test on a
wider variety of systems and environments, and that runs the whole
test suite in Alpine. This just changes the WSL distro, used by a
few tests on Windows, from Debian to Alpine.)

Two things have changed that, taken together, have unblocked this:

- Vampire/setup-wsl#50 was fixed, so the
  action we are using is able to install Alpine Linux. See:
  gitpython-developers#1917 (review)

- gitpython-developers#1893 was fixed in gitpython-developers#1888. So if switching the WSL distro from
  Debian to Alpine breaks any tests, including by making them fail
  in an unexpected way that raises the wrong exception, we are
  likely to find out.
@EliahKagan
Install bash in WSL Alpine distro
055394a
Because Alpine Linux does not ship with bash, and the tests that
use WSL use it.
@EliahKagan
EliahKagan marked this pull request as ready for review July 24, 2024 07:41
Byron
Byron approved these changes Jul 24, 2024
View reviewed changes

@Byron Byron 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.

Thanks a lot being on top of this!

Let's merge and see if we are lucky with compile-time improvements due to effective GitHub CI caching.

Sorry, something went wrong.

Uh oh!

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

EliahKagan reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
@Byron
Byron merged commit 0b81749 into gitpython-developers:main Jul 24, 2024
@EliahKagan
EliahKagan deleted the wsl-alpine branch July 24, 2024 08:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@Byron Byron Byron approved these changes

Uh oh!

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

Assignees

No one assigned

Labels

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

@EliahKagan @Byron
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.