Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix LayerData not being usable for ComputeStorage package #1203

Merged
merged 1 commit into from
Oct 22, 2021

Conversation

dcantah
Copy link
Contributor

@dcantah dcantah commented Oct 21, 2021

Previously the LayerData structure in the computestorage package used
definitions from the hcs schema from /internal so it was not actually possible
to create a LayerData structure for an outside caller.

This just creates local type aliases for hcsschema.Version and hcsschema.Layer
so a client can create the structure now using computestorage.Version and
computestorage.Layer respectively.

Signed-off-by: Daniel Canter dcanter@microsoft.com

@dcantah dcantah requested a review from a team as a code owner October 21, 2021 16:58
Previously the LayerData structure in the computestorage package used
definitions from the hcs schema from /internal so it was not actually possible
to create a LayerData structure for an outside caller.

This just creates local type aliases for hcsschema.Version and hcsschema.Layer
so a client can create the structure now using computestorage.Version and
computestorage.Layer respectively.

Signed-off-by: Daniel Canter <dcanter@microsoft.com>
@dcantah dcantah force-pushed the computestorage-fix-layerdata branch from 20484e5 to d244780 Compare October 21, 2021 17:04
@dcantah
Copy link
Contributor Author

dcantah commented Oct 21, 2021

@TBBle

Copy link
Contributor

@katiewasnothere katiewasnothere left a comment

Choose a reason for hiding this comment

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

lgtm

Copy link
Contributor

@TBBle TBBle left a comment

Choose a reason for hiding this comment

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

Looks good to me. I haven't tested it, but on inspection Version and Layer themselves consist only of primitive types, so I expect this is sufficient.

Do you think this is sufficient to close #1073? Or are there likely to be other schema elements that need to be exposed in other APIs and we should keep that ticket open for a general "Why is the schema internal" discussion?

I don't mind either way, this meets the use-case I opened #1073 to unblock.

As I mentioned there, access to hcsschema.SchemaV21() or similar would I think be slightly more API-friendly than manually setting SchemaVersion.Major and SchemaVersion.Minor, but it's certainly not a problem this way.

@dcantah
Copy link
Contributor Author

dcantah commented Oct 22, 2021

@TBBle We should keep it open. There's a bigger discussion to be had around moving the schema out of internal which we'll want to have.

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.

4 participants