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
ASP solver does not handle missing packages during --reuse
#28259
Labels
Comments
3 tasks
Reproduced by creating a repo with just myrepo$ tree
.
├── packages
│ └── zlib
│ ├── configure-cc.patch
│ ├── package.py
│ └── w_patch.patch
└── repo.yaml
2 directories, 4 files then: $ spack repo add .
==> Added repo with namespace 'myrepo'.
$ spack install zlib
[ ... ]
$ spack repo remove .
$ spack solve -I --reuse zlib
==> [2022-04-15-15:49:22.931162] Imported solve from built-in commands
==> [2022-04-15-15:49:22.932430] Imported solve from built-in commands
==> [2022-04-15-15:49:22.933327] Reading config file /home/culpo/PycharmProjects/spack/etc/spack/defaults/bootstrap.yaml
==> [2022-04-15-15:49:22.942795] Reading config file /home/culpo/PycharmProjects/spack/etc/spack/defaults/config.yaml
==> [2022-04-15-15:49:22.960173] Reading config file /home/culpo/PycharmProjects/spack/etc/spack/defaults/config.yaml
==> [2022-04-15-15:49:22.973288] DATABASE LOCK TIMEOUT: 3s
==> [2022-04-15-15:49:22.973331] PACKAGE LOCK TIMEOUT: No timeout
==> [2022-04-15-15:49:22.973628] Reading config file /home/culpo/PycharmProjects/spack/etc/spack/defaults/bootstrap.yaml
==> [2022-04-15-15:49:22.981017] DATABASE LOCK TIMEOUT: 3s
==> [2022-04-15-15:49:22.981057] PACKAGE LOCK TIMEOUT: No timeout
==> [2022-04-15-15:49:22.981105] [BOOTSTRAP CONFIG SCOPE] name=_builtin
==> [2022-04-15-15:49:22.981383] [BOOTSTRAP CONFIG SCOPE] name=defaults, path=/home/culpo/PycharmProjects/spack/etc/spack/defaults
==> [2022-04-15-15:49:22.981413] [BOOTSTRAP CONFIG SCOPE] name=defaults/linux, path=/home/culpo/PycharmProjects/spack/etc/spack/defaults/linux
==> [2022-04-15-15:49:22.981436] [BOOTSTRAP CONFIG SCOPE] name=bootstrap, path=/home/culpo/.spack/bootstrap/config
==> [2022-04-15-15:49:22.981457] [BOOTSTRAP CONFIG SCOPE] name=bootstrap/linux, path=/home/culpo/.spack/bootstrap/config/linux
==> [2022-04-15-15:49:22.981662] Reading config file /home/culpo/.spack/bootstrap/config/linux/compilers.yaml
==> [2022-04-15-15:49:23.002132] [BOOTSTRAP ROOT SPEC] clingo-bootstrap@spack+python %gcc target=x86_64
==> [2022-04-15-15:49:23.002191] [BOOTSTRAP MODULE clingo] Try importing from Python
==> [2022-04-15-15:49:23.002360] Reading config file /home/culpo/PycharmProjects/spack/etc/spack/defaults/bootstrap.yaml
==> [2022-04-15-15:49:23.114100] Reading config file /home/culpo/PycharmProjects/spack/etc/spack/defaults/config.yaml
==> [2022-04-15-15:49:23.195629] [BOOTSTRAP MODULE clingo] The installed spec "clingo-bootstrap@spack+python %gcc target=x86_64 ^python@3.8 /shqedxgvjnhiwdcdrvjhbd73jaevv7wt" provides the "clingo" Python module
==> [2022-04-15-15:49:23.195884] Reading config file /home/culpo/PycharmProjects/spack/etc/spack/defaults/concretizer.yaml
==> [2022-04-15-15:49:23.197623] Reading config file /home/culpo/PycharmProjects/spack/etc/spack/defaults/repos.yaml
==> [2022-04-15-15:49:23.198864] Reading config file /home/culpo/.spack/repos.yaml
==> [2022-04-15-15:49:23.228975] Reading config file /home/culpo/.spack/linux/compilers.yaml
==> [2022-04-15-15:49:23.236692] Reading config file /home/culpo/PycharmProjects/spack/etc/spack/defaults/config.yaml
==> [2022-04-15-15:49:23.249716] Reading config file /home/culpo/PycharmProjects/spack/etc/spack/defaults/packages.yaml
==> [2022-04-15-15:49:23.271535] Reading config file /home/culpo/PycharmProjects/spack/etc/spack/defaults/mirrors.yaml
==> [2022-04-15-15:49:24.034166] Fetching index from https://mirror.spack.io/build_cache/index.json
==> [2022-04-15-15:49:24.913261] UnknownNamespaceError: Unknown namespace: myrepo
==> [2022-04-15-15:49:24.913312] Error: Unknown namespace: myrepo
Traceback (most recent call last):
File "/home/culpo/PycharmProjects/spack/lib/spack/spack/main.py", line 915, in main
return _main(argv)
File "/home/culpo/PycharmProjects/spack/lib/spack/spack/main.py", line 870, in _main
return finish_parse_and_run(parser, cmd_name, env_format_error)
File "/home/culpo/PycharmProjects/spack/lib/spack/spack/main.py", line 898, in finish_parse_and_run
return _invoke_command(command, parser, args, unknown)
File "/home/culpo/PycharmProjects/spack/lib/spack/spack/main.py", line 550, in _invoke_command
return_val = command(parser, args)
File "/home/culpo/PycharmProjects/spack/lib/spack/spack/cmd/solve.py", line 111, in solve
result = solver.solve(
File "/home/culpo/PycharmProjects/spack/lib/spack/spack/solver/asp.py", line 2141, in solve
return self.driver.solve(
File "/home/culpo/PycharmProjects/spack/lib/spack/spack/solver/asp.py", line 641, in solve
answers = builder.build_specs(tuples)
File "/home/culpo/PycharmProjects/spack/lib/spack/spack/solver/asp.py", line 2038, in build_specs
repo = spack.repo.path.repo_for_pkg(spec)
File "/home/culpo/PycharmProjects/spack/lib/spack/spack/repo.py", line 933, in repo_for_pkg
raise UnknownNamespaceError(namespace)
spack.repo.UnknownNamespaceError: Unknown namespace: myrepo
|
alalazo
added a commit
to alalazo/spack
that referenced
this issue
Apr 15, 2022
fixes spack#28259 This commit discard specs from unknown namespaces from the ones that can be "reused" during concretization. Previously Spack would just error out when encountering them.
3 tasks
alalazo
added a commit
to alalazo/spack
that referenced
this issue
Apr 26, 2022
fixes spack#28259 This commit discard specs from unknown namespaces from the ones that can be "reused" during concretization. Previously Spack would just error out when encountering them.
becker33
pushed a commit
that referenced
this issue
Apr 27, 2022
) fixes #28259 This commit discard specs from unknown namespaces from the ones that can be "reused" during concretization. Previously Spack would just error out when encountering them.
alalazo
added a commit
to alalazo/spack
that referenced
this issue
Apr 28, 2022
This is an add-on to spack#28259 that cover for the case of a single package.py being removed from a repository, rather than an entire custom repository being removed.
becker33
pushed a commit
that referenced
this issue
Apr 28, 2022
* ASP-based solver: discard unknown packages from reuse This is an add-on to #28259 that cover for the case of a single package.py being removed from a repository, rather than an entire custom repository being removed. * Add unit test
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Steps to reproduce
The clingo concretizer fails when attempting to
--reuse
existing builds when a package that at exists in the builtin package repo was previously installed using a custom fork of the package (with site-specific modifications) located in a higher-priority local package repo has since been removed from the local repo so that a newer builtin-repo version of the package is preferred for future builds.Ideally, a
spack.repo.UnknownPackageError
would mark the previous build as ineligible for re-use and concertize specs using only packages still existing in available repos, even under--reuse
.While it's certainly possible to restore the missing package to the local repo as a direct clone of the upstream package, my hope is that when upstream packages are updated to handle issues that previously required site-specific hacks applied through a fork of the package existing in a private repo, I would be able to drop my private fork of the package.
Error message
spack -vd --stacktrace concretize --reuse -f
Information on your system
$ spack debug report
General information
spack debug report
and reported the version of Spack/Python/PlatformThe text was updated successfully, but these errors were encountered: