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

Introduce new package spec version #345

Closed
jlind23 opened this issue May 25, 2022 · 1 comment · Fixed by #384
Closed

Introduce new package spec version #345

jlind23 opened this issue May 25, 2022 · 1 comment · Fixed by #384
Assignees
Labels
Team:Ecosystem Label for the Packages Ecosystem team

Comments

@jlind23
Copy link
Collaborator

jlind23 commented May 25, 2022

Introduce package spec format version example format_version: '1.0'

Per discussed during one of our team weekly, we will upgrade the package spec version as It is almost impossible to add control over package spec.

Most of the time it breaks a lot of packages and will imply bulk changes a the same time.

Changes packages spec will help us be more strict on validation for new incoming packages, leave older packages as is, add new types and fields without impacting packages without format_version.

Related:
#313
#338
#281

@jsoriano
Copy link
Member

jsoriano commented Aug 8, 2022

At the moment I think we have three main options to complete this task:

  1. Create v2 as a copy of v1, and maintain both copies. This option has the advantage of being the easiest one, and follows the current approach in the repository with the versions directory. It has the disadvantage of needing to keep several copies of the spec, and we may need to sync bugfixes between them. This is the approach implemented in Introduce format version v2 #380.
    1. An alternative to this would be to create one branch per major, and implement an entry point library that chooses the branch to use.
  2. Focus by now only on semantic validation, that is the current blocker for the breaking validations we want to add. This would be also relatively easy and would unblock other tasks, but wouldn't give a solution for schema files. This is the approach implemented in Introduce initial version 2 and stronger versioning support for the spec #384.
  3. Use a more expressive schema definition language. This could be a longer-term solution with more advantages, would also solve Consider alternatives to jsonschema for validation #287. The disadvantage is that is a bigger effort, and we would still need something like option 2 for semantic validation that cannot be represented in the new language.
    A POC for schema validation using CUE language is explored in https://github.com/jsoriano/cuetest.

Long-term option 3 looks like the best option.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Team:Ecosystem Label for the Packages Ecosystem team
Projects
None yet
2 participants