Commit cd8155b
authored
[Inference API] Handle empty date strings when parsing endpoint metadata (elastic#143584)
This adds handling of blank date strings when parsing endpoint metadata heuristics
by treating it as `null`.
This could not occur in practice as EIS won't be serving empty strings. However, there
are tests that pass in an empty string (e.g. callers of `createAuthorizedEndpoint` in
`ElasticInferenceServiceAuthorizationResponseEntityTests` may lead to this case).
Rather than change the tests, it makes more sense to make date parsing more robust.1 parent 9f27b96 commit cd8155b
File tree
3 files changed
+34
-16
lines changed- x-pack/plugin/inference/src
- main/java/org/elasticsearch/xpack/inference/common/parser
- test/java/org/elasticsearch/xpack/inference
- common/parser
- services/elastic/authorization
3 files changed
+34
-16
lines changedLines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | | - | |
| 27 | + | |
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| |||
Lines changed: 5 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
74 | 79 | | |
75 | 80 | | |
76 | 81 | | |
| |||
Lines changed: 28 additions & 15 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1026 | 1026 | | |
1027 | 1027 | | |
1028 | 1028 | | |
1029 | | - | |
1030 | | - | |
1031 | | - | |
| 1029 | + | |
| 1030 | + | |
| 1031 | + | |
1032 | 1032 | | |
1033 | 1033 | | |
1034 | 1034 | | |
1035 | 1035 | | |
1036 | 1036 | | |
1037 | | - | |
| 1037 | + | |
1038 | 1038 | | |
1039 | 1039 | | |
1040 | 1040 | | |
| |||
1046 | 1046 | | |
1047 | 1047 | | |
1048 | 1048 | | |
1049 | | - | |
| 1049 | + | |
1050 | 1050 | | |
1051 | 1051 | | |
1052 | 1052 | | |
| |||
1058 | 1058 | | |
1059 | 1059 | | |
1060 | 1060 | | |
1061 | | - | |
| 1061 | + | |
1062 | 1062 | | |
1063 | 1063 | | |
1064 | 1064 | | |
1065 | 1065 | | |
1066 | | - | |
1067 | | - | |
| 1066 | + | |
| 1067 | + | |
1068 | 1068 | | |
1069 | 1069 | | |
1070 | 1070 | | |
| |||
1073 | 1073 | | |
1074 | 1074 | | |
1075 | 1075 | | |
1076 | | - | |
| 1076 | + | |
1077 | 1077 | | |
1078 | 1078 | | |
1079 | 1079 | | |
1080 | 1080 | | |
1081 | | - | |
1082 | | - | |
| 1081 | + | |
| 1082 | + | |
| 1083 | + | |
1083 | 1084 | | |
1084 | 1085 | | |
1085 | 1086 | | |
1086 | 1087 | | |
1087 | 1088 | | |
1088 | | - | |
| 1089 | + | |
1089 | 1090 | | |
1090 | 1091 | | |
1091 | 1092 | | |
| |||
1097 | 1098 | | |
1098 | 1099 | | |
1099 | 1100 | | |
1100 | | - | |
| 1101 | + | |
1101 | 1102 | | |
1102 | 1103 | | |
1103 | 1104 | | |
1104 | 1105 | | |
1105 | | - | |
| 1106 | + | |
1106 | 1107 | | |
1107 | 1108 | | |
1108 | 1109 | | |
1109 | 1110 | | |
| 1111 | + | |
| 1112 | + | |
| 1113 | + | |
| 1114 | + | |
| 1115 | + | |
| 1116 | + | |
| 1117 | + | |
| 1118 | + | |
| 1119 | + | |
| 1120 | + | |
| 1121 | + | |
| 1122 | + | |
1110 | 1123 | | |
1111 | 1124 | | |
1112 | 1125 | | |
1113 | 1126 | | |
1114 | 1127 | | |
1115 | | - | |
| 1128 | + | |
1116 | 1129 | | |
1117 | 1130 | | |
1118 | 1131 | | |
| |||
0 commit comments