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

Artifact hash errors on nightly 64-bit #3212

Closed
KristofferC opened this issue Sep 30, 2022 · 6 comments · Fixed by #3235
Closed

Artifact hash errors on nightly 64-bit #3212

KristofferC opened this issue Sep 30, 2022 · 6 comments · Fixed by #3235
Assignees
Labels
artifacts CI continuous integration

Comments

@KristofferC
Copy link
Member

https://github.com/JuliaLang/Pkg.jl/actions/runs/3157873266/jobs/5139255214

Artifacts.toml Utilities: Test Failed at /home/runner/work/Pkg.jl/Pkg.jl/test/artifacts.jl:237
  Expression: artifact_hash("foo_txt", artifacts_toml) == hash2
   Evaluated: SHA1("5679c650921bf0f891224295dd95572a5e9db8da") == SHA1("09795a47b3e5d3bcc4b44beace0072e1c3eb8aab")

Not sure what changed.

@KristofferC KristofferC added CI continuous integration artifacts labels Sep 30, 2022
@DilumAluthge
Copy link
Member

On Julia master Buildkite, Pkg tests are passing on x86_64-linux-gnu. So this could actually be a bug in the PR.

@KristofferC
Copy link
Member Author

Also fails on #3178 which I just updated.

@DilumAluthge
Copy link
Member

Interesting. They're still passing on Buildkite... what's different between Buildkite and GitHub Actions? The hardware, maybe?

@KristofferC
Copy link
Member Author

Tests passed on #3205 now... Something intermittent with GitHub serving bad stuff maybe..?

@vtjnash
Copy link
Member

vtjnash commented Oct 21, 2022

We got a SHA failure in rr https://buildkite.com/julialang/julia-master/builds/17283#0183faf8-d50b-41b7-bffb-10f237f7b6c0. Not sure how useful it is though

@gbaraldi
Copy link
Member

I'm able to reproduce this locally on x86 linux. I believe we might have a data race in this test.

using Pkg.Artifacts
using Test
using TOML
using Pkg
path = mktempdir()
function torture()
    while true
        hash = create_artifact() do path
        open(joinpath(path, "foo.txt"), "w") do io
            print(io, "hello, world!")
        end
    end
    artifacts_toml = joinpath(path, "Artifacts.toml")
    bind_artifact!(artifacts_toml, "foo_txt", hash;  force=true)
    hash2 = create_artifact() do path
        open(joinpath(path, "foo.txt"), "w") do io
            print(io, "goodbye, world!")
        end
    end
    @test_throws ErrorException bind_artifact!(artifacts_toml, "foo_txt", hash2)
    # sleep(0.1)
    @test artifact_hash("foo_txt", artifacts_toml) == hash
    # sleep(0.1)
    bind_artifact!(artifacts_toml, "foo_txt", hash2; force=true)
    @test artifact_hash("foo_txt", artifacts_toml) == hash2
end
end

torture()

Works for me, those sleeps make if fail less often and incresing them enough makes it pass.

staticfloat added a commit that referenced this issue Oct 24, 2022
We need to clear this cache when modifying the TOML file.  This should fix #3212.

It might be nice to expose a `Base.drop_parsed_toml(path::String)` API so that I don't have to manually reach into `TOML_CACHE.d` here like this.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
artifacts CI continuous integration
Projects
None yet
5 participants