Disable artifacts default download location?

Hi,

I have an Artifacts.toml with the following vanilla tarball artifact:

[artifactX]
git-tree-sha1 = <generated through create_artifact(d -> path_to_manually_downloaded_tarball, artifact_toml) >
lazy = true

    [[artifactX.download]]
    url = "https://somewhere/some.tar.gz "
    sha256 = <generated by just copy-pasting from the error message when trying to load the artifact when there is just gibberish here>

It seems to work as it should except that when downloading the artifact I always first get an error message which indicates that there was an attempt to download it from pkg.julialang.org before it attempts to download from the specified location:

julia> artifact"artifactX"
Downloading artifact: artifactX
Exception calling "DownloadFile" with "2" argument(s): "The remote server returned an error: (404) Not Found."
At line:12 char:1
+ $webclient.DownloadFile("https://pkg.julialang.org/artifact/4b825dc64 ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
    + FullyQualifiedErrorId : WebException
Downloading artifact: artifactX

julia> # Second attempt is successful

Is there a way to disable this download location? I don’t think I’m allowed to publish the file externally.

1 Like

It should fail silently so not sure why that is not happening here. Perhaps open an issue at Pkg.jl?

2 Likes

Thanks. Will do!

1 Like

FYI, if you publish the package and this URL is public the artifact will be cached by pkg.julialang.org.

1 Like

Good to know. I will publish it in a local/internal registry and the URL is not public. Should not be any issues, right?