1 # Datastore Composite Index Configuration. 2 # https://developers.google.com/appengine/docs/python/config/indexconfig 3 # 4 # Below, most indexes come in pairs; one with the internal_only property, 5 # one without. This is because all queries when the user is not logged in 6 # have the filter internal_only == False. 7 # 8 # Composite index properties must be listed differently depending on how the 9 # properties are used. There are three main ways to use properties in a query: 10 # (1) In an equality filter. 11 # (2) In an inequality filter. 12 # (3) In a sort order. 13 # The properties below must be listed in this order. The "direction" only needs 14 # to be specified for properties used for sort order. 15 # 16 # To update the indexes in production after editing them here, you must run 17 # appcfg.py vacuum_indexes or appcfg.py update_indexes. 18 19 indexes: 20 21 # Used in main.py when fetching top improvements/regressions in past N days. 22 - kind: Anomaly 23 properties: 24 - name: sheriff 25 - name: timestamp 26 - kind: Anomaly 27 properties: 28 - name: internal_only 29 - name: sheriff 30 - name: timestamp 31 32 # Used in alerts.py for fetching recent un-triaged regressions for one sheriff. 33 - kind: Anomaly 34 properties: 35 - name: bug_id 36 - name: is_improvement 37 - name: recovered 38 - name: sheriff 39 - name: timestamp 40 direction: desc 41 - kind: Anomaly 42 properties: 43 - name: internal_only 44 - name: bug_id 45 - name: is_improvement 46 - name: recovered 47 - name: sheriff 48 - name: timestamp 49 direction: desc 50 51 # Used in alerts.py for fetching recent un-triaged anomalies, both regressions 52 # and improvements, for one sheriff, i.e. when the improvements button is on. 53 - kind: Anomaly 54 properties: 55 - name: bug_id 56 - name: recovered 57 - name: sheriff 58 - name: timestamp 59 direction: desc 60 - kind: Anomaly 61 properties: 62 - name: internal_only 63 - name: bug_id 64 - name: recovered 65 - name: sheriff 66 - name: timestamp 67 direction: desc 68 69 # Used in alerts.py for fetching recent regressions for one sheriff, regardless 70 # of triaged vs un-triaged status, i.e. when the triaged button is on. 71 - kind: Anomaly 72 properties: 73 - name: is_improvement 74 - name: sheriff 75 - name: timestamp 76 direction: desc 77 - kind: Anomaly 78 properties: 79 - name: internal_only 80 - name: is_improvement 81 - name: sheriff 82 - name: timestamp 83 direction: desc 84 85 # Used in alerts.py for fetching recent anomalies for one sheriff, including 86 # improvements and triaged, i.e. both improvements and triaged buttons are on. 87 - kind: Anomaly 88 properties: 89 - name: sheriff 90 - name: timestamp 91 direction: desc 92 - kind: Anomaly 93 properties: 94 - name: internal_only 95 - name: sheriff 96 - name: timestamp 97 direction: desc 98 99 # Used in group_report.py when querying for anomalies around a revision. 100 # No composite index is required without internal_only because then the 101 # query uses only one (indexed) property, end_revision. 102 - kind: Anomaly 103 properties: 104 - name: internal_only 105 - name: end_revision 106 107 # Might be unused! 108 # This index would enable querying for points for a particular test, 109 # filtering or sorting by revision, and possibly doing a projection 110 # query including value. 111 - kind: Row 112 properties: 113 - name: parent_test 114 - name: revision 115 - name: value 116 117 # Used in find_anomalies.GetRowsToAnalyze when getting latest points, 118 # with projection query for properties revision and value. 119 - kind: Row 120 properties: 121 - name: parent_test 122 - name: revision 123 direction: desc 124 - name: value 125 126 # Used in graph_revisions.py to do a projection query for timestamp, revision 127 # and value for points from a particular test. 128 - kind: Row 129 properties: 130 - name: parent_test 131 - name: revision 132 - name: timestamp 133 - name: value 134 135 # Used in several modules (graph_json.py and graph_csv.py) to fetch the latest 136 # points for a test. 137 - kind: Row 138 properties: 139 - name: parent_test 140 - name: revision 141 direction: desc 142 143 # This composite index enables querying for points for a particular test, 144 # filtering or sorting by revision. This may be unused, but it may be useful 145 # for queries on the interactive console. 146 - kind: Row 147 properties: 148 - name: parent_test 149 - name: revision 150 151 # May be unused! 152 # Likely used in new_points.py to query newest points for a particular test. 153 # However listing the latest points for a test also works when not logged in 154 # currently, although there appears to be no index in this file for that. 155 - kind: Row 156 properties: 157 - name: parent_test 158 - name: timestamp 159 direction: desc 160 161 # May be used in send_stoppage_alert_emails to fetch recent StoppageAlert 162 # entities for a particular sheriff, for both internal-only and public alerts. 163 - kind: StoppageAlert 164 properties: 165 - name: sheriff 166 - name: mail_sent 167 - kind: StoppageAlert 168 properties: 169 - name: internal_only 170 - name: sheriff 171 - name: mail_sent 172 173 # Used in alerts to fetch recent StoppageAlert entities for a particular 174 # sheriff, for both internal and non-internal users. 175 - kind: StoppageAlert 176 properties: 177 - name: sheriff 178 - name: timestamp 179 direction: desc 180 - kind: StoppageAlert 181 properties: 182 - name: internal_only 183 - name: sheriff 184 - name: timestamp 185 direction: desc 186 187 # Used in /alerts to query for stoppage alerts, for internal and external 188 # sheriffs. 189 - kind: StoppageAlert 190 properties: 191 - name: bug_id 192 - name: internal_only 193 - name: recovered 194 - name: sheriff 195 - name: timestamp 196 direction: desc 197 - kind: StoppageAlert 198 properties: 199 - name: bug_id 200 - name: recovered 201 - name: sheriff 202 - name: timestamp 203 direction: desc 204 205 # Used in update_test_suites to query keys of test suites (parent_test == None) 206 # with deprecated and description projection. Two separate lists of 207 # test suites are kept, one for external and one for internal. 208 - kind: Test 209 properties: 210 - name: parent_test 211 - name: deprecated 212 - name: description 213 - kind: Test 214 properties: 215 - name: internal_only 216 - name: parent_test 217 - name: deprecated 218 - name: description 219 220 # Used in update_test_suites to query keys of test suites (parent_test == None) 221 # with monitored projection. Two separate lists of test suites are kept, one for 222 # external and one for internal. 223 - kind: Test 224 properties: 225 - name: parent_test 226 - name: monitored 227 - kind: Test 228 properties: 229 - name: internal_only 230 - name: parent_test 231 - name: monitored 232 233 # Used in list_tests.py to query Test by test path pattern. 234 - kind: Test 235 properties: 236 - name: master_name 237 - name: bot_name 238 - name: suite_name 239 - name: test_part1_name 240 - name: test_part2_name 241 - name: test_part3_name 242 - name: test_part4_name 243 - kind: Test 244 properties: 245 - name: internal_only 246 - name: master_name 247 - name: bot_name 248 - name: suite_name 249 - name: test_part1_name 250 - name: test_part2_name 251 - name: test_part3_name 252 - name: test_part4_name 253 254 # Used in update_test_suites to query keys of test suites (parent_test == None) 255 # with deprecated and description projection. Two separate lists of 256 # test suites are kept, one for external and one for internal. 257 - kind: TestMetadata 258 properties: 259 - name: parent_test 260 - name: deprecated 261 - name: description 262 - kind: TestMetadata 263 properties: 264 - name: internal_only 265 - name: parent_test 266 - name: deprecated 267 - name: description 268 269 # Used in update_test_suites to query keys of test suites (parent_test == None) 270 # with monitored projection. Two separate lists of test suites are kept, one for 271 # external and one for internal. 272 - kind: TestMetadata 273 properties: 274 - name: parent_test 275 - name: monitored 276 - kind: TestMetadata 277 properties: 278 - name: internal_only 279 - name: parent_test 280 - name: monitored 281 282 # Used in list_tests.py to query Test by test path pattern. 283 - kind: TestMetadata 284 properties: 285 - name: master_name 286 - name: bot_name 287 - name: suite_name 288 - name: test_part1_name 289 - name: test_part2_name 290 - name: test_part3_name 291 - name: test_part4_name 292 - kind: TestMetadata 293 properties: 294 - name: internal_only 295 - name: master_name 296 - name: bot_name 297 - name: suite_name 298 - name: test_part1_name 299 - name: test_part2_name 300 - name: test_part3_name 301 - name: test_part4_name 302