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

[Ingest Manager] Refactor Datasource create/edit forms to recognize and support the package's solution field to drive displaying a custom UI for configuration #67939

Closed
paul-tavares opened this issue Jun 2, 2020 · 15 comments
Assignees
Labels
Team:Fleet Team label for Observability Data Collection Fleet team

Comments

@paul-tavares
Copy link
Contributor

The Package definition seems to now support defining a flag named solution on a Datasource whose purpose is to instruct the Kibana UI that a custom UI should be displayed. See Endpoint definition here:

https://github.com/elastic/package-storage/blob/master/packages/endpoint/0.1.0/manifest.yml#L23

datasources:
  - name: endpoint
    title: Endpoint data source
    description: Interact with the endpoint.

    # This tells the UI that for configuration, it must link to a specific solution
    # Only solution packages can contain this field.
    solution: endpoint

The Kibana Ingest Manager creation and editing of Datasources should be refactored to now process based on this flag being set to a know value.

(see this PR comment for reference)

@paul-tavares paul-tavares added the Team:Fleet Team label for Observability Data Collection Fleet team label Jun 2, 2020
@elasticmachine
Copy link
Contributor

Pinging @elastic/ingest-management (Team:Ingest Management)

@paul-tavares
Copy link
Contributor Author

We should verify that flag is in fact valid - I also did not realize it existed until recently when i looked at this file.

/cc: @jen-huang , @ruflin

@ph
Copy link
Contributor

ph commented Jun 2, 2020

@paul-tavares I've looked and searched through the code I don't know where this field is coming from, I thought we initially wanted to hardcoded the special UI based on the package type but if we can make it work without too much effort with a cleaner field lets do it.

@ruflin I having the "solution" at the datasource level in the package would work?

@paul-tavares
Copy link
Contributor Author

paul-tavares commented Jun 2, 2020 via email

@ruflin
Copy link
Member

ruflin commented Jun 3, 2020

The field was added having Uptime, APM in mind. But TBH it potentially makes more sense to hardcode it instead in Kibana. The reason is that for example lets say the of Endpoint link changes in 7.10 but the old packages are still around. As the Endpoint UI and Ingest Management UI are always on the same version, it might be simpler to just hardcode it there and remove it again from the package info.

@jen-huang
Copy link
Contributor

As the Endpoint UI and Ingest Management UI are always on the same version, it might be simpler to just hardcode it there and remove it again from the package info.

I think that is still doable while still utilizing this solution field. The value of solution will just act as a flag to know whether a certain package is a custom solution. The implementation details of what the custom solution displays/links to is separate from the value.

@jen-huang
Copy link
Contributor

I will work on this after #67234 is merged.

@jen-huang jen-huang self-assigned this Jun 3, 2020
@ruflin
Copy link
Member

ruflin commented Jun 4, 2020

@jen-huang Does this mean the flag should more become a bool?

@jen-huang
Copy link
Contributor

@jen-huang Does this mean the flag should more become a bool?

I don't feel strongly about this. If we leave it as a string, then we can potentially point multiple packages to the same solution, but I'm not sure if that's a realistic use case. Thoughts?

@ruflin
Copy link
Member

ruflin commented Jun 8, 2020

Taking a step back: How does a "custom" solution hooking into our configuration building? If I remember our conversation correctly, there is a place the solution can register itself and request a callback. Lets assume we have a package foo. So far we built the UI based on the manifest. But in the next Kibana release there is no a UI for the package foo. What would happen, is that this UI now registers in the Ingest Manager to be the one called for the package foo. The package itself did not have to know, that it has now a dedicated UI. If the above is correct, I'm wondering if we even need a bool?

@jen-huang
Copy link
Contributor

If the above is correct, I'm wondering if we even need a bool?

The logic you describe correct. If we feel that solutions registering themselves in the UI is good enough without the additional safeguard/check on the package manifest, then we can do away with the solution field entirely.

@ruflin
Copy link
Member

ruflin commented Jun 10, 2020

This is my preference at the moment and we introduce the solution field if we need safeguards later on.

Do we rely somehow on the solution field today or can it be just removed? @jen-huang @paul-tavares

ruflin added a commit to ruflin/package-registry that referenced this issue Jun 10, 2020
Based on the discussion in elastic/kibana#67939 it seems like we do not need the solution entry in the manifest. This removes it.
@ruflin
Copy link
Member

ruflin commented Jun 10, 2020

I opened elastic/package-registry#504 on the registry side.

@paul-tavares
Copy link
Contributor Author

paul-tavares commented Jun 10, 2020 via email

@jen-huang
Copy link
Contributor

Closing this as we don't need to do anything on Kibana side now.

ruflin added a commit to elastic/package-registry that referenced this issue Jun 11, 2020
Based on the discussion in elastic/kibana#67939 it seems like we do not need the solution entry in the manifest. This removes it.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Team:Fleet Team label for Observability Data Collection Fleet team
Projects
None yet
Development

No branches or pull requests

5 participants