ACCESS-NRI / model-config-tests

Tests for checking model configurations
Apache License 2.0
0 stars 1 forks source link

Config versions bump failing due to annotated tags #53

Closed aidanheerdegen closed 1 month ago

aidanheerdegen commented 1 month ago

The workflow to bump tags in the ACCESS-ESM1.5 configs is failing

https://github.com/ACCESS-NRI/access-esm1.5-configs/actions/runs/10537864862/job/29199729736#step:5:6

https://github.com/ACCESS-NRI/access-esm1.5-configs/actions/runs/10523427873/job/29158089899#step:5:6

The error occurs when the new tag is being created

Run git tag release-historical+concentrations-1.0
  git tag release-historical+concentrations-1.0
  git push --tags
  shell: /usr/bin/bash -e {0}

the error is:

error: Terminal is dumb, but EDITOR unset
Please supply the message using either -m or -F option.
Error: Process completed with exit code 1.

So it seems like the git tag is trying to created annotated tags, and it is trying to open an editor to create a commit message and failing.

I think it is related to this change

https://github.com/ACCESS-NRI/model-config-tests/pull/49

so the bot now signs commits.

According to the git tag docs git defaults to lightweight commits only when a number of other options aren't defined:

Lightweight Tags Another way to tag commits is with a lightweight tag. This is basically the commit checksum stored in a file — no other information is kept. To create a lightweight tag, don’t supply any of the -a, -s, or -m options, just provide a tag name

Seeing as we're now effectively specifying -s, we no longer have lightweight commits.

As far as a solution goes, as there is no way to force lightweight commits, the CI will have to add a commit message using the -m command line option. It could be an empty string, but might as well be something useful identifying a version bump and the workflow that did it?