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 a validation check for configuration file. #80

Open
harshad16 opened this issue Nov 12, 2020 · 11 comments
Open

Create a validation check for configuration file. #80

harshad16 opened this issue Nov 12, 2020 · 11 comments
Labels
kind/feature Categorizes issue or PR as related to a new feature. lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness. priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete.

Comments

@harshad16
Copy link
Member

Is your feature request related to a problem? Please describe.
aicoe-ci should have a validation check on the configuration file, as mistakenly users can define the keys wrong in the configuration file, which may lead to erroneous development.

Describe the solution you'd like
YAML file validation is to be present in the pipeline, to check the .aicoe-ci.yaml file.

Describe alternatives you've considered
Leave it to the user to maintain the correct configuration file.

Additional context
operate-first/support#17

@tumido
Copy link
Member

tumido commented Nov 12, 2020

@harshad16 I was thinking about this overnight and I think this task can be extended a bit to cover much more if you'd be interested:

Instead of a bare check we can choose to generate a proper schema for .aicoe-ci.yaml

You can then choose to upload it to https://www.schemastore.org/ so it can be consumed by IDE linters yaml language server (for example in VS Code

To facilitate this CI check, the schema can be consumed by a pre-commit hook to do the validation. This can solve both local pre-commit runs as well as there's no need to create a special case pipeline in CI, the pre commit CI job would cover it.

Some resources:
pre-commit/pre-commit-hooks#71
adrienverge/yamllint#37
https://github.com/Grokzen/pykwalify
redhat-developer/yaml-language-server#106

@goern
Copy link
Member

goern commented Nov 12, 2020

/kind feature
/priority important-longterm

@sesheta sesheta added kind/feature Categorizes issue or PR as related to a new feature. priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete. labels Nov 12, 2020
@harshad16
Copy link
Member Author

thanks, @tumido for the suggestion, seems like a good approach. I will go over the resources your shared 👍
I was just thinking of a having check in the pipeline, so that if the user doesn't correct the configuration file, then the pipeline can prompt with an issue, that following key would cause issue while using the pipeline.

@anushkrishnav
Copy link

Can I join and work on this ?

@harshad16
Copy link
Member Author

Can I join and work on this ?

surely, welcome @anushkrishnav
we could definitely use more tekton pipelines knowledge.
have a look at the documentation and get started docs for the beginning
this requires some knowledge of openshift, tekton-pipeline/openshift-pipelines, and for this issue pre-commit
there are some easier issues, I will label them with good-first-issue if you would like to get started with that.

@anushkrishnav
Copy link

I would love to start with easier issues and go one to advanced ones

@sesheta
Copy link
Contributor

sesheta commented Jul 3, 2021

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

/lifecycle stale

@sesheta sesheta added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jul 3, 2021
@harshad16
Copy link
Member Author

/remove-lifecycle stale

@sesheta sesheta removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jul 6, 2021
@sesheta
Copy link
Contributor

sesheta commented Oct 16, 2021

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

/lifecycle stale

@sesheta sesheta added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Oct 16, 2021
@sesheta
Copy link
Contributor

sesheta commented Nov 15, 2021

Stale issues rot after 30d of inactivity.
Mark the issue as fresh with /remove-lifecycle rotten.
Rotten issues close after an additional 30d of inactivity.

If this issue is safe to close now please do so with /close.

/lifecycle rotten

@sesheta sesheta added lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels Nov 15, 2021
@harshad16
Copy link
Member Author

/lifecycle frozen

@sesheta sesheta added lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness. and removed lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. labels Nov 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature Categorizes issue or PR as related to a new feature. lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness. priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete.
Projects
None yet
Development

No branches or pull requests

5 participants