microsoft / microsoft/AzureTRE
Automate component versioning to eliminate PR version conflicts
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 235
- Forks
- 192
- Avg merge
- 1d 23h
- Merged PRs (30d)
- 13
Description
Is your feature request related to a problem? Please describe.
I'm always frustrated when updating versions in PRs to keep them updated every time code it merged to main & handling changelog conflicts. Open Pull Requests frequently fail CI checks with Code update without version change (stale versions) whenever another PR modifying the same component or template lands on main.
Describe the solution you'd like
An automated way to manage component versions removing the requirement for developers to manually manage version numbers in PR branches (and possibly changelog conflicts) where possible.
Describe alternatives you've considered
Proposed Pre-Merge Automation Strategies:
-
Option A: GitHub Merge Queue Auto-Bump (Recommended)
* Enable GitHub Merge Queue. When a PR is queued for merge, GitHub creates a temporary merge branch combiningmain+PR.
* A pre-merge workflow step detects modified component/template paths and automatically bumps_version.pyorporter.yamltomain_version + 1on the merge branch before running final CI validation. -
Option B: Open PR Auto-Update Bot (Background Action)
* Whenmainreceives new commits, a GitHub Action runs onpush: main.
* It identifies all open PRs touching the modified components (api_app/,templates/workspace_services/guacamole/, etc.).
* The bot automatically checks out the open PR branches, calculatesmain_version + 1, and pushes a version bump commit back to the PR branch. -
Option C: Dynamic PR Build Tags + Automated Release Bumping
* PR builds use dynamic ephemeral version tags (e.g.,0.25.29-pr452.a1b2c3) injected into Docker and Porter builds via--build-arg VERSION.
* Remove mandatory static version file diff checks in PR CI.
* Official SemVer bumps (_version.py,porter.yaml,CHANGELOG.md) are applied automatically upon merge tomain. -
Option D: PR Slash Command (
/bump)
* Add a GitHub Action triggered by a PR comment (/bumpor/bump minor). The bot automatically calculates the required bump relative to currentmainand commits
it to the PR.
Please suggest any other solutions
---
### Managing Major vs. Minor vs. Patch Bumps for Components & Porter Bundles
Porter bundles (`porter.yaml`) and Python/Docker components use standard Semantic Versioning (`MAJOR.MINOR.PATCH`). Version bump types will be determined via:
1. **Conventional Commits** (Fully Automated):
* `fix:` $\rightarrow$ **PATCH** bump (`0.14.2` $\rightarrow$ `0.14.3`)
* `feat:` $\rightarrow$ **MINOR** bump (`0.14.2` $\rightarrow$ `0.15.0`)
* `feat!:` or `BREAKING CHANGE:` $\rightarrow$ **MAJOR** bump (`0.14.2` $\rightarrow$ `1.0.0`)
2. **PR Labels** (Manual Override):
* `bump:patch` (default), `bump:minor`, or `bump:major`.
---
### Acceptance Criteria
- [ ] Developers no longer need to manually edit `_version.py`, `version.txt`, or `porter.yaml` of package.json / package-lock.json when submitting PRs.
- [ ] PR CI pipelines do not fail with "stale version" errors when rebasing against updated `main`.
- [ ] Pre-merge automation (Merge Queue, PR update bot, or dynamic build tags) handles version calculation automatically prior to landing on `main`.
- [ ] Versioning rules (Patch/Minor/Major) apply consistently across both Python/Docker services and Porter bundle templates under `templates/`.
Contributor guide
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.
Research direction
Start by tracing the PR CI check that reports "Code update without version change" and review version sources such as _version.py, version.txt, porter.yaml, package.json, and package-lock.json across the listed component and template paths. Compare the proposed merge-queue, PR bot, dynamic-tag, and slash-command approaches; done means one consistent automation path prevents stale-version failures and applies the stated SemVer rules across Python/Docker services and Porter templates.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, github-actions, python
- Domain
- ci-cd, devops, release
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100