Validate devfile with schema with matching apiVersion #14824
Labels
kind/enhancement
A feature request - must adhere to the feature request template.
severity/P2
Has a minor but important impact to the usage or development of the system.
Milestone
Is your enhancement related to a problem? Please describe.
Currently, devfile
apiVersion
is validated at workspace start with hardcoded value. However, it is not validated at workspace create with proper schema. It is mandatory string parameter, so basically any value is valid. To support beta versions, we need to validate devfile with proper schema andapiVersion
should be strictly validated.Describe the solution you'd like
When creating workspace from devfile, read
apiVersion
value from devfile and find matching schema to validate devfile. When schema for version not found, return error.Describe alternatives you've considered
apiVersion
. The solution seems sufficient for current needs.apiVersion
, we might want to have some default schema (1.0.0 probably) to validate. With this, we don't break already existing devfiles with invalid version (which is now basically ignored). However, having this will not force to fix invalid devfiles.Additional context
Issue was raised up during PreviewUrl feature implementation, where we are not sure about devfile specification and we want to introduce the feature in beta version of the devfile to not break stable devfile version in the future #13945 (comment from PR #14713 (comment))
The text was updated successfully, but these errors were encountered: