hashicorp / hashicorp/actions-docker-build
docker version: `get_minor_version` fails when leading number is greater than 9
- Dominant language
- Shell
- Stars
- 6
- Forks
- 7
- PR merge metrics
- No merged PRs in 30d
Description
The [`get_minor_version`](https://github.com/hashicorp/actions-docker-build/blob/0635aed766f1f4e4519845ca22a4d024c96fb55d/scripts/digest_inputs#L39) function added within https://github.com/hashicorp/actions-docker-build/pull/40 validates the input version used to tag the Docker image. When the major version component is greater than 9, the check will fail. Some quick local testing also indicates the way the function splits the raw input doesn't correctly accommodate double digit minor number portions of the semantic version.
This means no images from version `10.0.0` can be built using this action. While this is a way off some most products, having a higher limit is very useful for testing release process, so we can use version identifiers such as `1000.0.0`.
The error messages from the function are also identical which makes it hard to spot initially what the problem is. Having more descriptive messages would also be a nice change along with allowing a broader range of major versions.
Example GitHub action failure: https://github.com/hashicorp/nomad/actions/runs/12252776463
Contributor guide
No contributing guide indexed for this repository
Research direction
Start in scripts/digest_inputs at the get_minor_version function and reproduce the failures with versions such as 10.0.0 and 1000.0.0. The work is done when double-digit major and minor components are accepted for Docker image tags and the function's validation errors distinguish the failure cases.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, shell
- Domain
- ci-cd, devops
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100