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 max_primary_shard_docs condition to ILM rollover #845

Merged
merged 3 commits into from
Jan 15, 2025

Conversation

arenard
Copy link
Contributor

@arenard arenard commented Oct 15, 2024

Copy link

cla-checker-service bot commented Oct 15, 2024

💚 CLA has been signed

arenard pushed a commit to arenard/terraform-provider-elasticstack that referenced this pull request Oct 15, 2024
* Add `max_primary_shard_docs` condition to rollover

* Update test for rollover `max_primary_shard_docs` condition

* Specify min version in the description

* Update CHANGELOG.md
@arenard arenard force-pushed the add-ilm-rollover-max-primary-shard-docs branch from eaf341f to f16e3b4 Compare October 15, 2024 09:51
"priority": {skipEmptyCheck: true},
"max_primary_shard_docs": {minVersion: version.Must(version.NewVersion("8.2.0"))},
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I am not sure about what should be put there as this property is optional. Maybe a skipEmptyCheck should be added there.

Copy link
Member

Choose a reason for hiding this comment

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

I think this should be fine, skipEmptyCheck is around dealing with how the TF SDK represents unset attributes as Golang zero values.

arenard pushed a commit to arenard/terraform-provider-elasticstack that referenced this pull request Oct 15, 2024
* Add `max_primary_shard_docs` condition to rollover

* Update test for rollover `max_primary_shard_docs` condition

* Specify min version in the description

* Update CHANGELOG.md
@arenard arenard force-pushed the add-ilm-rollover-max-primary-shard-docs branch from f16e3b4 to b97f1c7 Compare October 15, 2024 12:26
arenard pushed a commit to arenard/terraform-provider-elasticstack that referenced this pull request Oct 15, 2024
* Add `max_primary_shard_docs` condition to rollover

* Update test for rollover `max_primary_shard_docs` condition

* Specify min version in the description

* Update CHANGELOG.md
@arenard arenard force-pushed the add-ilm-rollover-max-primary-shard-docs branch from b97f1c7 to 3136fbc Compare October 15, 2024 12:41
Copy link
Member

@tobio tobio left a comment

Choose a reason for hiding this comment

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

Thanks for adding this in, we'll want to update the tests to only cover this attribute when it's supported.

@@ -273,12 +274,13 @@ resource "elasticstack_elasticsearch_index_lifecycle" "test_rollover" {
max_age = "7d"
max_docs = 10000
max_size = "100gb"
max_primary_shard_docs = 5000
Copy link
Member

Choose a reason for hiding this comment

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

We'll want to update the tests to only specify this when it's supported by the backing cluster. That means adding a case covering this attribute which is skipped when it's not supported (example)

tobio added 3 commits January 15, 2025 12:06
* Add `max_primary_shard_docs` condition to rollover

* Update test for rollover `max_primary_shard_docs` condition

* Specify min version in the description

* Update CHANGELOG.md
@tobio tobio force-pushed the add-ilm-rollover-max-primary-shard-docs branch from 3e169ec to 2430e93 Compare January 15, 2025 01:06
@tobio tobio merged commit 75844f0 into elastic:main Jan 15, 2025
22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants