Skip to content

splunk_indexes type fixes#117

Open
micahkemp-splunk wants to merge 7 commits into
masterfrom
index-fixes
Open

splunk_indexes type fixes#117
micahkemp-splunk wants to merge 7 commits into
masterfrom
index-fixes

Conversation

@micahkemp-splunk

@micahkemp-splunk micahkemp-splunk commented Apr 25, 2022

Copy link
Copy Markdown
Contributor

This PR updates the splunk_indexes resource to use the proper types, as defined by what is returned by the Splunk REST API.

While the REST documentation states that bucketRebuildMemoryHint and repFactor can be set by string value, they are always returned by the REST API as integers.

Additionally, repFactor is returned as 0 when the index is configured for both repFactor = 0 and repFactor = auto, making it impossible to differentiate between the two configured values. Because of this failure, and because that setting is only really valid on clustered indexes which should be configured by the Indexer Cluster Manager anyway, I've deprecated repFactor.

These failures went unnoticed because JSON unmarshaling errors were ignored. The first commit in this PR handles errors returned when unmarshaling Index data, which otherwise triggers failing tests.

The CHANGELOG update bumps the version of the provider by a minor version, because there are some (minor) breaking changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants