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

splunk_indexes type fixes #117

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open

splunk_indexes type fixes #117

wants to merge 7 commits into from

Conversation

micahkemp-splunk
Copy link
Contributor

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

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