Issue Labeler fails on most bug reports: 'needs-env-info' label does not exist
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 68/100
Research direction
Start by reading utils/label_issues.py and .github/workflows/issue_labeler.yml, then reproduce the failure with a bug issue lacking “Diffusers version:” or inspect run 30841049166. Verify how VALID_LABELS and the per-label gh issue edit loop behave, and confirm that bug reports receive their intended labels without the job failing on needs-env-info.
Written by the indexing model from the issue text.
Description
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.
- Dominant language
- Python
- Stars
- 34.6k
- Forks
- 7.3k
- Avg merge
- 3d 16h
- Merged PRs (30d)
- 74
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.
More from huggingface/diffusers
-
bug needs-env-info pipelines
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
huggingface/diffusers#14794 ·
-
bug needs-code-example needs-env-info pipelines
Difficulty 1/5 Under an hour Newbie friendliness 86/100
huggingface/diffusers#14780 · 1 comment ·
-
bug pipelines
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
huggingface/diffusers#14769 · 1 comment ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
huggingface/diffusers#14639 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
huggingface/diffusers#14616 ·
All issues in huggingface/diffusers
Similar issues
-
documentation help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
simonw/sqlite-utils#872 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100