Skip to content

add optional property version for parent reference to support multi-version stacks/samples #764

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

Closed
yangcao77 opened this issue Feb 9, 2022 · 2 comments · Fixed by #785
Closed
Assignees
Labels
area/api Enhancement or issue related to the api/devfile specification

Comments

@yangcao77
Copy link
Contributor

Which area this feature is related to?

/area api

Which functionality do you think we should add?

Why is this needed? Is your feature request related to a problem?
sub issue for #735

Detailed description:
Devfile Spec change required for multi-version stacks/sample support.

Describe the solution you'd like

Add optional property version for parent reference to support multi-version stacks/samples.
Create validation on the version property:

  • The version should be either with a common version pattern, or be latest.
  • version should only be used when id is specified. (Pull from registry)

Describe alternatives you've considered

Additional context

@openshift-ci openshift-ci bot added the area/api Enhancement or issue related to the api/devfile specification label Feb 9, 2022
@yangcao77 yangcao77 self-assigned this Feb 24, 2022
@yangcao77
Copy link
Contributor Author

yangcao77 commented Mar 6, 2022

For the case putting version= latest, the devfile schema version might be incompatible if a newer stack version released, since latest always point to the newest version.
e.g. main devfile is devfile v2.1, and latest stack version contains devfile with v2.2

3 alternatives:

  1. continue use latest stack version, and error out if the parent version is higher than the main devfile version (already included in current devfile validation)

  2. use main devfile version as maxSchemaVersion, and only find the latest stack version which is small or equal than the maxSchemaVersion (main devfile version)

  3. introduce minSchemaVersion and maxSchemaVersion properties in the parent's import reference as well. and apply the two filters when looking for "latest" stack version.

I personally prefer the first/second option. 3 is complicated from devfile writer perspective

@elsony
Copy link
Contributor

elsony commented Mar 7, 2022

Discussed on the community call on 3/7 and we'll use option #1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/api Enhancement or issue related to the api/devfile specification
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants