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

Create json schema for yaml configuration #5083

Closed
lecaros opened this issue Mar 15, 2022 · 15 comments
Closed

Create json schema for yaml configuration #5083

lecaros opened this issue Mar 15, 2022 · 15 comments
Assignees

Comments

@lecaros
Copy link
Contributor

lecaros commented Mar 15, 2022

Is your feature request related to a problem? Please describe.
IDEs can use JSON schemas to help users define their YAML configurations through completion.

Describe the solution you'd like
To have a JSON schema available either through public repo or published in https://www.schemastore.org.

@niedbalski
Copy link
Collaborator

@patrick-stephens please lets add the fluent-bit -J output to the nightly/unstable + released artefacts.

@patrick-stephens
Copy link
Contributor

In progress, should be ready once the automation is running correctly.

@patrick-stephens
Copy link
Contributor

This should be present in the release jobs now. It'll be in the S3 bucket @niedbalski but we could also copy to the packages server, although I'd say let's align with #5098 and stop duplicating things.

Re-open if you want it elsewhere.

@patrick-stephens
Copy link
Contributor

Manually deployed here:

Minor niggle in the S3 sync should be resolved by #5270

@ffflabs
Copy link

ffflabs commented Apr 25, 2022

Manually deployed here:

@patrick-stephens I used that schema to infer a json-schema compliant with draft 7. I believe schemastore would ask for that format.

https://calyptia-vite.ffflabs.com/fluentbit-jsonschema.json

@patrick-stephens
Copy link
Contributor

@ffflabs just checking that is a good thing right or do we need to do something else? Sorry, I'm not really an expert on schema store so just checking if there is more stuff that needs doing.

@henrysachs
Copy link

i couldn't find schemas for the latest releases. Did I miss something or did this get lost?

@patrick-stephens
Copy link
Contributor

They should be around somewhere but it has been a while - they're just generated from the build anyway via the -J parameter, e.g. docker run --rm -it fluent/fluent-bit -J

@patrick-stephens
Copy link
Contributor

patrick-stephens commented Aug 7, 2023

It is being generated:

docker run --rm -t ${{ inputs.registry }}/${{ inputs.image }}:${{ inputs.version }} -J > fluent-bit-schema-${{ inputs.version }}.json

We then push it to the bucket:

aws s3 sync "artifacts/" "s3://${AWS_S3_BUCKET}/${DEST_DIR}" --no-progress

That does ignore errors - older builds cannot support it - but it was sync'd: https://github.com/fluent/fluent-bit/actions/runs/5652281163/job/15354447347#step:4:11

I cannot see any specific filtering of it:

aws s3 sync release/ "s3://${{ secrets.AWS_S3_BUCKET_RELEASE_SOURCES }}" --delete --follow-symlinks --no-progress

My guess is some of the refactoring we have had to do elsewhere may have affected it.

@patrick-stephens
Copy link
Contributor

Ah, it is there: https://packages.fluentbit.io/2.1.8/
That's not the releases subdomain so that seems to be the change.
Please submit a PR to update the docs.

@henrysachs
Copy link

Okay thanks a lot for digging into this!

@henrysachs
Copy link

I'm not that deep into json schemas, but this version seems like a version of json schema other tools won't understand. How is this schema generated?

@patrick-stephens
Copy link
Contributor

I would raise a separate issue for problems with it @henrysachs. I don't really know how it is generated other than we invoke the -J option. No one else will see these comments so asking it here is probably not best!

@henrysachs
Copy link

okay owm :)

@JustinGrote
Copy link

I generated a schema here since @ffflabs is 404'd
#9289 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants