Skip to content
This repository has been archived by the owner on Nov 1, 2022. It is now read-only.

Make it possible to overwrite image TS with label #1992

Merged
merged 2 commits into from
May 9, 2019

Conversation

hiddeco
Copy link
Member

@hiddeco hiddeco commented Apr 29, 2019

This adds support for overwriting the image created at timestamp with labels which are set during build. Supported labels (for now) are the Open Container Image (OCI) spec and the (legacy) Label Schema (LS) spec.

We prioritize OCI over LS, with a fallback to the CreatedAt from the registry.

Fixes #891, addresses #1799, #1797, #746

@hiddeco hiddeco requested review from 2opremio and squaremo April 29, 2019 11:59
@hiddeco hiddeco added this to the v1.13.0 milestone Apr 30, 2019
@hiddeco
Copy link
Member Author

hiddeco commented Apr 30, 2019

As this PR changes behaviour (by prioritizing labels over the CreatedAt date from the registry) and is more a feature than a bugfix, I marked this as a v1.13.0 milestone.

@hiddeco hiddeco added bug enhancement UX In pursuit of a delightful user experience labels Apr 30, 2019
image/image.go Outdated Show resolved Hide resolved
image/image.go Outdated Show resolved Hide resolved
Copy link
Contributor

@2opremio 2opremio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor comments, otherwise LGTM

@hiddeco hiddeco force-pushed the bug/891-timestamp-from-labels branch from 2743fd0 to ccf6c52 Compare May 1, 2019 16:27
@2opremio
Copy link
Contributor

2opremio commented May 2, 2019

LGTM

This adds support for overwriting the image created at timestamp with
labels which are set during build. Supported labels (for now) are the
Open Container Image (OCI) spec[1] and the (legacy) Label Schema (LS)
spec[2].

We prioritize OCI over LS, with a fallback to the CreatedAt.

This should serve a wide range of users who either have internal rules
for image builds (e.g. timestamp set to null as reported in #1797) or
want a stable reliable pointer they can have control over (#746, #891).
[1]: https://github.com/opencontainers/image-spec/blob/master/annotations.md#pre-defined-annotation-keys
[2]: http://label-schema.org/rc1/#build-time-labels
@hiddeco hiddeco force-pushed the bug/891-timestamp-from-labels branch from ccf6c52 to 0208f1a Compare May 9, 2019 14:05
Copy link
Member

@squaremo squaremo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM2

@hiddeco hiddeco force-pushed the bug/891-timestamp-from-labels branch from acd4706 to a39a860 Compare May 9, 2019 15:27
@hiddeco hiddeco merged commit 3b6c58b into master May 9, 2019
@hiddeco hiddeco deleted the bug/891-timestamp-from-labels branch May 9, 2019 15:40
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug enhancement UX In pursuit of a delightful user experience
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Image timestamps are incorrect
3 participants