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

[release-1.5] Backport bugfixes to release-1.5 branch #175

Merged
merged 26 commits into from
Mar 3, 2022

Conversation

ericphanson
Copy link
Contributor

@ericphanson ericphanson commented Jan 26, 2022

Looking at the commits on master that are not on release-1.5, they all appear to be bugfixes. So I did

❯ git merge-base master release-1.5                                                                 
5d00bddf2db81b0ea62990b4d81fe5bf51c38b10

❯ git cherry-pick -x 5d00bddf2db81b0ea62990b4d81fe5bf51c38b10..c445f456aeb8e481620102ce40a6be618a8dcc3f

where I got the latter commit from

❯ git log # on `master`
commit 43899e71eed709866f96dd624f1c369a1c8e26a3 (HEAD -> master, tag: v1.6.0, origin/master, origin/HEAD)
Author: Stefan Karpinski <stefan@karpinski.org>
Date:   Wed Dec 15 09:41:37 2021 -0500

    bump version to v1.6.0

commit c445f456aeb8e481620102ce40a6be618a8dcc3f
Merge: ab628ab 4e0408a
Author: Stefan Karpinski <stefan@karpinski.org>
Date:   Tue Dec 14 22:11:28 2021 -0500

    Merge pull request #170 from JuliaLang/tan/chunkedtransfer
    
    debug callbacks and end-to-end tests for #167

and then a bunch of git cherry-pick --skips and got here, and then added a commit bumping the version.

@DilumAluthge
Copy link
Member

@StefanKarpinski Does this sound good to you? If so, I'll merge the PR, register a new release, and bump the stdlib version on Julia 1.7.

@DilumAluthge
Copy link
Member

@ericphanson Any chance you could regenerate this PR, but with git cherry-pick -x? I find that this makes it a lot easier to map the cherry-picks back to the original commits?

DilumAluthge and others added 25 commits January 26, 2022 21:13
(cherry picked from commit 3870614)
ChainRulesCore defines `==(a, b::AbstractThunk)` and its converse,
and this invalidates a couple of poorly-typed Symbol checks.
This more "SSA-like" way of writing the code is easier to infer.

(cherry picked from commit 25f7af3)
…liaLang#140)

Since JuliaLang#114, we only turn
off peer verification, not host verification when the `SSL_NO_VERIFY`
variables are set. This means that the last set of tests in the "SSL no
verify override" testset *should* fail for `wrong.host.badssl.com`. That
is not what I was seeing, however — the test was still passing — which I
found puzzling but just moved on with my life at the time. It turns out
that the test *does* fail if libcurl is build with OpenSSL. Since
whether the test passes or not for that host depends on how things are
built, this change simply skips the test (by popping the URL from the
set of tested URLS for that testset).

The tests above that which use the easy hook mechanism are fixed in a
different way: for those I made the hook disable both host and peer
verification, which should fix the tests for any bad host including when
the server sends the wrong host name.

(cherry picked from commit e22219f)
…#143)

Somewhat surprisingly, the type of this is not IOBuffer, but a related
type (Base.GenericIOBuffer{Base.CodeUnits{UInt8, String}}).

(cherry picked from commit 470b7f0)
This reverts commit c91876a.

(cherry picked from commit 69acc13)
(cherry picked from commit 62b497e)
(possible multithread race with this still needs to be fixed)

(cherry picked from commit 7f91b8a)
(cherry picked from commit d8c626b)
If no content length is set while uploading some contents, Curl defaults to use
chunked transfer encoding. In some cases we want to prevent that because the
server may not support chunked transfers.

With this change, the request method will also look at the headers while
determining the input size and if found call `set_upload_size` as usual. So to
switch off chunked transfers, one must also know and set the content length
header while invoking `download` or `request` methods.

(cherry picked from commit ab628ab)
These only add one callback so having them be plural is weird.

(cherry picked from commit 5bd0826)
This adds end-to-end tests for the changes introduced in JuliaLang#167.

Verbose mode is switched off for these tests, but switching it on would show that not setting content-length headers results in chunked transfer encoding while setting it prevents that. Both tests should pass.

(cherry picked from commit 911368d)
This combines the functionality from the previous two commits to not
only trigger both chunked and non-chunked uploads, but also test for
that difference by capturing and inspecting the debug events.

(cherry picked from commit 4e0408a)
@ericphanson
Copy link
Contributor Author

@ericphanson Any chance you could regenerate this PR, but with git cherry-pick -x?

Ok, done

@ericphanson
Copy link
Contributor Author

bump

1 similar comment
@ericphanson
Copy link
Contributor Author

bump

@DilumAluthge DilumAluthge merged commit b0f23d0 into JuliaLang:release-1.5 Mar 3, 2022
@ericphanson ericphanson deleted the release-1.5 branch March 3, 2022 01:05
@ericphanson
Copy link
Contributor Author

Thank you @DilumAluthge ! What’s the next step to get this into Julia 1.7.X?

@DilumAluthge
Copy link
Member

DilumAluthge commented Mar 3, 2022

  1. In the JuliaLang/Downloads.jl repository, go to the release-1.5 branch, and make a note of the latest commit on that branch. Let's call that value NEWCOMMIT.
  2. Clone the JuliaLang/julia repository, and cd into it.
  3. Check out the release-1.7 branch.
  4. Delete all directories matching deps/checksums/Downloads-*
  5. Open the stdlib/Downloads.version file. In that file:
    • Make sure that the DOWNLOADS_BRANCH = ... line says DOWNLOADS_BRANCH = release-1.5. If that's not what it says, change that line so it reads DOWNLOADS_BRANCH = release-1.5.
    • Look at the line that says DOWNLOADS_SHA1 = .... Make a note of that value. Let's call that value OLDCOMMIT.
    • Change the line that says DOWNLOADS_SHA1 = ... so that it now says line that says DOWNLOADS_SHA1 = NEWCOMMIT
  6. Run make -C stdlib. This will generate the new checksums.
  7. git add -A and git commit.
  8. git push, and open a new pull request, cc Stefan and me in the PR.

vtjnash pushed a commit to JuliaLang/julia that referenced this pull request Mar 3, 2022
To pull in the bugfixes backported to Downloads 1.5.3 in JuliaLang/Downloads.jl#175.
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

Successfully merging this pull request may close these issues.

10 participants