GoogleContainerTools / jib

🏗 Build container images for your Java applications.
Apache License 2.0
13.7k stars 1.44k forks source link

Improve error message when labels map contains null values #4294

Closed stefanLeo closed 3 months ago

stefanLeo commented 3 months ago

Environment:

Jib version: 3.4.3
Build tool: Maven 3.9.6
OS: N/A

Description of the issue:

Jib's checks if any of the keys and values set in the container.labels configuration is null, which is super helpful. However, the error message when an container.label value is null currently reads only like this: "labels map contains null values". For someone not so deep into Jib, this could be not enough of a hint to the actual problem.

Expected behavior: The error message should contain the offending keys, for example like so: "labels map contains null values for key(s): FOO, BAR, BAZ"

Steps to reproduce:

Use an labels map with a value set to null
Run jib
chanseokoh commented 3 months ago

Dup of #4263.

zhumin8 commented 3 months ago

closing as dup and track in #4263.