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

testing Downloads per mk request #163

Closed
wants to merge 13 commits into from
Closed

Conversation

ngam
Copy link
Contributor

@ngam ngam commented Dec 29, 2021

Co-authored-by: mkitti [email protected]

Checklist

  • Used a personal fork of the feedstock to propose changes
  • Bumped the build number (if the version is unchanged)
  • Reset the build number to 0 (if the version changed)
  • Re-rendered with the latest conda-smithy (Use the phrase @conda-forge-admin, please rerender in a comment in this PR for automated rerendering)
  • Ensured the license file is being packaged.

@conda-forge-linter
Copy link

Hi! This is the friendly automated conda-forge-linting service.

I just wanted to let you know that I linted all conda-recipes in your PR (recipe) and found it was in an excellent condition.

@ngam
Copy link
Contributor Author

ngam commented Dec 29, 2021

@conda-forge-admin, please rerender

@ngam ngam mentioned this pull request Dec 29, 2021
@github-actions
Copy link
Contributor

Hi! This is the friendly automated conda-forge-webservice.

I tried to rerender for you, but it looks like there was nothing to do.

This message was generated by GitHub actions workflow run https://github.com/conda-forge/julia-feedstock/actions/runs/1635119791.

@ngam
Copy link
Contributor Author

ngam commented Dec 29, 2021

Local testing based on v1.7.1 linux64:

3 failures / errors:

Test Failed at /home/ngam/.Mambaforge-Linux-x86_64/envs/cenv/share/julia/stdlib/v1.7/Downloads/test/runtests.jl:430
  Expression: resp isa Response
   Evaluated: Downloads.RequestError("https://wrong.host.badssl.com", 60, "SSL: no alternative certificate subject name matches target host name 'wrong.host.badssl.com'", Downloads.Response("https", "https://wrong.host.badssl.com/", 0, "", Pair{String, String}[])) isa Downloads.Response
Error During Test at /home/ngam/.Mambaforge-Linux-x86_64/envs/cenv/share/julia/stdlib/v1.7/Downloads/test/runtests.jl:431
  Test threw exception
  Expression: resp.status == 200
  type RequestError has no field status

Test Failed at /home/ngam/.Mambaforge-Linux-x86_64/envs/cenv/share/julia/stdlib/v1.7/Downloads/test/runtests.jl:438
  Expression: resp isa Response
   Evaluated: Downloads.RequestError("https://wrong.host.badssl.com", 60, "SSL: no alternative certificate subject name matches target host name 'wrong.host.badssl.com'", Downloads.Response("https", "https://wrong.host.badssl.com/", 0, "", Pair{String, String}[])) isa Downloads.Response
Error During Test at /home/ngam/.Mambaforge-Linux-x86_64/envs/cenv/share/julia/stdlib/v1.7/Downloads/test/runtests.jl:439
  Test threw exception
  Expression: resp.status == 200
  type RequestError has no field status
Test Failed at /home/ngam/.Mambaforge-Linux-x86_64/envs/cenv/share/julia/stdlib/v1.7/Downloads/test/runtests.jl:447
  Expression: resp isa Response
   Evaluated: Downloads.RequestError("https://wrong.host.badssl.com", 60, "SSL: no alternative certificate subject name matches target host name 'wrong.host.badssl.com'", Downloads.Response("https", "https://wrong.host.badssl.com/", 0, "", Pair{String, String}[])) isa Downloads.Response
Error During Test at /home/ngam/.Mambaforge-Linux-x86_64/envs/cenv/share/julia/stdlib/v1.7/Downloads/test/runtests.jl:448
  Test threw exception
  Expression: resp.status == 200
  type RequestError has no field status
Test Summary: | Pass  Fail  Error  Total
  Overall     |  213     3      3    219
    Downloads |  213     3      3    219
    FAILURE

ERROR: LoadError: Test run finished with errors
in expression starting at /home/ngam/.Mambaforge-Linux-x86_64/envs/cenv/share/julia/test/runtests.jl:93
ERROR: A test has failed. Please submit a bug report (https://github.com/JuliaLang/julia/issues)
including error messages above and the output of versioninfo():
Julia Version 1.7.1
Commit ac5cc99908* (2021-12-22 19:35 UTC)
Platform Info:
  OS: Linux (x86_64-conda-linux-gnu)
  CPU: Intel(R) Core(TM) i7-5600U CPU @ 2.60GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-12.0.1 (ORCJIT, broadwell)

@ngam
Copy link
Contributor Author

ngam commented Dec 29, 2021

406     save_env = get(ENV, "JULIA_SSL_NO_VERIFY_HOSTS", nothing)
407     delete!(ENV, "JULIA_SSL_NO_VERIFY_HOSTS")
408 
409     @testset "bad TLS" begin
410         urls = [
411             "https://wrong.host.badssl.com"
412             "https://untrusted-root.badssl.com"
413         ]
414         @testset "bad TLS is rejected" for url in urls
415             resp = request(url, throw=false)
416             @test resp isa RequestError
417             @test resp.code == Curl.CURLE_PEER_FAILED_VERIFICATION
418         end
419         @testset "easy hook work-around" begin
420             local url
421             easy_hook = (easy, info) -> begin
422                 Curl.set_ssl_verify(easy, false)
423                 @test info.url == url
424             end
425             # downloader-specific easy hook
426             downloader = Downloader()
427             downloader.easy_hook = easy_hook
428             for outer url in urls
429                 resp = request(url, throw=false, downloader=downloader)
430                 @test resp isa Response
431                 @test resp.status == 200
432             end
433             # default easy hook
434             Downloads.EASY_HOOK[] = easy_hook
435             Downloads.DOWNLOADER[] = nothing
436             for outer url in urls
437                 resp = request(url, throw=false)
438                 @test resp isa Response
439                 @test resp.status == 200
440             end
441             Downloads.DOWNLOADER[] = nothing
442             Downloads.EASY_HOOK[] = nothing
443         end
444         ENV["JULIA_SSL_NO_VERIFY_HOSTS"] = "**.badssl.com"
445         @testset "SSL no verify override" for url in urls
446             resp = request(url, throw=false)
447             @test resp isa Response
448             @test resp.status == 200
449         end
450         delete!(ENV, "JULIA_SSL_NO_VERIFY_HOSTS")
451     end

@ngam
Copy link
Contributor Author

ngam commented Dec 29, 2021

@conda-forge-admin, please rerender

@ngam
Copy link
Contributor Author

ngam commented Dec 29, 2021

@mkitti, I suspect this is a curl (or SSL) issue from reading upstream, hence trying to see use their curl to see if it resolves the issue. Otherwise, I have no idea what's going on...

@mkitti
Copy link
Contributor

mkitti commented Dec 29, 2021

See upstream JuliaLang/Downloads.jl#139

@mkitti
Copy link
Contributor

mkitti commented Dec 29, 2021

This is an upstream issue. I propose closing this. Merging #157. Create a new PR from master pulling JuliaLang/julia@f61eb87 . Retest Downloads.jl. Inform upstream via the issue above if the issue is resolved.

@ngam
Copy link
Contributor Author

ngam commented Dec 29, 2021

Okay, will do.

@ngam ngam closed this Dec 29, 2021
@ngam ngam deleted the test_downloads branch January 5, 2022 18:01
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.

3 participants