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

Publish yaml schema in schemastore #2110

Closed
tholor opened this issue Feb 2, 2022 · 7 comments
Closed

Publish yaml schema in schemastore #2110

tholor opened this issue Feb 2, 2022 · 7 comments
Assignees
Labels
topic:pipeline type:feature New feature or request

Comments

@tholor
Copy link
Member

tholor commented Feb 2, 2022

After we created a YAML schema in #2020, we need to do the next step and publish it to the schema store so that it is easily accessible for everyone.

From the PR:

[...] This is because the schemas from the JSON Schema Store depend on that. for example *.haystack-pipeline.yml.
Define the URL that should store the JSON Schemas, probably something like: https://haystack.deepset.ai/json-schemas/haystack-pipeline.0.7.schema.json
Make the PR(s) to JSON Schema Store including the definition for Haystack's pipeline JSON Schema.

Steps:

@ZanSara
Copy link
Contributor

ZanSara commented Feb 17, 2022

Commit that will be send as a PR to Schemastore: ZanSara/schemastore@e58529e

In this commit I set the naming pattern for Haystack pipelines to be *.haystack-pipeline.yml, and assume that versioning is going to work as defined in #2209.

We would need a GH Action that automatically sends a PR to Schemastore at every Haystack release, or add it to the checklist of things to do manually at every release. @julian-risch what do you think is best here?

@julian-risch
Copy link
Member

I had a look at other PRs in Schemastore. Looks like all of them are manual PRs even if the only make changes to url and versions, e.g. with the next release we would have:

"url": "https://raw.githubusercontent.com/deepset-ai/haystack/master/json-schemas/haystack-pipeline-1.2.0.schema.json",
      "versions": {
        "1.1.0": "https://raw.githubusercontent.com/deepset-ai/haystack/master/json-schemas/haystack-pipeline-1.1.0.schema.json"
        "1.2.0": "https://raw.githubusercontent.com/deepset-ai/haystack/master/json-schemas/haystack-pipeline-1.2.0.schema.json"
      }

I see that our GitHub actions automatically generate the schema file like haystack-pipeline-1.2.0.schema.json with the help of generate_json_schema.py, which is great. Automation of the PR to Schemastore would be nice of course but I don't see it as a priority at the moment. I'd say let's do the next release manually, so please add it to the checklist. Simplification of the release process would be needed much more for the documentation website. Happy to show you next week if you're interested.

@ZanSara
Copy link
Contributor

ZanSara commented Feb 17, 2022

Ok, let's keep it manual for now (not like it's a complex task anyway 😄) I'll add this step to the release checklist.

I'd love to see how the release is carried out, so count me in for next week's!

@ZanSara
Copy link
Contributor

ZanSara commented Feb 17, 2022

PR on Schemastore: SchemaStore/schemastore#2090

@GerryFerdinandus
Copy link

More info about versioning on SchemaStore. You can handle it on your side. You already have version: "" build in your yaml file.

@ZanSara
Copy link
Contributor

ZanSara commented Feb 21, 2022

@julian-risch I'll restructure the PR as suggested by @GerryFerdinandus in the link. In this way I can probably automate the entire release of the new YAML schemas without the need to manually submit PRs to Schemastore at every release, which saves our and their time.

@julian-risch
Copy link
Member

@ZanSara that would be awesome! 🤩

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic:pipeline type:feature New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants