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

Rename directories to not contain - in packages #150

Closed
ruflin opened this issue Jul 2, 2020 · 7 comments
Closed

Rename directories to not contain - in packages #150

ruflin opened this issue Jul 2, 2020 · 7 comments

Comments

@ruflin
Copy link
Member

ruflin commented Jul 2, 2020

To unify the naming of all directories and configs, only _ are used moving forward. This means the ingest-pipeline directories must be renamed to ingest_pipeline. In the package storage this was already done by duplicating the directories: elastic/package-storage#108 Adjustments to Kibana are here: elastic/kibana#70320

I wanted now to adjust it in integrations repository. Copying the directories / renaming is easy, here is a leftover script: https://github.com/elastic/package-storage/blob/master/packages/main.go But it was unclear to me where it happens in the generation code. It seems it already takes the name from the Beat as I couldn't find ingest-pipeline directory creation in the code.

@mtojek
Copy link
Contributor

mtojek commented Jul 2, 2020

But it was unclear to me where it happens in the generation code. It seems it already takes the name from the Beat as I couldn't find ingest-pipeline directory creation in the code.

https://github.com/elastic/integrations/blob/master/dev/import-beats/packages.go#L328

@ruflin
Copy link
Member Author

ruflin commented Jul 2, 2020

@mtojek Glad you pointed me to this. Seems like this one went missing during the renaming. Lets get in elastic/package-registry#581 first then.

@ruflin
Copy link
Member Author

ruflin commented Jul 2, 2020

I filed #153 as draft so we can continue the work as soon as the registry is changed.

@mtojek
Copy link
Contributor

mtojek commented Aug 31, 2020

@ruflin can we close this issue?

@ruflin
Copy link
Member Author

ruflin commented Aug 31, 2020

@mtojek Yes.

@ycombinator Could we make sure this is "enforced" also in the package spec somehow for all directories?

@ruflin ruflin closed this as completed Aug 31, 2020
@ycombinator
Copy link
Contributor

ycombinator commented Aug 31, 2020

I just checked the 1.0 spec and this is already enforced.

$ git grep -A1 "type: folder"
dataset/_dev/spec.yml:      type: folder
dataset/_dev/spec.yml-      name: test
--
dataset/_dev/test/spec.yml:      type: folder
dataset/_dev/test/spec.yml-      name: pipeline
--
dataset/spec.yml:    type: folder
dataset/spec.yml-    pattern: '[a-z0-9][a-z0-9_]+[a-z0-9]'
--
dataset/spec.yml:      type: folder
dataset/spec.yml-      name: fields
--
dataset/spec.yml:      type: folder
dataset/spec.yml-      name: agent
--
dataset/spec.yml:        type: folder
dataset/spec.yml-        name: stream
--
dataset/spec.yml:      type: folder
dataset/spec.yml-      name: elasticsearch
--
dataset/spec.yml:        type: folder
dataset/spec.yml-        name: ingest_pipeline
--
dataset/spec.yml:      type: folder
dataset/spec.yml-      name: "test"
--
dataset/spec.yml:      type: folder
dataset/spec.yml-      name: _dev
--
kibana/spec.yml:      type: folder
kibana/spec.yml-      name: dashboard
--
kibana/spec.yml:      type: folder
kibana/spec.yml-      name: visualization
--
kibana/spec.yml:      type: folder
kibana/spec.yml-      name: search
--
kibana/spec.yml:      type: folder
kibana/spec.yml-      name: map
--
kibana/spec.yml:      type: folder
kibana/spec.yml-      name: "index_pattern"
--
spec.yml:    type: folder
spec.yml-    name: dataset
--
spec.yml:    type: folder
spec.yml-    name: docs
--
spec.yml:    type: folder
spec.yml-    name: kibana

Or if you prefer GitHub references:

@ruflin
Copy link
Member Author

ruflin commented Sep 1, 2020

@ycombinator As usual, you are a step ahead 🎉

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

No branches or pull requests

3 participants