docker / docker/metadata-action

Empty labels should be omitted

Open
#584 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

kind/enhancement status/triage
Dominant language
TypeScript
Stars
1.1k
Forks
160
Avg merge
4d 17h
Merged PRs (30d)
12

Description

Description

It seems unnecessary to retain empty labels/annotations?

Is there a benefit/reason to do so? If the image itself has the equivalent labels, then a blank label will override that.

Reference: Originally encountered here: https://github.com/docker/metadata-action/issues/543#issuecomment-3764894116

NOTE: The README notes that the labels can be overriden if the defaults aren't desirable, technically an explicit label with a blank value might be valid in some scenario? Or should that be omitted? (I'm sure if someone has a valid case they'd chime in to share it, but until then rather than assume usage a breaking change queued for a major version bump may be valid?)


Same should apply for annotations.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the README's “Overwrite labels and annotations” section and trace how labels and annotations are produced by the action. Determine whether empty values should be omitted or preserved as explicit overrides, including the possible breaking-change implications, then verify the chosen behavior for both labels and annotations.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
devops
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.