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

Option accepting multiple topic spec yaml files in one run #69

Closed
gschmutz opened this issue Dec 30, 2021 · 3 comments
Closed

Option accepting multiple topic spec yaml files in one run #69

gschmutz opened this issue Dec 30, 2021 · 3 comments
Labels
enhancement New feature or request

Comments

@gschmutz
Copy link
Contributor

Is your feature request related to a problem? Please describe.

I'm in the process of including jikkou in a docker-compse.yml environment (generated using Platys) in a way that it just runs once at the beginning when the stack is started and whenever a docker-compose up -d is done. For that it would be nice if muliple topic-specs.yml file could be used in one run of jikkou.

Describe the solution you'd like
It would be nice if we could pass a pattern instead of a hard-coded file path. So all files matching the file pattern would be read and used for the run.

Describe alternatives you've considered
n.a.

Additional context
n.a.

@gschmutz gschmutz added the enhancement New feature or request label Dec 30, 2021
@fhussonnois
Copy link
Member

fhussonnois commented Jan 4, 2022

Hi @gschmutz, thank you for this improvement proposal. Currently, we are facing the same need on my actual project.

Basically, the file-path and file-url CLI args will be removed and replaced with :

  • file-name: a glob or regex pattern to specifiy filenames (i.e., the base file name with the leading directories removed).
  • files: a base directory used for searching files that match the given pattern, a list of files or urls.

Example :

$ jikkou  validate --files ./files/ --file-name "**/*.yaml"

// or
$ jikkou  validate --files ./files/ --file-name "regex:.*\.yaml"

// or
$ jikkou  validate  --files ./files/kafka-specs-topics_01.yaml ./files/kafka-specs-topics_02.yaml

Note that all files will be processed sequentially, which means that the actual state of the cluster will be retrieved for each file. But, we could also imagine to merge, for example, all the topics of all the files to apply the changes at once.

fhussonnois added a commit that referenced this issue Jan 11, 2022
This commit adds new CLI args:
* --files: to specify spec in a YAML file, a directory or an URL
* --file-names: to specify a pattern

Breaking changes:
* CLI args, file-pattern and file-url was removed
@fhussonnois
Copy link
Member

Hi @gschmutz, Jikkou 0.9.0 is available. This new release adds support for multiple YAML files as described in my previous comment.

@gschmutz
Copy link
Contributor Author

gschmutz commented Feb 2, 2022

@fhussonnois thanks a lot, will try it in the comming days! Very nice!

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

No branches or pull requests

2 participants