job py-release Loop Issue
Describe the bug
When using the py-release job, the job commits again, triggering a new CI pipeline that executes py-release once more. This creates a loop of pipelines, especially if PYTHON_AUTO_RELEASE_ENABLED is set to true.
Expected behavior
The py-release job should execute only once per pipeline and not trigger a new pipeline.
Actual behavior
The py-release job triggers a new pipeline, causing an infinite loop.
Context & Configuration
include:
# Python template
- component: "$CI_SERVER_FQDN/to-be-continuous/python/gitlab-ci-python@7.11"
inputs:
image: registry.hub.docker.com/library/python:3.9-slim
package-enabled: true
publish-enabled: true
release-enabled: true
auto-release-enabled: true
To fix this, we have overridden the rules to override the condition:
- if: '$PYTHON_AUTO_RELEASE_ENABLED == "true" && $CI_COMMIT_REF_NAME =~ $PROD_REF'
with:
- if: '$PYTHON_AUTO_RELEASE_ENABLED == "true" && $CI_COMMIT_REF_NAME =~ $PROD_REF && $CI_COMMIT_MESSAGE !~ "/chore/"'
I'm not sure if this is the best solution to fix the loop. What do you think?