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

Add ISM Policy #524

Merged
merged 13 commits into from
Apr 16, 2024
Merged

Add ISM Policy #524

merged 13 commits into from
Apr 16, 2024

Conversation

Jakob3xD
Copy link
Collaborator

Description

  • add ISM Policy

Issues Resolved

Closes #74

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

Copy link

codecov bot commented Apr 11, 2024

Codecov Report

Attention: Patch coverage is 91.69811% with 22 lines in your changes are missing coverage. Please review.

Project coverage is 66.99%. Comparing base (06a6dc8) to head (d459477).
Report is 9 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #524      +/-   ##
==========================================
+ Coverage   57.29%   66.99%   +9.70%     
==========================================
  Files         315      376      +61     
  Lines        9823     8850     -973     
==========================================
+ Hits         5628     5929     +301     
+ Misses       2902     1599    -1303     
- Partials     1293     1322      +29     
Flag Coverage Δ
integration 60.53% <91.69%> (+9.69%) ⬆️
unit 81.64% <ø> (+68.79%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
opensearchapi/api_nodes-stats.go 100.00% <ø> (ø)
plugins/ism/api_explain-params.go 100.00% <100.00%> (ø)
plugins/ism/api_policies-delete.go 100.00% <100.00%> (ø)
plugins/ism/api_policies-get.go 100.00% <100.00%> (ø)
plugins/ism/api_policies-put-params.go 100.00% <100.00%> (ø)
plugins/ism/api_policies.go 100.00% <100.00%> (ø)
plugins/ism/api_remove.go 100.00% <100.00%> (ø)
plugins/ism/api_add.go 92.85% <92.85%> (ø)
plugins/ism/api_change.go 92.85% <92.85%> (ø)
plugins/ism/api_policies-put.go 84.61% <84.61%> (ø)
... and 3 more

... and 249 files with indirect coverage changes

@Jakob3xD Jakob3xD force-pushed the jh-ism branch 3 times, most recently from acf7f0a to 738024f Compare April 12, 2024 11:37
@Jakob3xD Jakob3xD marked this pull request as ready for review April 12, 2024 11:49
dblock
dblock previously approved these changes Apr 12, 2024
Copy link
Member

@dblock dblock left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, not sure about that delete below.

I really think you should look into code generation.

internal/test/helper.go Outdated Show resolved Hide resolved
plugins/ism/api_test.go Outdated Show resolved Hide resolved
Copy link
Member

@dblock dblock left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's get rid of the skip (#524 (comment)) and replace it with something explicit?

Signed-off-by: Jakob Hahn <jakob.hahn@hetzner.com>
Signed-off-by: Jakob Hahn <jakob.hahn@hetzner.com>
Signed-off-by: Jakob Hahn <jakob.hahn@hetzner.com>
Signed-off-by: Jakob Hahn <jakob.hahn@hetzner.com>
Signed-off-by: Jakob Hahn <jakob.hahn@hetzner.com>
Signed-off-by: Jakob Hahn <jakob.hahn@hetzner.com>
Signed-off-by: Jakob Hahn <jakob.hahn@hetzner.com>
Signed-off-by: Jakob Hahn <jakob.hahn@hetzner.com>
Signed-off-by: Jakob Hahn <jakob.hahn@hetzner.com>
Signed-off-by: Jakob Hahn <jakob.hahn@hetzner.com>
Signed-off-by: Jakob Hahn <jakob.hahn@hetzner.com>
Signed-off-by: Jakob Hahn <jakob.hahn@hetzner.com>
Signed-off-by: Jakob Hahn <jakob.hahn@hetzner.com>
Copy link
Member

@dblock dblock left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is much butter, and you can merge as is if you want.

That said, I think the level of indirection of unreleased -> testintegpath is making it unnecessarily complicated. Why not just pass an optional test integ path?

make test-integ race=true testintegpath="./opensearchapi/..."

This still wouldn't convey the semantics of what we're trying to say, which is that when plugins are installed we want to run integration tests for plugins. I'd expect to be able to do this:

make test-integ // runs all, default, for developers
make test-integ-min // tests for a min distribution of OpenSearch (runs in all)
make test-integ-plugins // tests for plugins, does not include -min (runs in all except unreleased)

or with paths

make test-integ path=tests // runs all, default, for developers
make test-integ path=tests/min // tests for a min distribution of OpenSearch (runs in all)
make test-integ path=tests/plugins // tests for plugins, does not include -min (runs in all except unreleased)

(Please tell me if I am annoying ;))

@Jakob3xD
Copy link
Collaborator Author

Merging it but I will create a follow up PR for the testing stuff.

@Jakob3xD Jakob3xD merged commit 9dd0dab into opensearch-project:main Apr 16, 2024
53 checks passed
@Jakob3xD Jakob3xD deleted the jh-ism branch April 16, 2024 10:00
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.

[FEATURE] Types for ISM in opensearchapi
2 participants