Config schema: optional fields are not all nullable
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 45/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Stale
- Tech stack
- json
- Domain
- infrastructure
Research direction
Start with config.md and schema/config-schema.json, then inspect defs.json for the existing stringPointer and nullable patterns used by Entrypoint, Cmd, Volumes, and Labels. Check each other optional field, including history.empty_layer, and validate representative configurations that set optional fields to null; done means all optional fields accepted by the specification validate successfully.
Written by the indexing model from the issue text.
Description
The config specification says "Any OPTIONAL field MAY also be set to null, which is equivalent to being absent":
Most fields in schema/config-schema.json are listed as optional, but only the following are explicitly nullable:
config.Entrypoint,
config.Cmd,
config.Volumes,
config.Labels
This means that config files setting the other optionals to null (instead of omitting them) fail to validate against the schema.
It looks like defs.json#/definitions/stringPointer can be used for the optional string fields, and an optionalBoolean definition added for history.empty_layer. Optional objects/maps/arrays can use the same technique as Entrypoint etc.
Happy to make a PR if the above approach is OK.
- Dominant language
- Go
- Stars
- 4.5k
- Forks
- 891
- Avg merge
- 27d 2h
- Merged PRs (30d)
- 1
Contributor guide
No contributing guide indexed for this repository
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 opencontainers/image-spec
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
opencontainers/image-spec#1333 · 2 comments · 2 reactions ·
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
opencontainers/image-spec#1310 · 4 comments ·
-
Difficulty 5/5 Over a week Newbie friendliness 42/100
opencontainers/image-spec#1308 · 5 comments · 1 reaction ·
-
Difficulty 5/5 Over a week Newbie friendliness 30/100
opencontainers/image-spec#1283 · 5 comments ·
-
Difficulty 5/5 Over a week Newbie friendliness 15/100
opencontainers/image-spec#1270 · 29 comments ·
All issues in opencontainers/image-spec
Similar issues
-
optimization optimization:agents-md-curator
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
githubnext/gh-aw-cao#13143 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
blinklabs-io/bursa#904 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
yanet-platform/ipfw-go#129 ·
-
bug confmap/provider/googlesecretmanagerprovider needs triage
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
open-telemetry/opentelemetry-collector-contrib#51273 · 2 comments ·
-
bug: AI Gateway client filter lists "Unknown" twice when NULL and literal Unknown clients coexist Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 90/100