Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

action failing with a 403 on Alpine etc #50

Closed
ljharb opened this issue Nov 13, 2023 · 12 comments
Closed

action failing with a 403 on Alpine etc #50

ljharb opened this issue Nov 13, 2023 · 12 comments
Milestone

Comments

@ljharb
Copy link

ljharb commented Nov 13, 2023

You can see this on your own actions here: https://github.com/Vampire/setup-wsl/actions/runs/6844395408/job/18608259622

@ljharb ljharb changed the title action failing with a 403 action failing with a 403 on Alpine etc Nov 13, 2023
@Vampire
Copy link
Owner

Vampire commented Nov 13, 2023

Yeah, I'm already looking into it.
Thanks for the issue though.
Seems something changed on the WSL distribution download sites.

@ljharb
Copy link
Author

ljharb commented Nov 13, 2023

I’d be happy to help track it down; unfortunately the action doesn’t log what URL it’s trying to download and i can’t find it in the code.

@Vampire
Copy link
Owner

Vampire commented Nov 13, 2023

This part: https://github.com/Vampire/setup-wsl/blob/master/src/main/kotlin/net/kautler/github/action/setup_wsl/Distribution.kt#L61-L71
with this argument for productId: https://github.com/Vampire/setup-wsl/blob/master/src/main/kotlin/net/kautler/github/action/setup_wsl/Distribution.kt#L438

And locally for example using HTTPie it works perfetly fine.

@Vampire
Copy link
Owner

Vampire commented Nov 13, 2023

And also using HTTPie from GitHub action machine from inside a Debian WSL distribution works fine.
And also calling that code in the action locally works fine.
It just fails when doing it in the real situation. :-/

@ljharb
Copy link
Author

ljharb commented Nov 13, 2023

Maybe they blocked some traffic that happens to target GitHub Actions?

@Vampire
Copy link
Owner

Vampire commented Nov 13, 2023

Maybe, but then why does it work from within a WSL distribution on the GHA runner?
Should probably be the same outgoing ip.

@craigloewen-msft
Copy link

From the link I saw your code is querying against the Store. You can also view the WSL distros with links to the appx files here on the WSL repo: https://github.com/microsoft/WSL/blob/master/distributions/DistributionInfo.json

@Vampire
Copy link
Owner

Vampire commented Nov 13, 2023

For most distros I use the short-links listed at https://learn.microsoft.com/en-us/windows/wsl/install-manual#downloading-distributions.
Only for those where not shortlink exists or existed when I added them, I request the link from the store.
In the course of this, I now use shortlinks for all but Alpine.
But for Alpine there is still no short-link and it is also not listed on the page you showed.
But thanks for the link anyway.

@Vampire
Copy link
Owner

Vampire commented Nov 14, 2023

I really have a hard time getting it.
I'm logged in to the running GitHub agent.
I have a Debian WSL distribution installed.
On Windows itself there is Python 3.9.13.
In the WSL Debian there is Python 3.9.2.
On both Pythons I have HTTPie 3.2.2 installed.
https://www.whois-my-ip.com/api/v1/ip returns the same for both.
But the very same HTTPie call for both http -fp HBhm POST https://store.rg-adguard.net/api/GetFiles type=ProductId url=9p804crf0395 works from WSL but fails from Windows.
The headers and body sent for both is eactly the same.
grml

@Vampire
Copy link
Owner

Vampire commented Nov 14, 2023

And also using https://echo.free.beeceptor.com instead of https://store.rg-adguard.net/api/GetFiles echoes back the exact same values, except for the date.

@Vampire
Copy link
Owner

Vampire commented Nov 14, 2023

I started a discussion at actions/runner-images#8791, maybe there someone has some idea. :-/

@Vampire
Copy link
Owner

Vampire commented Nov 14, 2023

I at least made a new release that fixes it for kali-linux and openSUSE-Leap-15.2 as they now have a perm-link too. But Alpine stays broken for the meantime. :-(

EliahKagan added a commit to EliahKagan/GitPython that referenced this issue Nov 24, 2023
This undoes "Temporarily don't install WSL system to test xfail"
(dabd2fb). It keeps Debian as the distribution. (Although the Debian
WSL system installs pretty fast already, it may still make sense to
try switching to Alpine in the future. But that might need to wait
until Vampire/setup-wsl#50 is fixed.)

This also removes most of the commands in the WSL debugging step,
since the related machinery in test_index.py (_WinBashStatus) seems
to be in okay shape, condenses the smaller number of commands that
are retained there, and makes much less extensive reduction in the
general version and platform information commands as well. This is
to make workflow output easier to read, understand, and navigate.
EliahKagan added a commit to EliahKagan/GitPython that referenced this issue Nov 24, 2023
This undoes "Temporarily don't install WSL system to test xfail"
(dabd2fb). It keeps Debian as the distribution. (Although the Debian
WSL system installs pretty fast already, it may still make sense to
try switching to Alpine in the future. But that might need to wait
until Vampire/setup-wsl#50 is fixed.)

This also removes most of the commands in the WSL debugging step,
since the related machinery in test_index.py (_WinBashStatus) seems
to be in okay shape, condenses the smaller number of commands that
are retained there, and makes much less extensive reduction in the
general version and platform information commands as well. This is
to make workflow output easier to read, understand, and navigate.
EliahKagan added a commit to EliahKagan/GitPython that referenced this issue Nov 24, 2023
This undoes "Temporarily don't install WSL system to test xfail"
(dabd2fb). It keeps Debian as the distribution. (Although the Debian
WSL system installs pretty fast already, it may still make sense to
try switching to Alpine in the future. But that might need to wait
until Vampire/setup-wsl#50 is fixed.)

This also removes most of the commands in the WSL debugging step,
since the related machinery in test_index.py (_WinBashStatus) seems
to be in okay shape, condenses the smaller number of commands that
are retained there, and makes much less extensive reduction in the
general version and platform information commands as well. This is
to make workflow output easier to read, understand, and navigate.
EliahKagan added a commit to EliahKagan/GitPython that referenced this issue Nov 25, 2023
This undoes "Temporarily don't install WSL system to test xfail"
(dabd2fb). It keeps Debian as the distribution. (Although the Debian
WSL system installs pretty fast already, it may still make sense to
try switching to Alpine in the future. But that might need to wait
until Vampire/setup-wsl#50 is fixed.)

This also removes most of the commands in the WSL debugging step,
since the related machinery in test_index.py (_WinBashStatus) seems
to be in okay shape, condenses the smaller number of commands that
are retained there, and makes much less extensive reduction in the
general version and platform information commands as well. This is
to make workflow output easier to read, understand, and navigate.
EliahKagan added a commit to EliahKagan/GitPython that referenced this issue Nov 25, 2023
This undoes "Temporarily don't install WSL system to test xfail"
(dabd2fb). It keeps Debian as the distribution. (Although the Debian
WSL system installs pretty fast already, it may still make sense to
try switching to Alpine in the future. But that might need to wait
until Vampire/setup-wsl#50 is fixed.)

This also removes most of the commands in the WSL debugging step,
since the related machinery in test_index.py (_WinBashStatus) seems
to be in okay shape, condenses the smaller number of commands that
are retained there, and makes much less extensive reduction in the
general version and platform information commands as well. This is
to make workflow output easier to read, understand, and navigate.
EliahKagan added a commit to EliahKagan/GitPython that referenced this issue Nov 25, 2023
This undoes "Temporarily don't install WSL system to test xfail"
(cabb572). It keeps Debian as the distribution. (Although the Debian
WSL system installs pretty fast already, it may still make sense to
try switching to Alpine in the future. But that might need to wait
until Vampire/setup-wsl#50 is fixed.)

This also removes most of the commands in the WSL debugging step,
since the related machinery in test_index.py (_WinBashStatus) seems
to be in okay shape, condenses the smaller number of commands that
are retained there, and makes much less extensive reduction in the
general version and platform information commands as well. This is
to make workflow output easier to read, understand, and navigate.
@Vampire Vampire added this to the Next Version milestone May 26, 2024
@Vampire Vampire closed this as completed May 27, 2024
EliahKagan added a commit to EliahKagan/GitPython that referenced this issue Jul 24, 2024
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.
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

No branches or pull requests

3 participants