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

defs-zos: [Fix] prevent schema parsers from hitting recursion-loop while resolving types. #1117

Merged
merged 1 commit into from
Aug 16, 2021

Conversation

flouthoc
Copy link
Contributor

@flouthoc flouthoc commented Aug 7, 2021

Hi Team,

Following PR makes sure that des-zos.json is consistent with schema definition w.r.t to entire spec.

I think following PR ( #1095 ) has introduced type-resolution issues on downstream parsers.
Specifying definition-files for types present in existing .json would result in infinite type resolution loop. However existing convention is just using # instead of specifying def-file for example https://github.com/opencontainers/runtime-spec/blob/master/schema/defs-linux.json

Thanks

…ile resolving types.

Signed-off-by: flouthoc <flouthoc.git@gmail.com>
@giuseppe
Copy link
Member

giuseppe commented Aug 9, 2021

@najohnsn could you please take a look?

@flouthoc
Copy link
Contributor Author

Hi @najohnsn Were you able to take a look at this.

@najohnsn
Copy link
Contributor

Sorry, I was on vacation. This looks good to me. Not sure why a relative reference wasn't used before.
@SteeleDesmond, you should take a look too.

@tianon
Copy link
Member

tianon commented Aug 13, 2021

This seems like it's doing the opposite of what https://github.com/opencontainers/runtime-spec/blob/82ab996a5bf91804a440391bff43140b17bbadd4/schema/config-linux.json does? (lots of "$ref": "defs-linux.json#/... in there)

@najohnsn
Copy link
Contributor

@tianon, yes, config-linux.json has references to defs-linux.json. But defs-linux.json has the relative reference that is being proposed here for defs-zos.json.

@tianon
Copy link
Member

tianon commented Aug 13, 2021

🤦 doh, thanks for clarifying 👍

Copy link
Member

@giuseppe giuseppe left a comment

Choose a reason for hiding this comment

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

LGTM

@giuseppe giuseppe merged commit 130ae3b into opencontainers:master Aug 16, 2021
@AkihiroSuda AkihiroSuda mentioned this pull request Jan 24, 2023
@AkihiroSuda AkihiroSuda added this to the v1.1.0 milestone Feb 1, 2023
@AkihiroSuda AkihiroSuda mentioned this pull request Jun 26, 2023
12 tasks
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.

None yet

5 participants