Skip to content

Conversation

@DrewRomanyk
Copy link

@DrewRomanyk DrewRomanyk commented Nov 30, 2017

Signed-off-by: Drew Romanyk drewiswaycool@gmail.com

Add validation for labels, fixes #4904

ASSUMPTIONS
This applies to all labels & all versions of docker compose

EDIT:
Since this failed, my assumption is wrong, is there any documentation on where to find which labels want strings only? As the docker compose docs didnt seem to tell (https://docs.docker.com/compose/compose-file/#labels). Or is it just the build labels that can allow numbers?

Signed-off-by: Drew Romanyk <drewiswaycool@gmail.com>
@shin-
Copy link

shin- commented Nov 30, 2017

I think that test is wrong, actually.

OTOH, now that we merged #5291 , there might be an opportunity to convert label values to string automatically instead. If you want to dig deeper that'd be a cool thing to do, but otherwise your PR is a good first step.

@DrewRomanyk
Copy link
Author

DrewRomanyk commented Dec 2, 2017

@shin- How should I handle cases where the labels could have '.' characters in them?

EDIT:
In the key for the label that is

@shin- shin- added this to the 1.19.0 milestone Dec 4, 2017
@shin- shin- merged commit a1ac289 into docker:master Jan 19, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

A label with a value of only numbers causes unmarshal error

2 participants