Describe the bug
The Issue Labeler workflow fails on most new bug reports because it tries to apply a label that does not exist in this repository. It is 15 of the last 40 runs.
The error, from run 30841049166:
failed to update https://github.com/huggingface/diffusers/issues/14376: 'needs-env-info' not found
failed to update 1 issue
##[error]Process completed with exit code 1.
Cause
utils/label_issues.py appends needs-env-info to any issue it has labelled bug when the body does not contain a version string:
if "bug" in labels and "Diffusers version:" not in body:
labels.append("needs-env-info")
needs-env-info is listed in VALID_LABELS, but there is no such label in the repository — gh label list has needs-code-example and no needs-env-info. .github/workflows/issue_labeler.yml then runs gh issue edit --add-label per label, and gh exits non-zero on the unknown one, failing the step.
Two consequences:
- Every bug report without a pasted version string fails the labeler, which is exactly the population the label was meant to catch.
- Because the labels are applied in a loop, a failure part-way can leave the earlier labels applied and the rest not, so an issue can end up partially labelled.
Suggested fix
The straightforward one is to create the needs-env-info label, since VALID_LABELS and needs-code-example both suggest it was intended to exist.
Independently of that, the apply step could avoid failing the whole job on one unknown label:
for label in $(...); do
gh issue edit "$ISSUE_NUMBER" --add-label "$label" || echo "::warning::could not apply label: $label"
done
That keeps a missing or renamed label from silently costing an issue the rest of its labels in future.
I am happy to open a PR for the workflow change. Creating the label itself needs repository settings access, so that one has to be on your side.
Reproduction
Open any issue that the labeler classifies as a bug and that does not contain Diffusers version: in the body. #14376 is a recent example.
System Info
Not environment-specific; CI configuration. Observed on main at 6f2010e8b.
Who can help?
@DN6 — going by git log on utils/label_issues.py and .github/workflows/issue_labeler.yml.
Unrelated in cause but same area, in case it is useful to look at together: #14376 is a separate CI failure in the Secret Leaks workflow.
Describe the bug
The
Issue Labelerworkflow fails on most new bug reports because it tries to apply a label that does not exist in this repository. It is 15 of the last 40 runs.The error, from run 30841049166:
Cause
utils/label_issues.pyappendsneeds-env-infoto any issue it has labelledbugwhen the body does not contain a version string:needs-env-infois listed inVALID_LABELS, but there is no such label in the repository —gh label listhasneeds-code-exampleand noneeds-env-info..github/workflows/issue_labeler.ymlthen runsgh issue edit --add-labelper label, andghexits non-zero on the unknown one, failing the step.Two consequences:
Suggested fix
The straightforward one is to create the
needs-env-infolabel, sinceVALID_LABELSandneeds-code-exampleboth suggest it was intended to exist.Independently of that, the apply step could avoid failing the whole job on one unknown label:
That keeps a missing or renamed label from silently costing an issue the rest of its labels in future.
I am happy to open a PR for the workflow change. Creating the label itself needs repository settings access, so that one has to be on your side.
Reproduction
Open any issue that the labeler classifies as a bug and that does not contain
Diffusers version:in the body. #14376 is a recent example.System Info
Not environment-specific; CI configuration. Observed on
mainat6f2010e8b.Who can help?
@DN6 — going by
git logonutils/label_issues.pyand.github/workflows/issue_labeler.yml.Unrelated in cause but same area, in case it is useful to look at together: #14376 is a separate CI failure in the
Secret Leaksworkflow.