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

Validate dataset and namespace #57

Open
ruflin opened this issue Oct 12, 2020 · 2 comments
Open

Validate dataset and namespace #57

ruflin opened this issue Oct 12, 2020 · 2 comments
Labels
good first issue Good for newcomers Team:Ecosystem Label for the Packages Ecosystem team

Comments

@ruflin
Copy link
Contributor

ruflin commented Oct 12, 2020

dataset and namespace can only have a length of 100 chars and certain chars cannot be used. This should be validated. See elastic/kibana#75846 for more details.

@jsoriano
Copy link
Member

@ruflin @jen-huang not sure what should be validated from the spec regarding these values. I also wonder if something is needed, as the changes mentioned in the original issue seem to be in the configuration Fleet UI.

There are different things that could apply to this, but not sure about the scope:

In package-spec:

  • dataset setting in data stream manifest doesn't have any validation now, and it seems to be barely used, but we could check the length there.
  • type in data stream is already limited to certain values (metrics, logs, synthetics and traces)
  • There is no setting for namespace.

In elastic-package we could check the values of certain fields during testing, but which ones?

  • data_stream.type?
  • data_stream.dataset?
  • data_stream.namespace?

Are they actually related to what is checked in elastic/kibana#75381?

@ruflin
Copy link
Contributor Author

ruflin commented Sep 21, 2022

  • The data_stream.* fields are the ones that should be validate if these exist with a value in fields.yml.
  • As in most cases the directory name defines the dataset value, the directory name should be validated (likely already the case)
  • If the dataset field is used in the manifest.yml, it should be validate

Ideally it is also ensured, that the values in the fields and manifest are aligned and cannot contradict it each.

As you mentioned, namespace is not set at all on the package level and I currently can't think of a reason why it should so I would leave this to Kibana.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers Team:Ecosystem Label for the Packages Ecosystem team
Projects
None yet
Development

No branches or pull requests

2 participants