Skip to content

Embed platform fields in Image spec#809

Merged
vbatts merged 2 commits into
opencontainers:mainfrom
cpuguy83:image-platform
Jul 29, 2021
Merged

Embed platform fields in Image spec#809
vbatts merged 2 commits into
opencontainers:mainfrom
cpuguy83:image-platform

Conversation

@cpuguy83
Copy link
Copy Markdown
Contributor

Carries #777 + adds other platform fields
Closes #777

@tianon
Copy link
Copy Markdown
Member

tianon commented Sep 30, 2020

(not a maintainer) I'm +1 on this, but I think it's probably worth at least mentioning pros/cons of including all the platform fields vs deprecating existing fields and adding a full proper platform object instead. 😇

@cpuguy83
Copy link
Copy Markdown
Contributor Author

Major con I can see with that is builders will need to set both the old fields and the new platform field to maintain backwards compatibility.

Also requires allocating another object, but 🤷

@caniszczyk
Copy link
Copy Markdown
Contributor

@cyphar any comments here?

ping @opencontainers/image-spec-maintainers

It seems this would warrant a bump in a minor or micro release, nothing breaks here (optional field)

cyphar
cyphar previously requested changes Oct 1, 2020
Comment thread config.md Outdated
Comment thread conversion.md Outdated
Comment thread conversion.md Outdated
@cyphar
Copy link
Copy Markdown
Member

cyphar commented Oct 1, 2020

I think a platform object would be a nicer solution, but 🤷 from my side too.

@cpuguy83
Copy link
Copy Markdown
Contributor Author

cpuguy83 commented Oct 1, 2020

Updated.

@cpuguy83
Copy link
Copy Markdown
Contributor Author

Ping

@cpuguy83 cpuguy83 requested a review from cyphar October 12, 2020 18:17
@caniszczyk
Copy link
Copy Markdown
Contributor

ping @opencontainers/image-spec-maintainers

Copy link
Copy Markdown
Contributor

@vrothberg vrothberg left a comment

Choose a reason for hiding this comment

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

Thanks for working on this, @cpuguy83!

I would love to help things push forward if needed. @opencontainers/image-spec-maintainers, are there any open issues that prevent the changes from getting in?

I have an immediate need to know the variant of an image. Once an image was pulled, we lose that information which is currently causing me headaches.

@jonjohnsonjr
Copy link
Copy Markdown
Contributor

You could poke some folks in the weekly meeting (today) if you want to get some activity.

@vrothberg
Copy link
Copy Markdown
Contributor

vrothberg commented Mar 11, 2021

You could poke some folks in the weekly meeting (today) if you want to get some activity.

Thanks. I wanted to join for a long time but the time is tough (11PM in my time zone). Maybe, I'll make it once to help push this issue forward :)

Comment thread conversion.md
Comment thread image-index.md
vbatts
vbatts previously approved these changes Jul 9, 2021
Copy link
Copy Markdown
Member

@vbatts vbatts left a comment

Choose a reason for hiding this comment

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

This lines up with what's already being done (apart from my one comment), and it matches with the os and variant fields in the image-index descriptors.

Comment thread schema/validator.go Outdated
Comment thread schema/validator.go Outdated
This commit adds the CPU variant to the image config type. It also
refactors the image index specification to isolate the platform
variant specifications, allowing a reference from the config spec.
The go specs are updated to include the new field in the v1.Image
struct, and tests are updated to include the new field.

Signed-off-by: Chris Price <chris.price@docker.com>
@cpuguy83
Copy link
Copy Markdown
Contributor Author

# cd .; git clone https://github.com/opencontainerd/image-spec /home/runner/work/image-spec/image-spec/go/src/github.com/opencontainerd/image-spec
Cloning into '/home/runner/work/image-spec/image-spec/go/src/github.com/opencontainerd/image-spec'...
fatal: could not read Username for 'https://github.com': terminal prompts disabled
package github.com/opencontainerd/image-spec/specs-go/v1: exit status 128

@vbatts
Copy link
Copy Markdown
Member

vbatts commented Jul 10, 2021

@cpuguy83 hrm. Is that a go.mod issue?

@tianon
Copy link
Copy Markdown
Member

tianon commented Jul 10, 2021 via email

@vbatts
Copy link
Copy Markdown
Member

vbatts commented Jul 12, 2021

/me kicked the jobs

Comment thread schema/validator.go Outdated
This makes sure that an index can be generated from an image spec.

`OSVersion` in particular is fairly important for Windows since Windows
can only run containers for the OS version it was built for, and
currently the only way to reliably get this is from the index.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
@cpuguy83
Copy link
Copy Markdown
Contributor Author

All green now.

Copy link
Copy Markdown
Contributor

@stevvooe stevvooe left a comment

Choose a reason for hiding this comment

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

LGTM

@cpuguy83
Copy link
Copy Markdown
Contributor Author

@cyphar Does this LGTY? I made the adjustments you'd requested before. Merging is currently blocked due to prior review.

Thanks!

@vbatts vbatts dismissed cyphar’s stale review July 29, 2021 14:25

prior review is outdated

Copy link
Copy Markdown
Member

@vbatts vbatts left a comment

Choose a reason for hiding this comment

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

😸

Jjmo12345

This comment was marked as outdated.

Jjmo12345

This comment was marked as outdated.

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.

9 participants