Repository navigation
Conversation
FargateCapacityProvisioned logged that it could not parse the CapacityProvisioned annotation, then indexed the empty match anyway and panicked with index out of range. Signed-off-by: Lucas Barros <lucasbarros.kam@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pod.FargateCapacityProvisionedlogsunable to parse ... for fargate provisioner capacitywhen theCapacityProvisionedannotation does not match<n>vCPU <n>GB, but it does not return there. It goes on to readmatch[1]from the empty match and panics:Node.InstanceType()and the Fargate pricing lookup call it for every single-pod Fargate node, so one pod with an unexpected value in that annotation takes the whole viewer down instead of showing the node as plainFargate.The fix returns
0, 0, falseafter the log line, like the twoParseFloaterror paths below it already do.Test:
TestFargateCapacityUnparsableinpkg/model/pod_test.go. It panics on main and passes with the change.