Skip to content

spack ci generate: SPACK_CHECKOUT_VERSION cannot be checked out #31952

@blue42u

Description

@blue42u

Steps to reproduce

/cc @scottwittenburg

Generating a CI pipeline for any environment (minimal example below) will include a SPACK_CHECKOUT_VERSION which cannot in fact be checked out:

$ cat x/spack.yaml 
spack:
  view: false
  specs: [zlib]
  mirrors: {mirror: 'https://binaries.spack.io/develop'}
  gitlab-ci:
    mappings:
    - match: ['@:']
      runner-attributes:
        image: foobar
        tags: [anything]
$ ./bin/spack -e x ci generate
==> Starting concretization
==> Environment concretized in 12.56 seconds.
==> Stages for phase "specs"
==>   Staging summary ([x] means a job needs rebuilding):
==>     stage 0 (1 jobs):
==>       [x] zlib/nldfd6a -> [email protected]%[email protected]  arch=linux-rhel8-zen2
==> Warning: Unable to populate buildgroup without CDash credentials
$ ./bin/spack python -c 'import ruamel.yaml, sys; print(ruamel.yaml.load(sys.stdin)["variables"]["SPACK_CHECKOUT_VERSION"])' < .gitlab-ci.yml
0.19.0.dev0 (fefab26f01640c476d21ab444db46647f6edc121)
$ git checkout '0.19.0.dev0 (fefab26f01640c476d21ab444db46647f6edc121)'
error: pathspec '0.19.0.dev0 (fefab26f01640c476d21ab444db46647f6edc121)' did not match any file(s) known to git

Error message

SPACK_CHECKOUT_VERSION should always be a form accepted by git checkout, so the bare Git commit SHA. The output of git describe also works:

$ git describe --tags
v0.17.1-3390-gfefab26f01
$ git -c 'advice.detachedHead=false' checkout v0.17.1-3390-gfefab26f01
HEAD is now at fefab26f01 Add vtkm variant to visit spack package. (#31887)

Information on your system

  • Spack: 0.19.0.dev0 (fefab26)
  • Python: 3.6.8
  • Platform: linux-rhel8-zen2
  • Concretizer: clingo

General information

  • I have run spack debug report and reported the version of Spack/Python/Platform
  • I have searched the issues of this repo and believe this is not a duplicate
  • I have run the failing commands in debug mode and reported the output

Metadata

Metadata

Labels

bugSomething isn't workingimpact-lowpipelinesIssues related to spack's pipeline features

Type

No type

Projects

Status

Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions