@leverege/build-tools 2.112.0 → 2.113.0-quinn.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@leverege/build-tools",
3
- "version": "2.112.0",
3
+ "version": "2.113.0-quinn.1",
4
4
  "description": "A collection of build / support tools for Leverege developers",
5
5
  "main": "index.js",
6
6
  "repository": {
@@ -123,5 +123,8 @@
123
123
  "eslint": "^9",
124
124
  "mocha": "^11.7.6",
125
125
  "npm": "^11.17.0"
126
+ },
127
+ "allowScripts": {
128
+ "unrs-resolver@1.12.2": true
126
129
  }
127
130
  }
@@ -1,7 +1,7 @@
1
1
  version: 2.1
2
2
 
3
3
  orbs:
4
- leverege: leverege/circle-nodejs-ci@2.2.0
4
+ leverege: leverege/circle-nodejs-ci@2.2.1
5
5
 
6
6
  workflows:
7
7
  build-and-verify:
@@ -18,7 +18,7 @@ import {
18
18
  warning,
19
19
  } from '../Utils.mjs'
20
20
 
21
- const ORB_VERSION = '2.2.0' // Keep this in sync with the versions in circle-npm.yml and circle-yarn.yml
21
+ const ORB_VERSION = '2.2.1' // Keep this in sync with the versions in circle-npm.yml and circle-yarn.yml
22
22
  const CIRCLE_DIR = '.circleci'
23
23
  const CIRCLE_YML = `${CIRCLE_DIR}/config.yml`
24
24
  const CIRCLE_NPM_TEMPLATE = path.join( BUILD_TOOLS_ROOT, 'circle-orb-it', 'circle-npm.yml' )
@@ -1,7 +1,7 @@
1
1
  version: 2.1
2
2
 
3
3
  orbs:
4
- leverege: leverege/circle-nodejs-ci@2.2.0
4
+ leverege: leverege/circle-nodejs-ci@2.2.1
5
5
 
6
6
  workflows:
7
7
  build-and-verify:
@@ -51,7 +51,7 @@
51
51
  "type": "prometheus",
52
52
  "uid": "${datasource}"
53
53
  },
54
- "expr": "increase(vms_playlist_requests_success[${__range}])",
54
+ "expr": "sum(increase(vms_playlist_requests_success[${__range}]))",
55
55
  "legendFormat": "total",
56
56
  "refId": "A"
57
57
  }
@@ -95,7 +95,7 @@
95
95
  "type": "prometheus",
96
96
  "uid": "${datasource}"
97
97
  },
98
- "expr": "increase(vms_segment_requests_success[${__range}])",
98
+ "expr": "sum(increase(vms_segment_requests_success[${__range}]))",
99
99
  "legendFormat": "total",
100
100
  "refId": "A"
101
101
  }
@@ -130,7 +130,7 @@
130
130
  "type": "prometheus",
131
131
  "uid": "${datasource}"
132
132
  },
133
- "expr": "rate(vms_playlist_requests_success[5m])",
133
+ "expr": "sum(rate(vms_playlist_requests_success[5m]))",
134
134
  "legendFormat": "success/s",
135
135
  "refId": "A"
136
136
  }
@@ -169,7 +169,7 @@
169
169
  "type": "prometheus",
170
170
  "uid": "${datasource}"
171
171
  },
172
- "expr": "rate(vms_playlist_requests_error[5m])",
172
+ "expr": "sum(rate(vms_playlist_requests_error[5m]))",
173
173
  "legendFormat": "errors/s",
174
174
  "refId": "A"
175
175
  }
@@ -204,7 +204,7 @@
204
204
  "type": "prometheus",
205
205
  "uid": "${datasource}"
206
206
  },
207
- "expr": "histogram_quantile(0.50, rate(vms_playlist_generation_duration_seconds_bucket[5m]))",
207
+ "expr": "histogram_quantile(0.50, sum(rate(vms_playlist_generation_duration_seconds_bucket[5m])) by (le))",
208
208
  "legendFormat": "p50",
209
209
  "refId": "A"
210
210
  },
@@ -213,7 +213,7 @@
213
213
  "type": "prometheus",
214
214
  "uid": "${datasource}"
215
215
  },
216
- "expr": "histogram_quantile(0.95, rate(vms_playlist_generation_duration_seconds_bucket[5m]))",
216
+ "expr": "histogram_quantile(0.95, sum(rate(vms_playlist_generation_duration_seconds_bucket[5m])) by (le))",
217
217
  "legendFormat": "p95",
218
218
  "refId": "B"
219
219
  },
@@ -222,7 +222,7 @@
222
222
  "type": "prometheus",
223
223
  "uid": "${datasource}"
224
224
  },
225
- "expr": "histogram_quantile(0.99, rate(vms_playlist_generation_duration_seconds_bucket[5m]))",
225
+ "expr": "histogram_quantile(0.99, sum(rate(vms_playlist_generation_duration_seconds_bucket[5m])) by (le))",
226
226
  "legendFormat": "p99",
227
227
  "refId": "C"
228
228
  }
@@ -257,7 +257,7 @@
257
257
  "type": "prometheus",
258
258
  "uid": "${datasource}"
259
259
  },
260
- "expr": "histogram_quantile(0.50, rate(vms_playlist_segment_count_bucket[5m]))",
260
+ "expr": "histogram_quantile(0.50, sum(rate(vms_playlist_segment_count_bucket[5m])) by (le))",
261
261
  "legendFormat": "p50",
262
262
  "refId": "A"
263
263
  },
@@ -266,7 +266,7 @@
266
266
  "type": "prometheus",
267
267
  "uid": "${datasource}"
268
268
  },
269
- "expr": "histogram_quantile(0.95, rate(vms_playlist_segment_count_bucket[5m]))",
269
+ "expr": "histogram_quantile(0.95, sum(rate(vms_playlist_segment_count_bucket[5m])) by (le))",
270
270
  "legendFormat": "p95",
271
271
  "refId": "B"
272
272
  }
@@ -301,7 +301,7 @@
301
301
  "type": "prometheus",
302
302
  "uid": "${datasource}"
303
303
  },
304
- "expr": "histogram_quantile(0.50, rate(vms_playlist_gap_count_bucket[5m]))",
304
+ "expr": "histogram_quantile(0.50, sum(rate(vms_playlist_gap_count_bucket[5m])) by (le))",
305
305
  "legendFormat": "p50",
306
306
  "refId": "A"
307
307
  },
@@ -310,7 +310,7 @@
310
310
  "type": "prometheus",
311
311
  "uid": "${datasource}"
312
312
  },
313
- "expr": "histogram_quantile(0.95, rate(vms_playlist_gap_count_bucket[5m]))",
313
+ "expr": "histogram_quantile(0.95, sum(rate(vms_playlist_gap_count_bucket[5m])) by (le))",
314
314
  "legendFormat": "p95",
315
315
  "refId": "B"
316
316
  }
@@ -345,7 +345,7 @@
345
345
  "type": "prometheus",
346
346
  "uid": "${datasource}"
347
347
  },
348
- "expr": "histogram_quantile(0.50, rate(vms_playlist_gap_duration_seconds_bucket[5m]))",
348
+ "expr": "histogram_quantile(0.50, sum(rate(vms_playlist_gap_duration_seconds_bucket[5m])) by (le))",
349
349
  "legendFormat": "p50",
350
350
  "refId": "A"
351
351
  },
@@ -354,7 +354,7 @@
354
354
  "type": "prometheus",
355
355
  "uid": "${datasource}"
356
356
  },
357
- "expr": "histogram_quantile(0.95, rate(vms_playlist_gap_duration_seconds_bucket[5m]))",
357
+ "expr": "histogram_quantile(0.95, sum(rate(vms_playlist_gap_duration_seconds_bucket[5m])) by (le))",
358
358
  "legendFormat": "p95",
359
359
  "refId": "B"
360
360
  }
@@ -389,7 +389,7 @@
389
389
  "type": "prometheus",
390
390
  "uid": "${datasource}"
391
391
  },
392
- "expr": "histogram_quantile(0.50, rate(vms_bq_query_duration_seconds_bucket[5m]))",
392
+ "expr": "histogram_quantile(0.50, sum(rate(vms_bq_query_duration_seconds_bucket[5m])) by (le))",
393
393
  "legendFormat": "p50",
394
394
  "refId": "A"
395
395
  },
@@ -398,7 +398,7 @@
398
398
  "type": "prometheus",
399
399
  "uid": "${datasource}"
400
400
  },
401
- "expr": "histogram_quantile(0.95, rate(vms_bq_query_duration_seconds_bucket[5m]))",
401
+ "expr": "histogram_quantile(0.95, sum(rate(vms_bq_query_duration_seconds_bucket[5m])) by (le))",
402
402
  "legendFormat": "p95",
403
403
  "refId": "B"
404
404
  },
@@ -407,7 +407,7 @@
407
407
  "type": "prometheus",
408
408
  "uid": "${datasource}"
409
409
  },
410
- "expr": "histogram_quantile(0.99, rate(vms_bq_query_duration_seconds_bucket[5m]))",
410
+ "expr": "histogram_quantile(0.99, sum(rate(vms_bq_query_duration_seconds_bucket[5m])) by (le))",
411
411
  "legendFormat": "p99",
412
412
  "refId": "C"
413
413
  }
@@ -442,7 +442,7 @@
442
442
  "type": "prometheus",
443
443
  "uid": "${datasource}"
444
444
  },
445
- "expr": "histogram_quantile(0.50, rate(vms_bq_segments_returned_bucket[5m]))",
445
+ "expr": "histogram_quantile(0.50, sum(rate(vms_bq_segments_returned_bucket[5m])) by (le))",
446
446
  "legendFormat": "p50",
447
447
  "refId": "A"
448
448
  },
@@ -451,7 +451,7 @@
451
451
  "type": "prometheus",
452
452
  "uid": "${datasource}"
453
453
  },
454
- "expr": "histogram_quantile(0.95, rate(vms_bq_segments_returned_bucket[5m]))",
454
+ "expr": "histogram_quantile(0.95, sum(rate(vms_bq_segments_returned_bucket[5m])) by (le))",
455
455
  "legendFormat": "p95",
456
456
  "refId": "B"
457
457
  }
@@ -490,7 +490,7 @@
490
490
  "type": "prometheus",
491
491
  "uid": "${datasource}"
492
492
  },
493
- "expr": "rate(vms_bq_errors_total[5m])",
493
+ "expr": "sum(rate(vms_bq_errors_total[5m]))",
494
494
  "legendFormat": "errors/s",
495
495
  "refId": "A"
496
496
  }
@@ -525,7 +525,7 @@
525
525
  "type": "prometheus",
526
526
  "uid": "${datasource}"
527
527
  },
528
- "expr": "vms_active_streams",
528
+ "expr": "sum(vms_active_streams)",
529
529
  "legendFormat": "active streams",
530
530
  "refId": "A"
531
531
  }
@@ -560,7 +560,7 @@
560
560
  "type": "prometheus",
561
561
  "uid": "${datasource}"
562
562
  },
563
- "expr": "rate(vms_gcs_bytes_served_total[5m])",
563
+ "expr": "sum(rate(vms_gcs_bytes_served_total[5m]))",
564
564
  "legendFormat": "bytes/s",
565
565
  "refId": "A"
566
566
  }
@@ -599,7 +599,7 @@
599
599
  "type": "prometheus",
600
600
  "uid": "${datasource}"
601
601
  },
602
- "expr": "rate(vms_gcs_errors_total[5m])",
602
+ "expr": "sum(rate(vms_gcs_errors_total[5m]))",
603
603
  "legendFormat": "errors/s",
604
604
  "refId": "A"
605
605
  }
@@ -634,7 +634,7 @@
634
634
  "type": "prometheus",
635
635
  "uid": "${datasource}"
636
636
  },
637
- "expr": "rate(vms_segment_requests_success[5m])",
637
+ "expr": "sum(rate(vms_segment_requests_success[5m]))",
638
638
  "legendFormat": "success/s",
639
639
  "refId": "A"
640
640
  },
@@ -643,7 +643,7 @@
643
643
  "type": "prometheus",
644
644
  "uid": "${datasource}"
645
645
  },
646
- "expr": "rate(vms_segment_requests_error[5m])",
646
+ "expr": "sum(rate(vms_segment_requests_error[5m]))",
647
647
  "legendFormat": "errors/s",
648
648
  "refId": "B"
649
649
  }
@@ -678,7 +678,7 @@
678
678
  "type": "prometheus",
679
679
  "uid": "${datasource}"
680
680
  },
681
- "expr": "rate(vms_upload_requests[5m])",
681
+ "expr": "sum(rate(vms_upload_requests[5m]))",
682
682
  "legendFormat": "requests/s",
683
683
  "refId": "A"
684
684
  }
@@ -714,7 +714,7 @@
714
714
  "type": "prometheus",
715
715
  "uid": "${datasource}"
716
716
  },
717
- "expr": "histogram_quantile(0.50, rate(vms_upload_poll_duration_seconds_bucket[5m]))",
717
+ "expr": "histogram_quantile(0.50, sum(rate(vms_upload_poll_duration_seconds_bucket[5m])) by (le))",
718
718
  "legendFormat": "p50",
719
719
  "refId": "A"
720
720
  },
@@ -723,7 +723,7 @@
723
723
  "type": "prometheus",
724
724
  "uid": "${datasource}"
725
725
  },
726
- "expr": "histogram_quantile(0.95, rate(vms_upload_poll_duration_seconds_bucket[5m]))",
726
+ "expr": "histogram_quantile(0.95, sum(rate(vms_upload_poll_duration_seconds_bucket[5m])) by (le))",
727
727
  "legendFormat": "p95",
728
728
  "refId": "B"
729
729
  }
@@ -762,7 +762,7 @@
762
762
  "type": "prometheus",
763
763
  "uid": "${datasource}"
764
764
  },
765
- "expr": "rate(vms_upload_timeouts_total[5m])",
765
+ "expr": "sum(rate(vms_upload_timeouts_total[5m]))",
766
766
  "legendFormat": "timeouts/s",
767
767
  "refId": "A"
768
768
  }
@@ -797,7 +797,7 @@
797
797
  "type": "prometheus",
798
798
  "uid": "${datasource}"
799
799
  },
800
- "expr": "rate(vms_upload_response_completed[5m])",
800
+ "expr": "sum(rate(vms_upload_response_completed[5m]))",
801
801
  "legendFormat": "completed/s",
802
802
  "refId": "A"
803
803
  },
@@ -806,7 +806,7 @@
806
806
  "type": "prometheus",
807
807
  "uid": "${datasource}"
808
808
  },
809
- "expr": "rate(vms_upload_response_partial[5m])",
809
+ "expr": "sum(rate(vms_upload_response_partial[5m]))",
810
810
  "legendFormat": "partial/s",
811
811
  "refId": "B"
812
812
  },
@@ -815,7 +815,7 @@
815
815
  "type": "prometheus",
816
816
  "uid": "${datasource}"
817
817
  },
818
- "expr": "rate(vms_upload_response_failed[5m])",
818
+ "expr": "sum(rate(vms_upload_response_failed[5m]))",
819
819
  "legendFormat": "failed/s",
820
820
  "refId": "C"
821
821
  },
@@ -824,7 +824,7 @@
824
824
  "type": "prometheus",
825
825
  "uid": "${datasource}"
826
826
  },
827
- "expr": "rate(vms_upload_response_not_found[5m])",
827
+ "expr": "sum(rate(vms_upload_response_not_found[5m]))",
828
828
  "legendFormat": "not_found/s",
829
829
  "refId": "D"
830
830
  }
@@ -859,7 +859,7 @@
859
859
  "type": "prometheus",
860
860
  "uid": "${datasource}"
861
861
  },
862
- "expr": "rate(ordered_q_enqueue_count[5m])",
862
+ "expr": "sum(rate(ordered_q_enqueue_count[5m]))",
863
863
  "legendFormat": "enqueued/s",
864
864
  "refId": "A"
865
865
  },
@@ -868,7 +868,7 @@
868
868
  "type": "prometheus",
869
869
  "uid": "${datasource}"
870
870
  },
871
- "expr": "rate(ordered_q_dequeue_count[5m])",
871
+ "expr": "sum(rate(ordered_q_dequeue_count[5m]))",
872
872
  "legendFormat": "dequeued/s",
873
873
  "refId": "B"
874
874
  },
@@ -877,7 +877,7 @@
877
877
  "type": "prometheus",
878
878
  "uid": "${datasource}"
879
879
  },
880
- "expr": "rate(ordered_q_processed_count[5m])",
880
+ "expr": "sum(rate(ordered_q_processed_count[5m]))",
881
881
  "legendFormat": "processed/s",
882
882
  "refId": "C"
883
883
  }
@@ -916,7 +916,7 @@
916
916
  "type": "prometheus",
917
917
  "uid": "${datasource}"
918
918
  },
919
- "expr": "rate(ordered_q_process_error_count[5m])",
919
+ "expr": "sum(rate(ordered_q_process_error_count[5m]))",
920
920
  "legendFormat": "errors/s",
921
921
  "refId": "A"
922
922
  }
@@ -951,7 +951,7 @@
951
951
  "type": "prometheus",
952
952
  "uid": "${datasource}"
953
953
  },
954
- "expr": "ordered_q_processing_queues",
954
+ "expr": "sum(ordered_q_processing_queues)",
955
955
  "legendFormat": "active queues",
956
956
  "refId": "A"
957
957
  }
@@ -987,7 +987,7 @@
987
987
  "type": "prometheus",
988
988
  "uid": "${datasource}"
989
989
  },
990
- "expr": "histogram_quantile(0.50, rate(vms_playlist_coverage_ratio_bucket[5m]))",
990
+ "expr": "histogram_quantile(0.50, sum(rate(vms_playlist_coverage_ratio_bucket[5m])) by (le))",
991
991
  "legendFormat": "p50",
992
992
  "refId": "A"
993
993
  },
@@ -996,7 +996,7 @@
996
996
  "type": "prometheus",
997
997
  "uid": "${datasource}"
998
998
  },
999
- "expr": "histogram_quantile(0.95, rate(vms_playlist_coverage_ratio_bucket[5m]))",
999
+ "expr": "histogram_quantile(0.95, sum(rate(vms_playlist_coverage_ratio_bucket[5m])) by (le))",
1000
1000
  "legendFormat": "p95",
1001
1001
  "refId": "B"
1002
1002
  }
@@ -1031,7 +1031,7 @@
1031
1031
  "type": "prometheus",
1032
1032
  "uid": "${datasource}"
1033
1033
  },
1034
- "expr": "histogram_quantile(0.50, rate(vms_segment_staleness_seconds_bucket[5m]))",
1034
+ "expr": "histogram_quantile(0.50, sum(rate(vms_segment_staleness_seconds_bucket[5m])) by (le))",
1035
1035
  "legendFormat": "p50",
1036
1036
  "refId": "A"
1037
1037
  },
@@ -1040,7 +1040,7 @@
1040
1040
  "type": "prometheus",
1041
1041
  "uid": "${datasource}"
1042
1042
  },
1043
- "expr": "histogram_quantile(0.95, rate(vms_segment_staleness_seconds_bucket[5m]))",
1043
+ "expr": "histogram_quantile(0.95, sum(rate(vms_segment_staleness_seconds_bucket[5m])) by (le))",
1044
1044
  "legendFormat": "p95",
1045
1045
  "refId": "B"
1046
1046
  }
@@ -1075,7 +1075,7 @@
1075
1075
  "type": "prometheus",
1076
1076
  "uid": "${datasource}"
1077
1077
  },
1078
- "expr": "histogram_quantile(0.50, rate(vms_playlist_total_gap_seconds_bucket[5m]))",
1078
+ "expr": "histogram_quantile(0.50, sum(rate(vms_playlist_total_gap_seconds_bucket[5m])) by (le))",
1079
1079
  "legendFormat": "p50",
1080
1080
  "refId": "A"
1081
1081
  },
@@ -1084,7 +1084,7 @@
1084
1084
  "type": "prometheus",
1085
1085
  "uid": "${datasource}"
1086
1086
  },
1087
- "expr": "histogram_quantile(0.95, rate(vms_playlist_total_gap_seconds_bucket[5m]))",
1087
+ "expr": "histogram_quantile(0.95, sum(rate(vms_playlist_total_gap_seconds_bucket[5m])) by (le))",
1088
1088
  "legendFormat": "p95",
1089
1089
  "refId": "B"
1090
1090
  }
@@ -1119,7 +1119,7 @@
1119
1119
  "type": "prometheus",
1120
1120
  "uid": "${datasource}"
1121
1121
  },
1122
- "expr": "rate(vms_cache_hit_low[5m])",
1122
+ "expr": "sum(rate(vms_cache_hit_low[5m]))",
1123
1123
  "legendFormat": "hit low/s",
1124
1124
  "refId": "A"
1125
1125
  },
@@ -1128,7 +1128,7 @@
1128
1128
  "type": "prometheus",
1129
1129
  "uid": "${datasource}"
1130
1130
  },
1131
- "expr": "rate(vms_cache_miss_low[5m])",
1131
+ "expr": "sum(rate(vms_cache_miss_low[5m]))",
1132
1132
  "legendFormat": "miss low/s",
1133
1133
  "refId": "B"
1134
1134
  },
@@ -1137,7 +1137,7 @@
1137
1137
  "type": "prometheus",
1138
1138
  "uid": "${datasource}"
1139
1139
  },
1140
- "expr": "rate(vms_cache_hit_high[5m])",
1140
+ "expr": "sum(rate(vms_cache_hit_high[5m]))",
1141
1141
  "legendFormat": "hit high/s",
1142
1142
  "refId": "C"
1143
1143
  },
@@ -1146,7 +1146,7 @@
1146
1146
  "type": "prometheus",
1147
1147
  "uid": "${datasource}"
1148
1148
  },
1149
- "expr": "rate(vms_cache_miss_high[5m])",
1149
+ "expr": "sum(rate(vms_cache_miss_high[5m]))",
1150
1150
  "legendFormat": "miss high/s",
1151
1151
  "refId": "D"
1152
1152
  }
@@ -1181,7 +1181,7 @@
1181
1181
  "type": "prometheus",
1182
1182
  "uid": "${datasource}"
1183
1183
  },
1184
- "expr": "histogram_quantile(0.50, rate(vms_cache_lookup_duration_seconds_bucket[5m]))",
1184
+ "expr": "histogram_quantile(0.50, sum(rate(vms_cache_lookup_duration_seconds_bucket[5m])) by (le))",
1185
1185
  "legendFormat": "p50",
1186
1186
  "refId": "A"
1187
1187
  },
@@ -1190,7 +1190,7 @@
1190
1190
  "type": "prometheus",
1191
1191
  "uid": "${datasource}"
1192
1192
  },
1193
- "expr": "histogram_quantile(0.95, rate(vms_cache_lookup_duration_seconds_bucket[5m]))",
1193
+ "expr": "histogram_quantile(0.95, sum(rate(vms_cache_lookup_duration_seconds_bucket[5m])) by (le))",
1194
1194
  "legendFormat": "p95",
1195
1195
  "refId": "B"
1196
1196
  }
@@ -1225,7 +1225,7 @@
1225
1225
  "type": "prometheus",
1226
1226
  "uid": "${datasource}"
1227
1227
  },
1228
- "expr": "histogram_quantile(0.50, rate(vms_cache_backfill_duration_seconds_bucket[5m]))",
1228
+ "expr": "histogram_quantile(0.50, sum(rate(vms_cache_backfill_duration_seconds_bucket[5m])) by (le))",
1229
1229
  "legendFormat": "p50",
1230
1230
  "refId": "A"
1231
1231
  },
@@ -1234,7 +1234,7 @@
1234
1234
  "type": "prometheus",
1235
1235
  "uid": "${datasource}"
1236
1236
  },
1237
- "expr": "histogram_quantile(0.95, rate(vms_cache_backfill_duration_seconds_bucket[5m]))",
1237
+ "expr": "histogram_quantile(0.95, sum(rate(vms_cache_backfill_duration_seconds_bucket[5m])) by (le))",
1238
1238
  "legendFormat": "p95",
1239
1239
  "refId": "B"
1240
1240
  }
@@ -1269,7 +1269,7 @@
1269
1269
  "type": "prometheus",
1270
1270
  "uid": "${datasource}"
1271
1271
  },
1272
- "expr": "rate(vms_cache_segment_added_low[5m])",
1272
+ "expr": "sum(rate(vms_cache_segment_added_low[5m]))",
1273
1273
  "legendFormat": "low/s",
1274
1274
  "refId": "A"
1275
1275
  },
@@ -1278,7 +1278,7 @@
1278
1278
  "type": "prometheus",
1279
1279
  "uid": "${datasource}"
1280
1280
  },
1281
- "expr": "rate(vms_cache_segment_added_high[5m])",
1281
+ "expr": "sum(rate(vms_cache_segment_added_high[5m]))",
1282
1282
  "legendFormat": "high/s",
1283
1283
  "refId": "B"
1284
1284
  }
@@ -1313,7 +1313,7 @@
1313
1313
  "type": "prometheus",
1314
1314
  "uid": "${datasource}"
1315
1315
  },
1316
- "expr": "histogram_quantile(0.50, rate(vms_gcs_first_byte_seconds_bucket[5m]))",
1316
+ "expr": "histogram_quantile(0.50, sum(rate(vms_gcs_first_byte_seconds_bucket[5m])) by (le))",
1317
1317
  "legendFormat": "p50",
1318
1318
  "refId": "A"
1319
1319
  },
@@ -1322,7 +1322,7 @@
1322
1322
  "type": "prometheus",
1323
1323
  "uid": "${datasource}"
1324
1324
  },
1325
- "expr": "histogram_quantile(0.95, rate(vms_gcs_first_byte_seconds_bucket[5m]))",
1325
+ "expr": "histogram_quantile(0.95, sum(rate(vms_gcs_first_byte_seconds_bucket[5m])) by (le))",
1326
1326
  "legendFormat": "p95",
1327
1327
  "refId": "B"
1328
1328
  },
@@ -1331,7 +1331,7 @@
1331
1331
  "type": "prometheus",
1332
1332
  "uid": "${datasource}"
1333
1333
  },
1334
- "expr": "histogram_quantile(0.99, rate(vms_gcs_first_byte_seconds_bucket[5m]))",
1334
+ "expr": "histogram_quantile(0.99, sum(rate(vms_gcs_first_byte_seconds_bucket[5m])) by (le))",
1335
1335
  "legendFormat": "p99",
1336
1336
  "refId": "C"
1337
1337
  }
@@ -1366,7 +1366,7 @@
1366
1366
  "type": "prometheus",
1367
1367
  "uid": "${datasource}"
1368
1368
  },
1369
- "expr": "histogram_quantile(0.50, rate(vms_gcs_stream_duration_seconds_bucket[5m]))",
1369
+ "expr": "histogram_quantile(0.50, sum(rate(vms_gcs_stream_duration_seconds_bucket[5m])) by (le))",
1370
1370
  "legendFormat": "p50",
1371
1371
  "refId": "A"
1372
1372
  },
@@ -1375,7 +1375,7 @@
1375
1375
  "type": "prometheus",
1376
1376
  "uid": "${datasource}"
1377
1377
  },
1378
- "expr": "histogram_quantile(0.95, rate(vms_gcs_stream_duration_seconds_bucket[5m]))",
1378
+ "expr": "histogram_quantile(0.95, sum(rate(vms_gcs_stream_duration_seconds_bucket[5m])) by (le))",
1379
1379
  "legendFormat": "p95",
1380
1380
  "refId": "B"
1381
1381
  }
@@ -1410,7 +1410,7 @@
1410
1410
  "type": "prometheus",
1411
1411
  "uid": "${datasource}"
1412
1412
  },
1413
- "expr": "histogram_quantile(0.50, rate(vms_gcs_segment_size_bytes_bucket[5m]))",
1413
+ "expr": "histogram_quantile(0.50, sum(rate(vms_gcs_segment_size_bytes_bucket[5m])) by (le))",
1414
1414
  "legendFormat": "p50",
1415
1415
  "refId": "A"
1416
1416
  },
@@ -1419,7 +1419,7 @@
1419
1419
  "type": "prometheus",
1420
1420
  "uid": "${datasource}"
1421
1421
  },
1422
- "expr": "histogram_quantile(0.95, rate(vms_gcs_segment_size_bytes_bucket[5m]))",
1422
+ "expr": "histogram_quantile(0.95, sum(rate(vms_gcs_segment_size_bytes_bucket[5m])) by (le))",
1423
1423
  "legendFormat": "p95",
1424
1424
  "refId": "B"
1425
1425
  }
@@ -1458,7 +1458,7 @@
1458
1458
  "type": "prometheus",
1459
1459
  "uid": "${datasource}"
1460
1460
  },
1461
- "expr": "rate(vms_segment_requests_not_found[5m])",
1461
+ "expr": "sum(rate(vms_segment_requests_not_found[5m]))",
1462
1462
  "legendFormat": "not_found/s",
1463
1463
  "refId": "A"
1464
1464
  }
@@ -1493,7 +1493,7 @@
1493
1493
  "type": "prometheus",
1494
1494
  "uid": "${datasource}"
1495
1495
  },
1496
- "expr": "histogram_quantile(0.50, rate(vms_segment_ingestion_lag_seconds_bucket[5m]))",
1496
+ "expr": "histogram_quantile(0.50, sum(rate(vms_segment_ingestion_lag_seconds_bucket[5m])) by (le))",
1497
1497
  "legendFormat": "p50",
1498
1498
  "refId": "A"
1499
1499
  },
@@ -1502,7 +1502,7 @@
1502
1502
  "type": "prometheus",
1503
1503
  "uid": "${datasource}"
1504
1504
  },
1505
- "expr": "histogram_quantile(0.95, rate(vms_segment_ingestion_lag_seconds_bucket[5m]))",
1505
+ "expr": "histogram_quantile(0.95, sum(rate(vms_segment_ingestion_lag_seconds_bucket[5m])) by (le))",
1506
1506
  "legendFormat": "p95",
1507
1507
  "refId": "B"
1508
1508
  }
@@ -1537,7 +1537,7 @@
1537
1537
  "type": "prometheus",
1538
1538
  "uid": "${datasource}"
1539
1539
  },
1540
- "expr": "histogram_quantile(0.50, rate(vms_segment_registration_duration_seconds_bucket[5m]))",
1540
+ "expr": "histogram_quantile(0.50, sum(rate(vms_segment_registration_duration_seconds_bucket[5m])) by (le))",
1541
1541
  "legendFormat": "p50",
1542
1542
  "refId": "A"
1543
1543
  },
@@ -1546,7 +1546,7 @@
1546
1546
  "type": "prometheus",
1547
1547
  "uid": "${datasource}"
1548
1548
  },
1549
- "expr": "histogram_quantile(0.95, rate(vms_segment_registration_duration_seconds_bucket[5m]))",
1549
+ "expr": "histogram_quantile(0.95, sum(rate(vms_segment_registration_duration_seconds_bucket[5m])) by (le))",
1550
1550
  "legendFormat": "p95",
1551
1551
  "refId": "B"
1552
1552
  }
@@ -1599,6 +1599,252 @@
1599
1599
  "x": 12,
1600
1600
  "y": 148
1601
1601
  }
1602
+ },
1603
+ {
1604
+ "datasource": {
1605
+ "type": "prometheus",
1606
+ "uid": "${datasource}"
1607
+ },
1608
+ "fieldConfig": {
1609
+ "defaults": {
1610
+ "unit": "s",
1611
+ "min": 0
1612
+ },
1613
+ "overrides": []
1614
+ },
1615
+ "id": 43,
1616
+ "options": {},
1617
+ "targets": [
1618
+ {
1619
+ "datasource": {
1620
+ "type": "prometheus",
1621
+ "uid": "${datasource}"
1622
+ },
1623
+ "expr": "histogram_quantile(0.50, sum(rate(vms_cache_tail_query_duration_seconds_bucket[5m])) by (le))",
1624
+ "legendFormat": "p50",
1625
+ "refId": "A"
1626
+ },
1627
+ {
1628
+ "datasource": {
1629
+ "type": "prometheus",
1630
+ "uid": "${datasource}"
1631
+ },
1632
+ "expr": "histogram_quantile(0.95, sum(rate(vms_cache_tail_query_duration_seconds_bucket[5m])) by (le))",
1633
+ "legendFormat": "p95",
1634
+ "refId": "B"
1635
+ }
1636
+ ],
1637
+ "title": "Cache Tail Query Latency",
1638
+ "type": "timeseries",
1639
+ "description": "Latency of the tail (frontier) query against the cache. Slow tail queries delay live playlist responses.",
1640
+ "gridPos": {
1641
+ "h": 9,
1642
+ "w": 12,
1643
+ "x": 0,
1644
+ "y": 157
1645
+ }
1646
+ },
1647
+ {
1648
+ "datasource": {
1649
+ "type": "prometheus",
1650
+ "uid": "${datasource}"
1651
+ },
1652
+ "fieldConfig": {
1653
+ "defaults": {
1654
+ "unit": "reqps",
1655
+ "min": 0
1656
+ },
1657
+ "overrides": []
1658
+ },
1659
+ "id": 44,
1660
+ "options": {},
1661
+ "targets": [
1662
+ {
1663
+ "datasource": {
1664
+ "type": "prometheus",
1665
+ "uid": "${datasource}"
1666
+ },
1667
+ "expr": "sum(rate(vms_cache_segment_marked_available_low[5m]))",
1668
+ "legendFormat": "low/s",
1669
+ "refId": "A"
1670
+ },
1671
+ {
1672
+ "datasource": {
1673
+ "type": "prometheus",
1674
+ "uid": "${datasource}"
1675
+ },
1676
+ "expr": "sum(rate(vms_cache_segment_marked_available_high[5m]))",
1677
+ "legendFormat": "high/s",
1678
+ "refId": "B"
1679
+ }
1680
+ ],
1681
+ "title": "Cache Segments Marked Available",
1682
+ "type": "timeseries",
1683
+ "description": "Rate of cache segments transitioning to available (upload confirmed) by quality. Tracks how quickly newly cached segments become playable.",
1684
+ "gridPos": {
1685
+ "h": 9,
1686
+ "w": 12,
1687
+ "x": 12,
1688
+ "y": 157
1689
+ }
1690
+ },
1691
+ {
1692
+ "datasource": {
1693
+ "type": "prometheus",
1694
+ "uid": "${datasource}"
1695
+ },
1696
+ "fieldConfig": {
1697
+ "defaults": {
1698
+ "unit": "short",
1699
+ "min": 0
1700
+ },
1701
+ "overrides": []
1702
+ },
1703
+ "id": 45,
1704
+ "options": {},
1705
+ "targets": [
1706
+ {
1707
+ "datasource": {
1708
+ "type": "prometheus",
1709
+ "uid": "${datasource}"
1710
+ },
1711
+ "expr": "histogram_quantile(0.50, sum(rate(vms_cache_segments_returned_low_bucket[5m])) by (le))",
1712
+ "legendFormat": "p50 low",
1713
+ "refId": "A"
1714
+ },
1715
+ {
1716
+ "datasource": {
1717
+ "type": "prometheus",
1718
+ "uid": "${datasource}"
1719
+ },
1720
+ "expr": "histogram_quantile(0.50, sum(rate(vms_cache_segments_returned_high_bucket[5m])) by (le))",
1721
+ "legendFormat": "p50 high",
1722
+ "refId": "B"
1723
+ }
1724
+ ],
1725
+ "title": "Cache Segments Returned",
1726
+ "type": "timeseries",
1727
+ "description": "Number of segments returned from the cache per lookup by quality (p50). Low counts may indicate frontier truncation.",
1728
+ "gridPos": {
1729
+ "h": 9,
1730
+ "w": 12,
1731
+ "x": 0,
1732
+ "y": 166
1733
+ }
1734
+ },
1735
+ {
1736
+ "datasource": {
1737
+ "type": "prometheus",
1738
+ "uid": "${datasource}"
1739
+ },
1740
+ "fieldConfig": {
1741
+ "defaults": {
1742
+ "unit": "short",
1743
+ "min": 0
1744
+ },
1745
+ "overrides": []
1746
+ },
1747
+ "id": 46,
1748
+ "options": {},
1749
+ "targets": [
1750
+ {
1751
+ "datasource": {
1752
+ "type": "prometheus",
1753
+ "uid": "${datasource}"
1754
+ },
1755
+ "expr": "histogram_quantile(0.50, sum(rate(vms_unavailable_segments_filtered_bucket[5m])) by (le))",
1756
+ "legendFormat": "p50",
1757
+ "refId": "A"
1758
+ },
1759
+ {
1760
+ "datasource": {
1761
+ "type": "prometheus",
1762
+ "uid": "${datasource}"
1763
+ },
1764
+ "expr": "histogram_quantile(0.95, sum(rate(vms_unavailable_segments_filtered_bucket[5m])) by (le))",
1765
+ "legendFormat": "p95",
1766
+ "refId": "B"
1767
+ }
1768
+ ],
1769
+ "title": "Unavailable Segments Filtered",
1770
+ "type": "timeseries",
1771
+ "description": "Segments filtered out of a response because they were not yet available (frontier truncation). Persistently high values indicate upload lag hiding recent footage.",
1772
+ "gridPos": {
1773
+ "h": 9,
1774
+ "w": 12,
1775
+ "x": 12,
1776
+ "y": 166
1777
+ }
1778
+ },
1779
+ {
1780
+ "datasource": {
1781
+ "type": "prometheus",
1782
+ "uid": "${datasource}"
1783
+ },
1784
+ "fieldConfig": {
1785
+ "defaults": {
1786
+ "unit": "reqps",
1787
+ "min": 0
1788
+ },
1789
+ "overrides": []
1790
+ },
1791
+ "id": 47,
1792
+ "options": {},
1793
+ "targets": [
1794
+ {
1795
+ "datasource": {
1796
+ "type": "prometheus",
1797
+ "uid": "${datasource}"
1798
+ },
1799
+ "expr": "sum(rate(vms_segment_uploaded_processed_total[5m]))",
1800
+ "legendFormat": "processed/s",
1801
+ "refId": "A"
1802
+ }
1803
+ ],
1804
+ "title": "Segments Uploaded Processed",
1805
+ "type": "timeseries",
1806
+ "description": "Rate of SegmentUploaded messages successfully processed (segment marked available after upload confirmation).",
1807
+ "gridPos": {
1808
+ "h": 9,
1809
+ "w": 12,
1810
+ "x": 0,
1811
+ "y": 175
1812
+ }
1813
+ },
1814
+ {
1815
+ "datasource": {
1816
+ "type": "prometheus",
1817
+ "uid": "${datasource}"
1818
+ },
1819
+ "fieldConfig": {
1820
+ "defaults": {
1821
+ "unit": "reqps",
1822
+ "min": 0
1823
+ },
1824
+ "overrides": []
1825
+ },
1826
+ "id": 48,
1827
+ "options": {},
1828
+ "targets": [
1829
+ {
1830
+ "datasource": {
1831
+ "type": "prometheus",
1832
+ "uid": "${datasource}"
1833
+ },
1834
+ "expr": "sum(rate(vms_pending_gap_skipped_total[5m]))",
1835
+ "legendFormat": "skipped/s",
1836
+ "refId": "A"
1837
+ }
1838
+ ],
1839
+ "title": "Pending Gaps Skipped",
1840
+ "type": "timeseries",
1841
+ "description": "Rate of pending (not-yet-available) gaps skipped during playlist generation. Elevated rates indicate upload lag leaving holes in the timeline.",
1842
+ "gridPos": {
1843
+ "h": 9,
1844
+ "w": 12,
1845
+ "x": 12,
1846
+ "y": 175
1847
+ }
1602
1848
  }
1603
1849
  ],
1604
1850
  "refresh": "30s",
@@ -1633,4 +1879,4 @@
1633
1879
  "title": "VMS Server",
1634
1880
  "uid": null,
1635
1881
  "version": 1
1636
- }
1882
+ }
@@ -1,5 +1,5 @@
1
1
  #! /usr/bin/env node
2
- import { $, chalk, fs, path } from 'zx'
2
+ import { $, fs, path } from 'zx'
3
3
  import findYarnWorkspaceRoot from 'find-yarn-workspace-root'
4
4
 
5
5
  import { log } from './Utils.mjs'
@@ -9,52 +9,58 @@ const $$ = $( {
9
9
  quiet : true
10
10
  } )
11
11
 
12
+ // Generates a fixed-name ESM wrapper placed at the root of the pruned tree.
13
+ // The Dockerfile can always `node entrypoint.mjs` regardless of which package
14
+ // is being dockerized. `main` is the entry path relative to the workspace
15
+ // root, which turbo prune preserves in the pruned output.
12
16
  const generateEntrypointFile = main => `
13
17
  import path from 'node:path'
14
- import { fileURLToPath } from 'url'
15
- import { createRequire } from 'node:module'
18
+ import { fileURLToPath, pathToFileURL } from 'node:url'
16
19
 
17
- const require = createRequire( import.meta.url )
18
- const __filename = fileURLToPath(import.meta.url)
19
- const __dirname = path.dirname(__filename)
20
+ const __filename = fileURLToPath( import.meta.url )
21
+ const __dirname = path.dirname( __filename )
20
22
 
21
- const indexPath = path.normalize(path.resolve( __dirname,'${main}'))
23
+ const indexPath = path.normalize( path.resolve( __dirname, '${main}' ) )
22
24
  process.env.APP_PLUGIN_ROOT = path.dirname( indexPath )
23
- const index = require(indexPath)
25
+ const index = await import( pathToFileURL( indexPath ).href )
24
26
 
25
- export default index
27
+ export default index.default ?? index
26
28
  `
27
29
 
28
30
  const packageJson = await fs.readJSON( path.join( process.env.INIT_CWD, './package.json' ) )
29
31
  log( `Building ${packageJson.name}...` )
32
+
33
+ const packageName = packageJson.name
30
34
  const mainEntry = path.join( process.env.INIT_CWD, packageJson.main )
31
35
  const root = findYarnWorkspaceRoot( process.env.INIT_CWD ) || process.env.INIT_CWD
32
36
 
37
+ // Entry path relative to the workspace root. turbo prune preserves the
38
+ // workspace's directory layout, so this same relative path resolves inside
39
+ // the pruned output.
33
40
  const main = path.relative( root, mainEntry )
34
41
 
35
- const packageName = process.env.npm_package_name
42
+ // Same out-of-tree staging dir the old yarn-build used. docker-to-registry
43
+ // (Docker.mjs) reads exactly this path, nests it under build/workspace/, and
44
+ // the Dockerfile copies that into /usr/src/app. turbo prune also refuses an
45
+ // --out-dir nested inside the workspace being pruned, so out-of-tree is
46
+ // required either way.
36
47
  const buildDir = `/tmp/${packageName.replace( '@leverege/', '' )}/build`
37
48
  log( `Output directory: ${buildDir}` )
38
49
 
39
- // await $$`yarn clean`
40
50
  log( 'Cleaning previous build output...' )
41
51
  await $$`rm -rf ${buildDir}`.catch( () => {} )
42
52
  await $$`mkdir -p ${buildDir}`.catch( () => {} )
43
- log( 'Ensuring yarn bundle plugin...' )
44
- let plugins = $.sync`yarn plugin runtime --json`.stdout.trim()
45
- plugins = plugins != null && plugins.length > 0 ? plugins.split( '\n' ).map( JSON.parse ) : []
46
- if ( !plugins.some( plg => plg.name === '@yarn.build/plugin-bundle' || plg.name === '@yarnpkg/plugin-bundle' ) ) {
47
- log( chalk.redBright( 'Yarn bundle plugin missing!' ) )
48
- log( `To fix this error, run:\n${chalk.green( 'yarn plugin import https://yarn.build/latest/bundle' )}` )
49
- process.exit( 1 )
50
- }
51
- log( 'Installing focused yarn dependencies...' )
52
- await $$`yarn workspaces focus ${packageName}`
53
- log( 'Bundling...' )
54
- await $$`yarn bundle --no-compress --output-directory ${buildDir}`
55
- log( 'Cleaning up unnecessary output files...' )
56
- await $$`rm -rf ${buildDir}/node_modules ${buildDir}/entrypoint.js`
57
53
 
58
- const entrypointFile = generateEntrypointFile( main )
54
+ // Prune the monorepo down to the target package and only the workspaces it
55
+ // actually depends on (per package.json), emitting a pruned lockfile. No
56
+ // bundling / compilation: the servers run raw ESM source, so the pruned tree
57
+ // IS the deployable. node_modules is intentionally not copied; the Docker
58
+ // build installs from the pruned lockfile. Without --docker, turbo emits a
59
+ // flat pruned workspace tree (root package.json, workspace dirs, lockfile)
60
+ // directly into the out dir.
61
+ log( `Pruning workspace ${packageName}...` )
62
+ await $$`yarn dlx turbo@^2 prune ${packageName} --out-dir ${buildDir}`
59
63
 
64
+ log( 'Writing entrypoint...' )
65
+ const entrypointFile = generateEntrypointFile( main )
60
66
  await fs.writeFile( `${buildDir}/entrypoint.mjs`, entrypointFile, 'utf-8' )