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

[Fleet] Integration testing with the registry #38598

Closed
jfsiii opened this issue Jun 10, 2019 · 7 comments
Closed

[Fleet] Integration testing with the registry #38598

jfsiii opened this issue Jun 10, 2019 · 7 comments
Labels
discuss Feature:EPM Fleet team's Elastic Package Manager (aka Integrations) project research Team:Fleet Team label for Observability Data Collection Fleet team technical debt Improvement of the software architecture and operational architecture

Comments

@jfsiii
Copy link
Contributor

jfsiii commented Jun 10, 2019

The Integrations Manager will have a client which communicates with the registry to fetch integration metadata and artifacts. With the Manager and Registry so tightly coupled, there should be some level of integration testing.

Since the Manager is the only way Kibana can install/remove integrations, it's incredibly important they stay in sync.

The registry publishes example responses which the Manager can use to confirm certain features. APM does something similar to watch their interface with ES.

Another option is for the Registry to publish machine readable info using a common format like JSON Schema or Open API (fka Swagger). I'm most familiar with Open API but I'd like to discuss either/both these options because they give us greater control, durability, and tooling.

There's a quick read with a good overview at https://apisyouwonthate.com/blog/json-api-openapi-and-json-schema-working-in-harmony

@jfsiii jfsiii added the Feature:EPM Fleet team's Elastic Package Manager (aka Integrations) project label Jun 10, 2019
@jfsiii
Copy link
Contributor Author

jfsiii commented Jun 10, 2019

https://spin.atomicobject.com/2018/03/26/typescript-data-validation/ has some more concrete examples/comparisons.

Coming back to the tooling advantages of JSON schema, if the registry used a golang package like https://github.com/mcuadros/go-jsonschema-generator to publish a JSON schema, the Manager could use an npm package like https://github.com/bcherny/json-schema-to-typescript to convert those to TypeScript interfaces

@ruflin
Copy link
Member

ruflin commented Jun 12, 2019

@kuisathaverat @mdelapenya I wonder if this is an effort one of you could help with.

@jfsiii jfsiii added the discuss label Jun 12, 2019
@jfsiii jfsiii changed the title [Integrations Manager] Discuss integration testing with the registry [Integrations Manager] Integration testing with the registry Jun 12, 2019
@mdelapenya
Copy link
Contributor

@ruflin just to understand the main goal here: the Integrations Manager's client must follow a contract, and we should check that the client adheres to that contract, right?

@ruflin
Copy link
Member

ruflin commented Jun 13, 2019

I think there are few levels to this:

  • Have actual integration tests running the registry and Kibana in parallel and execute some tasks to see if the it works as expected
  • Have a simple way in Kibana during development and unit testing to confirm that the code changes still work with the data from the registry.
  • Have a contract between the two expose as a schema and very in both test suites, that we still conform to it.

Long term I think we should do all three but the easiest one to get in would be 2. @jfsiii has also above a few proposals we could look at which can also have a positive effect on development.

I think especially for 1 we would need some help to set it up but I don't see this as urgent right now.

Let's continue using this issue to discussing what are the approaches we want to take and what tools we should use for it. I'm sure I also missed some more options in the list above.

@jfsiii jfsiii changed the title [Integrations Manager] Integration testing with the registry [IM] Integration testing with the registry Oct 9, 2019
@sgrodzicki sgrodzicki added the Team:Infra Monitoring UI - DEPRECATED DEPRECATED - Label for the Infra Monitoring UI team. Use Team:obs-ux-infra_services label Oct 21, 2019
@elasticmachine
Copy link
Contributor

Pinging @elastic/logs-metrics-ui (Team:logs-metrics-ui)

@jfsiii jfsiii changed the title [IM] Integration testing with the registry [EPM] Integration testing with the registry Oct 21, 2019
@jen-huang jen-huang added Team:Fleet Team label for Observability Data Collection Fleet team and removed Team:Infra Monitoring UI - DEPRECATED DEPRECATED - Label for the Infra Monitoring UI team. Use Team:obs-ux-infra_services labels Mar 26, 2020
@ruflin
Copy link
Member

ruflin commented Mar 30, 2020

@nchaulet This is related to running the docker registry for testing.

@jen-huang jen-huang changed the title [EPM] Integration testing with the registry [Fleet] Integration testing with the registry Apr 28, 2021
@jen-huang jen-huang added technical debt Improvement of the software architecture and operational architecture research labels Apr 28, 2021
@jen-huang
Copy link
Contributor

I don't think this issue is relevant any more, we have been using dockerized package registry in our integration tests for a long time now.

@jen-huang jen-huang closed this as not planned Won't fix, can't repro, duplicate, stale Apr 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discuss Feature:EPM Fleet team's Elastic Package Manager (aka Integrations) project research Team:Fleet Team label for Observability Data Collection Fleet team technical debt Improvement of the software architecture and operational architecture
Projects
None yet
Development

No branches or pull requests

7 participants