From 6b3aa32e20a3b6447cf0727dceb49d548496b09d Mon Sep 17 00:00:00 2001 From: Tidhar Klein Orbach Date: Mon, 8 Apr 2024 13:05:12 +0300 Subject: [PATCH] Fix 7244 error targets page (#7245) * added UNKNOWN to TargetHealth_value at targets proto Signed-off-by: Tidhar Klein Orbach * added TargetHealth_value UNKNOWN to rpc.pb.go Signed-off-by: Tidhar Klein Orbach --------- Signed-off-by: Tidhar Klein Orbach --- CHANGELOG.md | 1 + pkg/targets/targetspb/rpc.pb.go | 101 ++++++++++++++++---------------- pkg/targets/targetspb/rpc.proto | 1 + 3 files changed, 54 insertions(+), 49 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ff8f8bdf39..1f655666e4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,6 +19,7 @@ We use *breaking :warning:* to mark changes that are not backward compatible (re - [#7122](https://github.com/thanos-io/thanos/pull/7122) Store Gateway: Fix lazy expanded postings estimate base cardinality using posting group with remove keys. - [#7224](https://github.com/thanos-io/thanos/pull/7224) Query-frontend: Add Redis username to the client configuration. - [#7220](https://github.com/thanos-io/thanos/pull/7220) Store Gateway: Fix lazy expanded postings caching partial expanded postings and bug of estimating remove postings with non existent value. Added `PromQLSmith` based fuzz test to improve correctness. +- [#7244](https://github.com/thanos-io/thanos/pull/7244) Query: Fix Internal Server Error unknown targetHealth: "unknown" when trying to open the targets page. ### Added diff --git a/pkg/targets/targetspb/rpc.pb.go b/pkg/targets/targetspb/rpc.pb.go index da33a07575..5344c1905e 100644 --- a/pkg/targets/targetspb/rpc.pb.go +++ b/pkg/targets/targetspb/rpc.pb.go @@ -39,18 +39,21 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package type TargetHealth int32 const ( - TargetHealth_DOWN TargetHealth = 0 - TargetHealth_UP TargetHealth = 1 + TargetHealth_DOWN TargetHealth = 0 + TargetHealth_UP TargetHealth = 1 + TargetHealth_UNKNOWN TargetHealth = 2 ) var TargetHealth_name = map[int32]string{ 0: "DOWN", 1: "UP", + 2: "UNKNOWN", } var TargetHealth_value = map[string]int32{ - "DOWN": 0, - "UP": 1, + "DOWN": 0, + "UP": 1, + "UNKNOWN": 2, } func (x TargetHealth) String() string { @@ -347,51 +350,51 @@ func init() { func init() { proto.RegisterFile("targets/targetspb/rpc.proto", fileDescriptor_b5cdaee03579e907) } var fileDescriptor_b5cdaee03579e907 = []byte{ - // 694 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x54, 0x41, 0x4f, 0xdb, 0x4a, - 0x10, 0xb6, 0x03, 0x38, 0x64, 0x80, 0xbc, 0xb0, 0xe2, 0x81, 0xc9, 0x7b, 0x8a, 0x51, 0x2e, 0x8f, - 0xd7, 0x4a, 0x4e, 0x15, 0x2e, 0xad, 0xd4, 0x0b, 0x6e, 0x68, 0xa9, 0xd4, 0x42, 0xba, 0x09, 0x45, - 0xa5, 0x07, 0xb4, 0x49, 0xb6, 0x4e, 0x24, 0x93, 0x75, 0x77, 0x37, 0x54, 0xfc, 0x0b, 0xfe, 0x49, - 0x0f, 0xfd, 0x13, 0x1c, 0x7a, 0xe0, 0xd8, 0x93, 0xdb, 0xc2, 0x2d, 0xbf, 0xa2, 0xf2, 0xda, 0x8e, - 0x1d, 0x48, 0x8f, 0xbd, 0x78, 0x67, 0xbe, 0xf9, 0xe6, 0x9b, 0x59, 0xef, 0xce, 0xc2, 0x3f, 0x92, - 0x70, 0x97, 0x4a, 0x51, 0x8b, 0x57, 0xbf, 0x53, 0xe3, 0x7e, 0xd7, 0xf6, 0x39, 0x93, 0x0c, 0x19, - 0xb2, 0x4f, 0x86, 0x4c, 0x94, 0x37, 0x85, 0x64, 0x9c, 0xd6, 0xd4, 0xd7, 0xef, 0xd4, 0xe4, 0x85, - 0x4f, 0x45, 0x44, 0x29, 0xaf, 0xb9, 0xcc, 0x65, 0xca, 0xac, 0x85, 0x56, 0x8c, 0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2c, 0x82, 0xc1, 0xa9, 0x18, 0x79, 0xb2, 0xfa, 0x45, 0x4f, 0xca, 0x4d, 0x44, - 0xd0, 0x6b, 0x58, 0x21, 0x5d, 0x39, 0x38, 0xa7, 0xed, 0x49, 0xd1, 0xb9, 0xed, 0xa5, 0xfa, 0x5a, - 0x52, 0x74, 0x37, 0x13, 0x74, 0x56, 0xc7, 0x81, 0x35, 0x4d, 0xc7, 0xd3, 0x2e, 0x7a, 0x03, 0xc5, - 0x1e, 0x67, 0xbe, 0x4f, 0x7b, 0x89, 0x5e, 0x4e, 0xe9, 0xfd, 0x9d, 0xe8, 0x35, 0xb2, 0x51, 0x07, - 0x8d, 0x03, 0xeb, 0x4e, 0x02, 0xbe, 0xe3, 0x57, 0x3f, 0xcf, 0xc3, 0x72, 0xb6, 0x0b, 0x74, 0x0c, - 0xa5, 0x5e, 0xdc, 0x3f, 0xed, 0xbd, 0x0a, 0x6f, 0x51, 0xf2, 0xab, 0x56, 0x93, 0x2a, 0x27, 0x0a, - 0x6e, 0x51, 0xe9, 0x98, 0x57, 0x81, 0xa5, 0x8d, 0x03, 0xeb, 0x5e, 0x0a, 0xbe, 0x87, 0xa0, 0x27, - 0x60, 0x78, 0x91, 0x5c, 0xee, 0x77, 0x72, 0xc5, 0x58, 0x2e, 0x26, 0xe2, 0x78, 0x45, 0x36, 0x80, - 0xe8, 0x72, 0xe2, 0xd3, 0x26, 0x63, 0x9e, 0x39, 0x17, 0x9e, 0x81, 0x53, 0x1c, 0x07, 0x56, 0x06, - 0xc5, 0x19, 0x1b, 0x3d, 0x84, 0x42, 0xe4, 0x1d, 0x71, 0xcf, 0x9c, 0x57, 0xf4, 0x95, 0x71, 0x60, - 0xa5, 0x20, 0x4e, 0xcd, 0x90, 0xec, 0x7a, 0xac, 0x43, 0xbc, 0x90, 0xbc, 0x90, 0x92, 0x27, 0x20, - 0x4e, 0xcd, 0x90, 0xec, 0x11, 0x21, 0xf7, 0x38, 0x67, 0xdc, 0x34, 0x52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0x2b, 0xab, 0xbd, 0x05, 0x00, 0x00, + // 702 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x54, 0x41, 0x53, 0xdb, 0x3a, + 0x10, 0xb6, 0x03, 0x38, 0x64, 0x81, 0xbc, 0xa0, 0xe1, 0x81, 0xc9, 0x7b, 0x13, 0x33, 0xb9, 0x3c, + 0x5e, 0x3b, 0x75, 0x3a, 0xe1, 0xd2, 0xce, 0xf4, 0x82, 0x1b, 0x5a, 0x3a, 0x6d, 0x43, 0xaa, 0x84, + 0x32, 0xa5, 0x07, 0x46, 0x49, 0x54, 0x27, 0x33, 0x26, 0x72, 0x25, 0x85, 0x0e, 0xff, 0x82, 0x7f, + 0xd2, 0x43, 0xff, 0x04, 0x87, 0x1e, 0x38, 0xf6, 0x94, 0xb6, 0x70, 0xcb, 0xaf, 0xe8, 0x58, 0xb6, + 0x63, 0x07, 0xd2, 0x63, 0x2f, 0xd6, 0xee, 0xb7, 0xdf, 0x7e, 0xbb, 0xb2, 0xb4, 0x82, 0x7f, 0x24, + 0xe1, 0x2e, 0x95, 0xa2, 0x12, 0xad, 0x7e, 0xbb, 0xc2, 0xfd, 0x8e, 0xed, 0x73, 0x26, 0x19, 0x32, + 0x64, 0x8f, 0x0c, 0x98, 0x28, 0x6e, 0x0a, 0xc9, 0x38, 0xad, 0xa8, 0xaf, 0xdf, 0xae, 0xc8, 0x73, + 0x9f, 0x8a, 0x90, 0x52, 0x5c, 0x73, 0x99, 0xcb, 0x94, 0x59, 0x09, 0xac, 0x08, 0x8d, 0x12, 0x3c, + 0xd2, 0xa6, 0xde, 0xad, 0x04, 0xcb, 0x65, 0xcc, 0xf5, 0x68, 0x45, 0x79, 0xed, 0xe1, 0x87, 0x8a, + 0xec, 0x9f, 0x52, 0x21, 0xc9, 0xa9, 0x1f, 0x12, 0xca, 0x5f, 0x75, 0xc8, 0xb7, 0xc2, 0x66, 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6, 0xc5, 0x77, 0x4b, 0xc7, + 0x29, 0x1f, 0x3d, 0x03, 0x94, 0x78, 0xb5, 0x21, 0x27, 0xb2, 0xcf, 0x06, 0xe6, 0xe2, 0x96, 0xbe, + 0xad, 0x3b, 0xeb, 0xe3, 0x91, 0x35, 0x23, 0x8a, 0x67, 0x60, 0xe8, 0x11, 0x18, 0x3d, 0x4a, 0x3c, + 0xd9, 0x33, 0x73, 0x6a, 0x20, 0xd7, 0xa6, 0xe7, 0x60, 0x5f, 0xc5, 0x1c, 0x08, 0x0e, 0x23, 0xe4, + 0xe1, 0x68, 0x2d, 0xf7, 0x60, 0x65, 0xea, 0x9a, 0xfd, 0xb1, 0x1b, 0x73, 0xef, 0x01, 0x2c, 0xa7, + 0xbb, 0x41, 0x8b, 0x30, 0x5f, 0x3b, 0x38, 0xaa, 0x17, 0x34, 0x64, 0x40, 0xe6, 0xb0, 0x11, 0x8e, + 0xfb, 0x61, 0xfd, 0x65, 0x3d, 0x00, 0x33, 0xd5, 0xe7, 0x90, 0x8d, 0x07, 0xe5, 0x49, 0x62, 0xae, + 0xcf, 0x7e, 0xb1, 0x8a, 0x1b, 0x77, 0xf0, 0xf0, 0x89, 0x78, 0xa8, 0x3b, 0xff, 0x5d, 0xfe, 0x2c, + 0x69, 0x97, 0xd7, 0x25, 0xfd, 0xea, 0xba, 0xa4, 0xff, 0xb8, 0x2e, 0xe9, 0x17, 0x37, 0x25, 0xed, + 0xea, 0xa6, 0xa4, 0x7d, 0xbb, 0x29, 0x69, 0xc7, 0xb9, 0xc9, 0x73, 0xdd, 0x36, 0xd4, 0x21, 0xee, + 0xfc, 0x0a, 0x00, 0x00, 0xff, 0xff, 0x2a, 0x5c, 0x84, 0x60, 0xca, 0x05, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. diff --git a/pkg/targets/targetspb/rpc.proto b/pkg/targets/targetspb/rpc.proto index 61863f61b8..6515dc0070 100644 --- a/pkg/targets/targetspb/rpc.proto +++ b/pkg/targets/targetspb/rpc.proto @@ -60,6 +60,7 @@ message TargetDiscovery { enum TargetHealth { DOWN = 0; UP = 1; + UNKNOWN = 2; } message ActiveTarget {