JuliaLang / julia

The Julia Programming Language
https://julialang.org/
MIT License
45.72k stars 5.48k forks source link

CI: Failure in revise test #56266

Open jishnub opened 2 weeks ago

jishnub commented 2 weeks ago

In https://buildkite.com/julialang/julia-master/builds/41308#0192ae1c-c55b-4384-877e-72b709138977, the Revise test errors with

Starting test Base & stdlib file paths
7-element Vector{Tuple{String, String}}:
 ("/cache/build/builder-amdci4-2/julialang/julia-master/base/./build_h.jl", "/cache/build/builder-amdci4-2/julialang/julia-master/base/build_h.jl")
 ("/cache/build/builder-amdci4-2/julialang/julia-master/base/./version_git.jl", "/cache/build/builder-amdci4-2/julialang/julia-master/base/version_git.jl")
 ("/cache/build/builder-amdci4-2/julialang/julia-master/base/./pcre_h.jl", "/cache/build/builder-amdci4-2/julialang/julia-master/base/pcre_h.jl")
 ("/cache/build/builder-amdci4-2/julialang/julia-master/base/./errno_h.jl", "/cache/build/builder-amdci4-2/julialang/julia-master/base/errno_h.jl")
 ("/cache/build/builder-amdci4-2/julialang/julia-master/base/./uv_constants.jl", "/cache/build/builder-amdci4-2/julialang/julia-master/base/uv_constants.jl")
 ("/cache/build/builder-amdci4-2/julialang/julia-master/base/./file_constants.jl", "/cache/build/builder-amdci4-2/julialang/julia-master/base/file_constants.jl")
 ("/cache/build/builder-amdci4-2/julialang/julia-master/base/features_h.jl", "/cache/build/builder-amdci4-2/julialang/julia-master/base/features_h.jl")
Base & stdlib file paths: Test Failed at /root/.julia/packages/Revise/8jqWV/test/runtests.jl:740
  Expression: isempty(failedfiles)
   Evaluated: isempty([("/cache/build/builder-amdci4-2/julialang/julia-master/base/./build_h.jl", "/cache/build/builder-amdci4-2/julialang/julia-master/base/build_h.jl"), ("/cache/build/builder-amdci4-2/julialang/julia-master/base/./version_git.jl", "/cache/build/builder-amdci4-2/julialang/julia-master/base/version_git.jl"), ("/cache/build/builder-amdci4-2/julialang/julia-master/base/./pcre_h.jl", "/cache/build/builder-amdci4-2/julialang/julia-master/base/pcre_h.jl"), ("/cache/build/builder-amdci4-2/julialang/julia-master/base/./errno_h.jl", "/cache/build/builder-amdci4-2/julialang/julia-master/base/errno_h.jl"), ("/cache/build/builder-amdci4-2/julialang/julia-master/base/./uv_constants.jl", "/cache/build/builder-amdci4-2/julialang/julia-master/base/uv_constants.jl"), ("/cache/build/builder-amdci4-2/julialang/julia-master/base/./file_constants.jl", "/cache/build/builder-amdci4-2/julialang/julia-master/base/file_constants.jl"), ("/cache/build/builder-amdci4-2/julialang/julia-master/base/features_h.jl", "/cache/build/builder-amdci4-2/julialang/julia-master/base/features_h.jl")])
Stacktrace:
 [1] top-level scope
   @ ~/.julia/packages/Revise/8jqWV/test/runtests.jl:78
 [2] macro expansion
   @ /cache/build/builder-amdci4-2/julialang/julia-master/usr/share/julia/stdlib/v1.12/Test/src/Test.jl:1707 [inlined]
 [3] macro expansion
   @ ~/.julia/packages/Revise/8jqWV/test/runtests.jl:725 [inlined]
 [4] macro expansion
   @ /cache/build/builder-amdci4-2/julialang/julia-master/usr/share/julia/stdlib/v1.12/Test/src/Test.jl:1707 [inlined]
 [5] macro expansion
   @ ~/.julia/packages/Revise/8jqWV/test/runtests.jl:740 [inlined]
 [6] macro expansion
   @ /cache/build/builder-amdci4-2/julialang/julia-master/usr/share/julia/stdlib/v1.12/Test/src/Test.jl:679 [inlined]
[...]
ERROR: LoadError: Some tests did not pass: 728 passed, 1 failed, 0 errored, 2 broken.
in expression starting at /root/.julia/packages/Revise/8jqWV/test/runtests.jl:77
ERROR: Package Revise errored during testing
Stacktrace:
  [1] pkgerror(msg::String)
    @ Pkg.Types /cache/build/builder-amdci4-2/julialang/julia-master/usr/share/julia/stdlib/v1.12/Pkg/src/Types.jl:68
  [2] test(ctx::Pkg.Types.Context, pkgs::Vector{Pkg.Types.PackageSpec}; coverage::Bool, julia_args::Cmd, test_args::Cmd, test_fn::Nothing, force_latest_compatible_version::Bool, allow_earlier_backwards_compatible_versions::Bool, allow_reresolve::Bool)
    @ Pkg.Operations /cache/build/builder-amdci4-2/julialang/julia-master/usr/share/julia/stdlib/v1.12/Pkg/src/Operations.jl:2356
  [3] test
    @ /cache/build/builder-amdci4-2/julialang/julia-master/usr/share/julia/stdlib/v1.12/Pkg/src/Operations.jl:2211 [inlined]
  [4] test(ctx::Pkg.Types.Context, pkgs::Vector{Pkg.Types.PackageSpec}; coverage::Bool, test_fn::Nothing, julia_args::Cmd, test_args::Cmd, force_latest_compatible_version::Bool, allow_earlier_backwards_compatible_versions::Bool, allow_reresolve::Bool, kwargs::@Kwargs{io::IOContext{IO}})
    @ Pkg.API /cache/build/builder-amdci4-2/julialang/julia-master/usr/share/julia/stdlib/v1.12/Pkg/src/API.jl:475
  [5] test(pkgs::Vector{Pkg.Types.PackageSpec}; io::IOContext{IO}, kwargs::@Kwargs{})
    @ Pkg.API /cache/build/builder-amdci4-2/julialang/julia-master/usr/share/julia/stdlib/v1.12/Pkg/src/API.jl:159
  [6] test(pkgs::Vector{Pkg.Types.PackageSpec})
    @ Pkg.API /cache/build/builder-amdci4-2/julialang/julia-master/usr/share/julia/stdlib/v1.12/Pkg/src/API.jl:148
  [7] test
    @ /cache/build/builder-amdci4-2/julialang/julia-master/usr/share/julia/stdlib/v1.12/Pkg/src/API.jl:147 [inlined]
  [8] test(pkg::String)
    @ Pkg.API /cache/build/builder-amdci4-2/julialang/julia-master/usr/share/julia/stdlib/v1.12/Pkg/src/API.jl:146
  [9] top-level scope
    @ none:1
 [10] eval
    @ ./boot.jl:459 [inlined]
 [11] exec_options(opts::Base.JLOptions)
    @ Base ./client.jl:295
 [12] _start()
    @ Base ./client.jl:558

The failing test is https://github.com/timholy/Revise.jl/blob/294d3b9f367f9a0585f95d0c5294e59d9571421f/test/runtests.jl#L740

This was discused on slack earlier when the error had happened on a different PR. Excerpts from the conversation:

Mosè Giordano
  Tuesday at 3:53 PM
might be something on the new machine

[3:54](https://julialang.slack.com/archives/C02C4RYM66N/p1728987893392259?thread_ts=1728984518.945319&cid=C02C4RYM66N)
basically the test isfile("/cache/build/builder-demeter6-0/julialang/julia-master/base/build_h.jl") is failing for a bunch of files
[3:55](https://julialang.slack.com/archives/C02C4RYM66N/p1728987921313769?thread_ts=1728984518.945319&cid=C02C4RYM66N)
but isfile checks whether the file is a regular file, could fail for a symlink for example
[3:55](https://julialang.slack.com/archives/C02C4RYM66N/p1728987946083759?thread_ts=1728984518.945319&cid=C02C4RYM66N)
[@fredrikekre](https://julialang.slack.com/team/U67SCG4HG)
 is it possible that path on demeter6 is a symlink?  if so, the test is bad
[3:56](https://julialang.slack.com/archives/C02C4RYM66N/p1728987980933479?thread_ts=1728984518.945319&cid=C02C4RYM66N)
if it was meant to check if the file exists on disk it should check ispath, not isfile, or at least isfile(realpath(...))

Fredrik Ekre
  Tuesday at 4:00 PM
Maybe but I don't think the setup on this machine is any different from the rest. Are theste tests passing on e.g. amdci?

Mosè Giordano
  [Tuesday at 4:02 PM](https://julialang.slack.com/archives/C02C4RYM66N/p1728988326766549?thread_ts=1728984518.945319&cid=C02C4RYM66N)
it is on latest commit on master: https://buildkite.com/julialang/julia-master/builds/41001

Fredrik Ekre
  Tuesday at 4:02 PM
That also ran on a demeter agent though

Mosè Giordano
  [Tuesday at 4:03 PM](https://julialang.slack.com/archives/C02C4RYM66N/p1728988407712409?thread_ts=1728984518.945319&cid=C02C4RYM66N)
right, which would rule out a different setup :grimacing:

Mosè Giordano
  [Tuesday at 4:12 PM](https://julialang.slack.com/archives/C02C4RYM66N/p1728988947149799?thread_ts=1728984518.945319&cid=C02C4RYM66N)
test passed on builder-demeter6.2, it had failed on builder-demeter-6.0
vtjnash commented 2 weeks ago

should check ispath, not isfile, or at least isfile(realpath(...))

That'd be more wrong for other reasons. However, isfile is queried by the filemode of stat not lstat, so it is already correct here.

julia> isfile("julia")
true

julia> islink("julia")
true

julia> isfile(lstat("julia"))
false