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

Formalize and define schema for devfile registry index (index.json) #135

Closed
johnmcollier opened this issue Sep 24, 2020 · 6 comments
Closed
Assignees
Labels
area/registry Devfile registry for stacks and infrastructure

Comments

@johnmcollier
Copy link
Member

johnmcollier commented Sep 24, 2020

Currently, devfile registries host an index.json file that contains the registry index and the devfiles it contains, partially built from each devfile's meta.yaml.

[
  {
    "name": "java-maven",
    "displayName": "Maven Java",
    "description": "Upstream Maven and OpenJDK 11",
    "tags": [
      "Java",
      "Maven"
    ],
    "projectType": "maven",
    "language": "java",
    "links": {
      "self": "/devfiles/java-maven/devfile.yaml"
    }
  }
]

Devfile consumers such as Odo or Che then parse this file when looking for devfiles in a given registry.

However the schema for the index.json file is not formally defined anywhere, nor is there a list of which fields are required vs. optional. Additionally, Che and Odo both use different generators to create the index.json (see Che and Odo).

We should formally define the schema for the index.json file, as well as capture any changes to the schema discussed on here in the past few months. This will ensure consistency across the board for devfile registries and devfile consumers.

List of agreed-upon index.json changes:

Other agreed-upon devfile metadata changes that may be relevant:

Registry index file generator:
This item also includes the implementation of the registry index file (index.json) generator that is used for generating the registry index file for storing the catalog and metadata of stacks/devfiles in the registry.

@johnmcollier
Copy link
Member Author

Some other things to consider:

  1. How/if moving to OCI registries will impact the index.json (and how the index.json is built)
  2. Moving to one, consistent generator to build the index.json file

@GeekArthur
Copy link
Contributor

Probably we need to open a separate issue for registry index file generator, but given the design of OCI registry is not finalized, not sure how we would like to proceed it as the generator may change with the registry migrates to OCI-based registry.

@GeekArthur
Copy link
Contributor

GeekArthur commented Oct 2, 2020

Based on the discussion, we decide to still use our own index file instead of OCI index file. Given there is no strong relation between index file and devfile artifact manifest file, so I think we can still use each devfile's meta.yaml to generate the index file.

@GeekArthur GeekArthur self-assigned this Oct 2, 2020
@GeekArthur GeekArthur added the area/registry Devfile registry for stacks and infrastructure label Oct 2, 2020
@GeekArthur
Copy link
Contributor

The index generator POC has been pushed to https://github.com/devfile/registry-support/tree/index-generator. One thing we need to discuss on Cabal call is whether we need to merge meta.yaml and devfile.yaml or not.

@GeekArthur
Copy link
Contributor

Issue is open for discussion regarding merge meta.yaml and devfile.yaml: #172

@elsony elsony changed the title Formalize and define schema for devfile registry metadata (index.json) Formalize and define schema for devfile registry index (index.json) Oct 26, 2020
@GeekArthur
Copy link
Contributor

Last sub-issue #172 is done, close this issue.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/registry Devfile registry for stacks and infrastructure
Projects
None yet
Development

No branches or pull requests

2 participants