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

[META] Build a configuration-as-code test system to cover gaps in unit/integ testing #833

Open
3 of 6 tasks
dbwiddis opened this issue Aug 13, 2024 · 0 comments
Open
3 of 6 tasks
Assignees
Labels
enhancement New feature or request Meta

Comments

@dbwiddis
Copy link
Member

dbwiddis commented Aug 13, 2024

Is your feature request related to a problem?

This is a more specific plan to implement #795

Flow Framework templates are essentially a configuration-as-code implementation, conceptually not much different than sequencing method calls with the appropriate method/function names (workflow steps) and arguments (required and optional parameters).

Unit and integration tests cover the foundational elements of Flow Framework but are completely lacking in testing the templates themselves. Other than "sanity testing" templates when they are first written and spot checking each relesae, there is no automation to ensure that future changes to their implemented APIs don't break them (such as the addition of a new required parameter, which happened just before the 2.14.0 release).

While #651 can help mitigate some issues with specific APIs, it's the equivalent of "unit testing". In addition to that requirement, we need an equivalent of end-to-end "integration testing" of templates; validating that they execute all their workflow steps and pass the appropriate data to each other.

Further, we need to validate that the expected return values (including error status codes) match what users expect, and permit front-end developers to rely on a documented API to build applications around.

What solution would you like?

OpenSearch has recently migrated its API specification to the OpenAPI format, published at https://github.com/opensearch-project/opensearch-api-specification. As part of this specification, there is a robust testing framework and an open issue to document and test plugin specifications.

This framework is an ideal way to test our use case templates.

It's also a significant effort that needs to start small and build up to eventually reach the goal of fully testing all use case templates. Here are the steps that are needed to reach this goal:

What alternatives have you considered?

Continuing our manual sanity testing when first written, and our laborious bug fixing when we inevitably miss changes because we're human.

Do you have any additional context?

While this issue is focused on testing existing workflow steps and templates, the components built to enable this will also be extremely useful in expanding Flow Framework functionality in the future by allowing more generic execution of any documented OpenSearch API.

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

No branches or pull requests

2 participants