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

signing script: Do not fail when there is nothing to sign #481

Merged

Conversation

scottwittenburg
Copy link
Collaborator

Using the globbing pattern seems to produce an empty match when there are no spec files in the working directory. Replacing the glob with the results of find prevents entering the loop unless there are any actual files in the directory.

Normally if there was nothing to rebuild, we would not schedule this job anyway. So this is guarding an exceptional case, where all the scheduled rebuild jobs failed, something we saw when the version of gpg in one of the rebuild images was incompatible with one of the intermediate signing keys.

Using the globbing pattern seems to produce an empty match when
there are no spec files in the working directory.  Replacing the
glob with the results of find prevents entering the loop unless
there are any actual files in the directory.

Normally if there was nothing to rebuild, we would not schedule
this job anyway.  So this is guarding an exceptional case, where
all the scheduled rebuild jobs failed, something we saw when the
version of gpg in one of the rebuild images was incompatible
with one of the intermediate signing keys.
@scottwittenburg
Copy link
Collaborator Author

Testing this is tricky since sign.sh can only run on protected pipelines in the spack/spack project on gitlab.spack.io. But I tested a trimmed-down version locally to make sure this works with and without specs in the working directory.

@scottwittenburg scottwittenburg merged commit 671147f into spack:main May 11, 2023
1 check passed
@scottwittenburg scottwittenburg deleted the dont-fail-when-nothing-to-sign branch May 11, 2023 18:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants