Sanitize branch names in app_release.py so Docker image tags stay valid
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 82/100
Research direction
Read deploy/scripts/app_release.py, focusing on get_release() and the tag construction; compare its current branch normalization with Docker's allowed tag characters. Reproduce with a branch such as v2.9.0+deploy through the Deploy Update to QA Server workflow, and consider it complete when the resulting image tag is valid while existing master and tagged-release behavior remains unaffected.
Written by the indexing model from the issue text.
Description
Summary
For branch-based QA deploys, deploy/scripts/app_release.py builds the image tag as {release}-{branch_name}.{num_commits} but only sanitizes / and _ in the branch name. Git branch names can legally contain characters that are illegal in Docker image tags (e.g. +), which makes the image build fail with invalid reference format.
Reproduction
Trigger the Deploy Update to QA Server workflow from a branch whose name contains a + (e.g. v2.9.0+deploy). The build step fails:
ERROR: failed to build: invalid tag ".../combine_maint:v2.9.0-v2.9.0+deploy.5": invalid reference format
Root cause
In get_release():
branch_name = re.sub("[/_]+", "-", result.stdout) or "HEADLESS"
Only / and _ are replaced. Docker image tags allow only [A-Za-z0-9_.-] (max 128 chars), so a + (or other characters valid in git refs) passes through and produces an invalid tag.
Proposed fix
Replace any run of characters that are invalid in a Docker tag with -:
branch_name = re.sub(r"[^A-Za-z0-9.-]+", "-", result.stdout) or "HEADLESS"
This preserves the current behavior (/→-, _→-) and additionally handles + and any other illegal characters.
Scope
Only affects branch-based deploys whose branch name contains a Docker-illegal character. Normal QA deploys from master and tagged releases (where HEAD is exactly on the tag, so no branch suffix is appended) are unaffected.
- Dominant language
- TypeScript
- Stars
- 22
- Forks
- 10
- Avg merge
- 2d 2h
- Merged PRs (30d)
- 9
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from sillsdev/TheCombine
-
lowpriority Size: S
Difficulty 1/5 Under an hour Newbie friendliness 90/100
sillsdev/TheCombine#4359 ·
-
github_actions
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
sillsdev/TheCombine#4218 ·
-
enhancement goal: MergeDup lowpriority
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
sillsdev/TheCombine#3544 ·
-
bug
Difficulty 4/5 3-5 days Newbie friendliness 68/100
sillsdev/TheCombine#4369 ·
-
deployment
sillsdev/TheCombine#4368 · 1 assignee ·
All issues in sillsdev/TheCombine
Similar issues
-
calcite-components needs triage refactor
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Esri/calcite-design-system#15203 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 91/100
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
Difficulty 1/5 Under an hour Newbie friendliness 95/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Automattic/studio#4908 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 90/100