-
Notifications
You must be signed in to change notification settings - Fork 0
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
spack
silently failing to git fetch
certain package repositories
#2
Comments
TODO: Double check if the repository can be stale when using |
Seems like it can, @harshula! This is the problem that is coming up with the Ocean Team. |
This issue has been mentioned on ACCESS Hive Community Forum. There might be relevant details there: https://forum.access-hive.org.au/t/ocean-team-workshop-12-15th-november-2024/3857/14 |
It happened again with
For one of the PRs, it was like it didn't pick up the |
Linking an issue from upstream: spack#48023 |
Current infrastructure workaround will be to fetch all repos in |
Essentially,
spack
sgit fetch
operation is silently failing duringspack install
for certain package repositories and not updating the local refs, leading tospack.VersionLookupError
s.For a specific example, see https://github.com/ACCESS-NRI/ACCESS-OM2/actions/runs/10104028532/job/27942359486#step:8:429 in which it states:
When it clearly is on the remote.
Background
Originally, this issue reared it's ugly head when I had implemented a 'Rolling Tag' logic for Prereleases. This would add and force push (NOTE: bad practice!) the tag in
spack.specs[0]
(for example, the2024.08.0
inaccess-om2@git.2024.08.0
) for each commit in a pull request. This was because the root SBD in thespack.yaml
(such asaccess-om2
) would expect the tag in the pull request to exist during thespack install
. This led to the following scenario, whose end state is eerily similar to the one we have now:2024.08.0
toHEAD
of pull requestspack
willgit fetch --tags
on the deployment repo and successfully pull the remote2024.08.0
.2024.08.0
to the newHEAD
(NOTE: still bad practice!)spack
will try togit fetch --tags
on the deployment repo and silently fail, leading eventually to aspack.VersionLookupError
.I later removed this moving tag functionality as it was the cause of this iteration of silent failures.
It was debugged by modifying
spack/lib/spack/spack/version/git_ref_lookup.py
Lines 145 to 149 in 21da7d7
output
anderror
tostr
rather thanos.devnull
(why are they piping output and error to devnull?), which allowed me to see the git output which was failing to update the local tags. Unfortunately this irrevocably broke Prerelease and I had to remake the Prerelease environment, so don't simply redirect the output tostr
as it polluted a bunch of metadata inspack
.This fixed the issue so I thought I was done with it...
The Current Issue
Linking ACCESS-NRI/ACCESS-OM2#76 - A lot of the later failing runs are a similar issue where we have a
spack.VersionLookupError
where the ref can't be found locally when it is definitely on the remote. I suspect it's a similar issue to the above where there is an issue runninggit fetch
, but I don't know what. Doing the workaround below solved it, and verified that the branches were not being updated by spack:Things TODO
spack.VersionLookupError
, copy the entire instance to a local location and see if we can find out what is preventing it fromgit fetch
ing by either interrogating thegit_repos
folder, or redirectingspack
s own git operations to a file.spack
developers that this is happening...Workaround
The current workaround is to do the following:
The text was updated successfully, but these errors were encountered: