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

[dev experience] unclobbering metrics tests #10747

Conversation

aaxelb
Copy link
Contributor

@aaxelb aaxelb commented Sep 10, 2024

Purpose

when running tests that use elasticsearch-metrics, the test setup/teardown clobbers all existing indexes and index templates in the local environment, which is surprising and annoying when those indexes have been set up and populated with data

Changes

  • rename the custom es pytest marker to es_metrics (for clarity)
  • update the effect of that marker:
    • patch a prefix to each metric class's index and template names
    • instead of deleting ALL indexes and index templates, delete only those with the patched prefix

QA Notes

Please make verification statements inspired by your code and what your code touches.

  • Verify
  • Verify

What are the areas of risk?

Any concerns/considerations/questions that development raised?

Documentation

Side Effects

Ticket

- rename the `es` pytest marker to `es_metrics` (for clarity)
- update the effect of that marker:
    - patch a prefix to each metric class's index and template names
    - instead of deleting ALL indexes and index templates, delete only
      those with the patched prefix
@aaxelb aaxelb force-pushed the fix/unclobbering-metrics-tests branch from acb4f3b to 6d33ade Compare September 10, 2024 21:38
@aaxelb
Copy link
Contributor Author

aaxelb commented Sep 10, 2024

cherry-picked into #10742

@aaxelb aaxelb closed this Sep 10, 2024
@aaxelb aaxelb deleted the fix/unclobbering-metrics-tests branch September 10, 2024 22:18
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

Successfully merging this pull request may close these issues.

1 participant