chore(wrapper): removed viper os fallback due to underlying update#2896
chore(wrapper): removed viper os fallback due to underlying update#2896bxrne wants to merge 1 commit intokubernetes:mainfrom
Conversation
the error handling issue was resolved in v1.2.0
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: bxrne The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
This issue is currently awaiting triage. If kube-state-metrics contributors determine this is a relevant issue, they will accept it by applying the The DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
|
@bhope: The label(s) DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
|
In KSM we pin to viper v1.21.0. That viper release was cut in Sept 2025 and does not have the fix you are referring to (spf13/viper#2027 ). Unfortunately, we would have to wait until we pin to newer viper release that has that fix (which at the moment there isn't). /hold |
What this PR does / why we need it:
This PR removes a workaround in
internal/wrapper.gothat was added to handle a bug in viper'sConfigFileNotFoundError(see viper#1783). The workaround usedos.Statas a fallback to check if a config file exists when viper failed to detect it.Since the viper issue has been resolved, this workaround is no longer needed and can be removed.
Changes made:
os.Statfallback for main config file and for custom resource config fileHow does this change affect the cardinality of KSM: (increases, decreases or does not change cardinality)
Does not change cardinality - this is a code cleanup with no functional changes, but is in hot path.
Which issue(s) this PR fixes:
#2895