gnodet opened a new pull request, #21901:
URL: https://github.com/apache/camel/pull/21901
## Summary
Fix the `check-container-versions.yml` workflow to avoid creating duplicate
PRs for the same container version upgrade.
## Problem
The workflow was creating duplicate PRs (e.g., #21822 and #21895 both
upgrade ollama to 0.17.7) because:
1. The branch name included `${{ github.run_number }}`, making each weekly
run create a unique branch even for the same upgrade
2. There was no check for existing open PRs before creating a new one
## Fix
Two changes:
1. **Deterministic branch names**: Remove the run number suffix. Branch
names are now `automated/upgrade-<property>-<version>` (e.g.,
`automated/upgrade-ollama-container-0.17.7`). If a PR for the same
property+version already exists, `git push` will be a no-op (same content) or
fail gracefully.
2. **Check for existing open PRs**: Before creating a branch/PR, the
workflow now checks:
- Whether an open PR with the same branch name already exists (exact same
upgrade)
- Whether any open PR with the `container-images` label already exists
for the same property name (different version of the same container)
In either case, the upgrade is skipped with a log message.
## Example
Before: Running the workflow twice in a week with ollama outdated would
create:
- `automated/upgrade-ollama-container-0.17.7-16` (run 16)
- `automated/upgrade-ollama-container-0.17.7-17` (run 17) — duplicate!
After: The second run detects the existing PR and skips it.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]