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

Use $schema and $id in the right way #283

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

jaimergp
Copy link
Contributor

@jaimergp jaimergp commented Nov 25, 2024

Description

Closes #282

Checklist - did you ...

  • Add a file to the news directory (using the template) for the next release's release notes?
  • Add / update necessary tests?
  • Add / update outdated documentation?

@conda-bot conda-bot added the cla-signed [bot] added once the contributor has signed the CLA label Nov 25, 2024
@jaimergp
Copy link
Contributor Author

xref pydantic/pydantic#1478

@jaimergp
Copy link
Contributor Author

I'm not sure about the migration path for this change. Need to take a look at the validation code in conda-build, but with this change it looks like we could just use JSON schema directly without having menuinst around.

We should also publish the schema to jsonstore.

Questions to address:

  • How do we version the schema? I've seen several options:
  • How do we name the schema filename once we decide on a version scheme?
  • Do we keep all schema versions around in the repo?
  • Think of runtime validation.

@jaimergp jaimergp marked this pull request as ready for review November 25, 2024 11:52
@jaimergp jaimergp requested a review from a team as a code owner November 25, 2024 11:52
@marcoesters
Copy link
Contributor

marcoesters commented Nov 27, 2024

I'm not sure about the migration path for this change. Need to take a look at the validation code in conda-build, but with this change it looks like we could just use JSON schema directly without having menuinst around.

We should also publish the schema to jsonstore.

Questions to address:

* How do we version the schema? I've seen several options:
  
  * Independent versioning with SchemaVer or regular SemVer. Right now we just have _the_ schema, but it will keep evolving as we are seeing in [CEP-11: Update schema with menuinst 2.1.x and 2.2.x changes ceps#98](https://github.com/conda/ceps/pull/98).
  * Same as menuinst? I don't like this, should be tied to a tool agnostic method.

* How do we name the schema filename once we decide on a version scheme?

* Do we keep all schema versions around in the repo?

* Think of runtime validation.

This should probably be an issue to discuss this more, but I think schema version and menuinst version should be independent. The major versions will probably coincide though.

I don't know much about SchemaVer, but if this is commonly used, I don't see why we wouldn't use that one for the schema. For the file name, I would then prefer something like menuinst.schema.<SchemaVer>.json since SchemaVer uses dashes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla-signed [bot] added once the contributor has signed the CLA
Projects
Status: Approved
Development

Successfully merging this pull request may close these issues.

$schema and $id are being used in the wrong way
3 participants