containers / build

another build tool for container images (archived, see https://github.com/rkt/rkt/issues/4024)
Apache License 2.0
342 stars 80 forks source link

Created date annotation restrictions need to be documented or removed. #325

Closed taqtiqa-mark closed 7 years ago

taqtiqa-mark commented 7 years ago

This build step

${ACBUILD} annotation add created "$( date --utc --iso-8601=ns )"

results in this error

/bin/acbuild --debug annotation add created 2017-08-02T07:27:20,034850873+0000

Adding annotation "created"="2017-08-02T07:27:20,034850873+0000"

annotation add: json: error calling MarshalJSON for type types.Annotations: bad Date: parsing time "2017-08-02T07:27:20,034850873+0000" as "2006-01-02T15:04:05Z07:00": cannot parse ",034850873+0000" as "Z07:00"

The documentation here is silent

Hope this helps.

taqtiqa-mark commented 7 years ago

Now I am guessing. But in case it helps save someone else N build runs.... if acbuild is using a std go library, this page, hints that these might be allowed timestamps. True? who knows.

    ANSIC       = "Mon Jan _2 15:04:05 2006"
    UnixDate    = "Mon Jan _2 15:04:05 MST 2006"
    RubyDate    = "Mon Jan 02 15:04:05 -0700 2006"
    RFC822      = "02 Jan 06 15:04 MST"
    RFC822Z     = "02 Jan 06 15:04 -0700" // RFC822 with numeric zone
    RFC850      = "Monday, 02-Jan-06 15:04:05 MST"
    RFC1123     = "Mon, 02 Jan 2006 15:04:05 MST"
    RFC1123Z    = "Mon, 02 Jan 2006 15:04:05 -0700" // RFC1123 with numeric zone
    RFC3339     = "2006-01-02T15:04:05Z07:00"
    RFC3339Nano = "2006-01-02T15:04:05.999999999Z07:00"
    Kitchen     = "3:04PM"
    // Handy time stamps.
    Stamp      = "Jan _2 15:04:05"
    StampMilli = "Jan _2 15:04:05.000"
    StampMicro = "Jan _2 15:04:05.000000"
    StampNano  = "Jan _2 15:04:05.000000000"
lucab commented 7 years ago

No need to guess, the type of that field is fully specified here: https://github.com/appc/spec/blob/master/spec/types.md#timestamps-type, even with an example on how to produce it. From your list above, this corresponds to RFC3339Nano.

taqtiqa-mark commented 7 years ago

I'm closing this. The project is no longer maintained and umoci and buildah are likely the tools people should be looking at. With that as context, this issue is just noise.