-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Redirects without location are broken due to current version of go #2474
Comments
When can we expect a new image with go 1.19? Just hit this nasty bug in our tests |
k6 v0.41.0, the next official release that will be published around the end of October, will most likely use Go 1.19, unless we find some issue in the meantime. We will probably update the CI test and build files, and the Dockerfile soon and once that PR is merged, you should be able to use the official |
sorry if I misunderstood, but |
Yes, sorry for the confusion. The current CI and Dockerfile still use 1.18: Line 1 in b5bbf7e
k6/.github/workflows/build.yml Line 29 in b5bbf7e
Line 80 in b5bbf7e
We need to update these before the |
This bug is pretty wild, because locally our k6 0.40 was working correctly, both on linux and mac, but scripts started failing when running in a container. 3 people wasted a day together trying to find bug in our helm, dockerfile or handing of __ENV in k6 code... |
@agilob how did you install k6 build with 1.19.1 locally? I am pretty sure we should have build everything with 1.18 instead of 1.19 🤔 |
On archlinux it will be compiled from source and use latest version of go https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=k6 on max installed using brew:
|
https://formulae.brew.sh/formula/k6#default brew "depends on go 1.19.1" |
I've opened #2699 for the brew recipe. The arch aur package is not under our control but they should probably download the prebuild binary instead. As I have feeling requesting a particular go version in it will be a bit more involved then in brew, but I really don't know much about AUR 🤷 |
there is one that downloads bin, but it's out of date |
Summary:
Location
header isn't required for any redirect (3xx
), this was previously not correctly supported in go for 301-303 statuses, for which it was a requirement.This has been fixed in the current gotip(possibly to be released in 1.19).
K6 did previously have a test for this that has been removed.
But this is still broken on all currently released version of go (up to 1.18).
Suggested fix:
Given that this is behavior from the stdlib fixing it seems impossible without forking it so - we are unlikely to fix it. We will just wait for go version with the fix to be released and use that.
So this issue mostly exist to document the fact that currently k6 isn't compliant with the RFC and will likely be closed when a version of k6 is released with a go version that fixes it.
Other "fixes:
As discussed in #2472 we could keep the broken behavior for a time even with a version of go that fixes it. This has been mostly been abandoned as an idea, but is linked for reference.
The text was updated successfully, but these errors were encountered: