@radicaltools/cli 0.6.1 → 0.6.3
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/dist/{chunk-SBQRTX3Y.js → chunk-KLTSABHI.js} +1 -1
- package/dist/{dist-LSHMW73I.js → dist-5LSJ4CQ3.js} +2 -2
- package/dist/hub-catalogue/concern/concern-accessibility.radical +85 -1
- package/dist/hub-catalogue/concern/concern-api-collections.radical +78 -1
- package/dist/hub-catalogue/concern/concern-api-errors.radical +78 -1
- package/dist/hub-catalogue/concern/concern-api-evolution.radical +78 -1
- package/dist/hub-catalogue/concern/concern-api-idempotency.radical +121 -3
- package/dist/hub-catalogue/concern/concern-api-resource-design.radical +78 -1
- package/dist/hub-catalogue/concern/concern-api-style-guide.radical +78 -1
- package/dist/hub-catalogue/concern/concern-architecture-style.radical +83 -7
- package/dist/hub-catalogue/concern/concern-audit-trail.radical +77 -1
- package/dist/hub-catalogue/concern/concern-authentication.radical +178 -8
- package/dist/hub-catalogue/concern/concern-authorization.radical +133 -7
- package/dist/hub-catalogue/concern/concern-availability.radical +156 -6
- package/dist/hub-catalogue/concern/concern-backend-stack.radical +71 -8
- package/dist/hub-catalogue/concern/concern-backup-recovery.radical +136 -6
- package/dist/hub-catalogue/concern/concern-caching.radical +73 -1
- package/dist/hub-catalogue/concern/concern-capacity.radical +124 -5
- package/dist/hub-catalogue/concern/concern-ci-cd-pipeline.radical +154 -15
- package/dist/hub-catalogue/concern/concern-code-documentation.radical +131 -13
- package/dist/hub-catalogue/concern/concern-code-quality-gate.radical +116 -7
- package/dist/hub-catalogue/concern/concern-code-review-branching.radical +174 -13
- package/dist/hub-catalogue/concern/concern-code-style.radical +148 -16
- package/dist/hub-catalogue/concern/concern-communication-style.radical +94 -7
- package/dist/hub-catalogue/concern/concern-data-classification.radical +77 -1
- package/dist/hub-catalogue/concern/concern-data-consistency.radical +87 -5
- package/dist/hub-catalogue/concern/concern-data-store.radical +87 -5
- package/dist/hub-catalogue/concern/concern-decomposition.radical +78 -1
- package/dist/hub-catalogue/concern/concern-definition-of-done.radical +150 -11
- package/dist/hub-catalogue/concern/concern-delivery-metrics.radical +130 -5
- package/dist/hub-catalogue/concern/concern-dependency-hygiene.radical +127 -10
- package/dist/hub-catalogue/concern/concern-deployment.radical +113 -9
- package/dist/hub-catalogue/concern/concern-encryption.radical +146 -5
- package/dist/hub-catalogue/concern/concern-error-handling-logging.radical +118 -12
- package/dist/hub-catalogue/concern/concern-eu-dora.radical +69 -1
- package/dist/hub-catalogue/concern/concern-frontend-stack.radical +148 -9
- package/dist/hub-catalogue/concern/concern-incident-management.radical +122 -1
- package/dist/hub-catalogue/concern/concern-infrastructure.radical +54 -1
- package/dist/hub-catalogue/concern/concern-integration-resilience.radical +110 -5
- package/dist/hub-catalogue/concern/concern-messaging.radical +89 -2
- package/dist/hub-catalogue/concern/concern-mobile-performance.radical +67 -1
- package/dist/hub-catalogue/concern/concern-module-boundaries.radical +92 -5
- package/dist/hub-catalogue/concern/concern-observability.radical +105 -1
- package/dist/hub-catalogue/concern/concern-operational-readiness.radical +140 -5
- package/dist/hub-catalogue/concern/concern-personal-data.radical +206 -7
- package/dist/hub-catalogue/concern/concern-quality-priorities.radical +104 -12
- package/dist/hub-catalogue/concern/concern-rate-limiting.radical +110 -1
- package/dist/hub-catalogue/concern/concern-release-versioning.radical +99 -7
- package/dist/hub-catalogue/concern/concern-retention.radical +130 -9
- package/dist/hub-catalogue/concern/concern-secrets.radical +196 -12
- package/dist/hub-catalogue/concern/concern-secure-coding.radical +122 -1
- package/dist/hub-catalogue/concern/concern-secure-development.radical +118 -1
- package/dist/hub-catalogue/concern/concern-security-detection.radical +124 -1
- package/dist/hub-catalogue/concern/concern-supply-chain.radical +116 -1
- package/dist/hub-catalogue/concern/concern-technical-debt.radical +162 -19
- package/dist/hub-catalogue/concern/concern-technology-lifecycle.radical +152 -18
- package/dist/hub-catalogue/concern/concern-tenant-isolation.radical +111 -1
- package/dist/hub-catalogue/concern/concern-test-strategy.radical +83 -7
- package/dist/hub-catalogue/concern/concern-threat-modelling.radical +120 -1
- package/dist/hub-catalogue/concern/concern-usability.radical +84 -5
- package/dist/index.js +68 -18
- package/dist/{pdfjs-WWNLOMK2.js → pdfjs-NDGKK4BL.js} +1 -1
- package/dist/{undici-53QU2XSN.js → undici-BOSAZUPY.js} +1 -1
- package/package.json +1 -1
|
@@ -18,7 +18,79 @@
|
|
|
18
18
|
"trigger": "LIST RELATIONS WHERE (source.type = \"container\" OR source.type = \"component\") AND source.external != true AND target.type = \"database\"",
|
|
19
19
|
"applyTo": "source",
|
|
20
20
|
"why": "these elements read a data store, so whether and where its data is cached, how stale a reader may see it, and what happens when the cache misses or fails has to be decided.",
|
|
21
|
-
"group": "architecture"
|
|
21
|
+
"group": "architecture",
|
|
22
|
+
"scope": {
|
|
23
|
+
"group": "architecture",
|
|
24
|
+
"questions": [
|
|
25
|
+
{
|
|
26
|
+
"key": "TEAMS",
|
|
27
|
+
"label": "How many teams build it?",
|
|
28
|
+
"default": "one",
|
|
29
|
+
"hint": "Several teams need the system cut into parts each can own and change alone.",
|
|
30
|
+
"options": [
|
|
31
|
+
{
|
|
32
|
+
"value": "one",
|
|
33
|
+
"label": "one team or fewer",
|
|
34
|
+
"description": "One person or one team builds all of it."
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
"value": "several",
|
|
38
|
+
"label": "several teams",
|
|
39
|
+
"description": "Several teams each own parts of it."
|
|
40
|
+
}
|
|
41
|
+
]
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
"key": "SCALE",
|
|
45
|
+
"label": "How large is it?",
|
|
46
|
+
"default": "small",
|
|
47
|
+
"hint": "Caches, queues and split services pay for themselves only at some scale.",
|
|
48
|
+
"options": [
|
|
49
|
+
{
|
|
50
|
+
"value": "small",
|
|
51
|
+
"label": "small",
|
|
52
|
+
"description": "One site or one team's users; up to some thousands of users or requests a day."
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
"value": "medium",
|
|
56
|
+
"label": "medium",
|
|
57
|
+
"description": "Several sites or a region; tens of thousands of users a day, or peaks it must be sized for."
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
"value": "large",
|
|
61
|
+
"label": "large",
|
|
62
|
+
"description": "Hundreds of thousands of users or more, several regions, load that scales out and back."
|
|
63
|
+
}
|
|
64
|
+
]
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
"key": "INTEGRATIONS",
|
|
68
|
+
"label": "How many other systems does it depend on?",
|
|
69
|
+
"default": "few",
|
|
70
|
+
"hint": "Every system it calls can be slow or down; many of them need resilience patterns.",
|
|
71
|
+
"options": [
|
|
72
|
+
{
|
|
73
|
+
"value": "few",
|
|
74
|
+
"label": "a few",
|
|
75
|
+
"description": "Up to two or three external systems (a payment provider, an e-mail service)."
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
"value": "many",
|
|
79
|
+
"label": "many",
|
|
80
|
+
"description": "Many external or internal systems it calls or exchanges data with."
|
|
81
|
+
}
|
|
82
|
+
]
|
|
83
|
+
}
|
|
84
|
+
],
|
|
85
|
+
"when": [
|
|
86
|
+
{
|
|
87
|
+
"SCALE": [
|
|
88
|
+
"medium",
|
|
89
|
+
"large"
|
|
90
|
+
]
|
|
91
|
+
}
|
|
92
|
+
]
|
|
93
|
+
}
|
|
22
94
|
},
|
|
23
95
|
"sources": [
|
|
24
96
|
{
|
|
@@ -19,7 +19,101 @@
|
|
|
19
19
|
"id": "capacity",
|
|
20
20
|
"trigger": "LIST NODES WHERE (type = \"container\" OR type = \"webapp\" OR type = \"database\" OR type = \"queue\") AND external != true",
|
|
21
21
|
"why": "these elements run on capacity of their own (instances, connections, storage, throughput), so the load they must carry, how they scale and what they do when overloaded has to be decided.",
|
|
22
|
-
"group": "operability"
|
|
22
|
+
"group": "operability",
|
|
23
|
+
"scope": {
|
|
24
|
+
"group": "operability",
|
|
25
|
+
"questions": [
|
|
26
|
+
{
|
|
27
|
+
"key": "DOWNTIME",
|
|
28
|
+
"label": "If it stops, what happens, and how soon must it be back?",
|
|
29
|
+
"default": "hours",
|
|
30
|
+
"hint": "The longest outage the business can bear decides how much redundancy, backup and response it needs (BSI 200-2 protection needs, ISO 22301).",
|
|
31
|
+
"options": [
|
|
32
|
+
{
|
|
33
|
+
"value": "workaround",
|
|
34
|
+
"label": "people wait or work around it; a day is fine",
|
|
35
|
+
"description": "People wait, use paper or the phone, and catch up later; one to three days down is bearable (BSI normal)."
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"value": "hours",
|
|
39
|
+
"label": "customers cannot work or buy; back within hours",
|
|
40
|
+
"description": "Customers cannot do what they came for and some go elsewhere; it must be back within hours (BSI high)."
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
"value": "critical",
|
|
44
|
+
"label": "safety, an essential service or large losses; back within an hour",
|
|
45
|
+
"description": "People's safety, an essential service, a contract (SLA) or large sums are at stake within minutes (BSI very high)."
|
|
46
|
+
}
|
|
47
|
+
]
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
"key": "LOAD",
|
|
51
|
+
"label": "What load does it carry?",
|
|
52
|
+
"default": "light",
|
|
53
|
+
"hint": "Only a load that grows or peaks needs sizing, autoscaling and load tests.",
|
|
54
|
+
"options": [
|
|
55
|
+
{
|
|
56
|
+
"value": "light",
|
|
57
|
+
"label": "light and steady",
|
|
58
|
+
"description": "Up to some thousands of users or requests a day, no peaks that matter."
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
"value": "peaks",
|
|
62
|
+
"label": "peaks or tens of thousands",
|
|
63
|
+
"description": "Tens of thousands of users a day, or peaks (a sale, a deadline, a season) it must be sized for."
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
"value": "large",
|
|
67
|
+
"label": "large, scaling out",
|
|
68
|
+
"description": "Hundreds of thousands of users or more, several regions, load that has to scale out and back."
|
|
69
|
+
}
|
|
70
|
+
]
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
"key": "ONCALL",
|
|
74
|
+
"label": "Who answers when it breaks?",
|
|
75
|
+
"default": "builders",
|
|
76
|
+
"hint": "An incident process and game days pay off once someone is expected to answer out of hours.",
|
|
77
|
+
"options": [
|
|
78
|
+
{
|
|
79
|
+
"value": "builders",
|
|
80
|
+
"label": "the people who build it, in working hours",
|
|
81
|
+
"description": "The developers look at it when they are at work; nobody is on call."
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
"value": "outofhours",
|
|
85
|
+
"label": "someone answers out of hours",
|
|
86
|
+
"description": "Someone is reachable evenings and weekends, though not a full rota."
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
"value": "rota",
|
|
90
|
+
"label": "an on-call rota round the clock",
|
|
91
|
+
"description": "An on-call rota answers at any hour, with escalation."
|
|
92
|
+
}
|
|
93
|
+
]
|
|
94
|
+
}
|
|
95
|
+
],
|
|
96
|
+
"when": [
|
|
97
|
+
{
|
|
98
|
+
"LOAD": [
|
|
99
|
+
"peaks",
|
|
100
|
+
"large"
|
|
101
|
+
]
|
|
102
|
+
}
|
|
103
|
+
]
|
|
104
|
+
},
|
|
105
|
+
"scopeAnswers": [
|
|
106
|
+
{
|
|
107
|
+
"when": {
|
|
108
|
+
"LOAD": [
|
|
109
|
+
"peaks"
|
|
110
|
+
]
|
|
111
|
+
},
|
|
112
|
+
"answers": {
|
|
113
|
+
"LOADTEST": "scheduled"
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
]
|
|
23
117
|
},
|
|
24
118
|
"sources": [
|
|
25
119
|
{
|
|
@@ -110,7 +204,12 @@
|
|
|
110
204
|
"label": "load shedding for requests and a bounded queue for work",
|
|
111
205
|
"description": "The synchronous part sheds load, the asynchronous part queues it with backpressure. Pick it when the element both answers callers and processes work in the background."
|
|
112
206
|
}
|
|
113
|
-
]
|
|
207
|
+
],
|
|
208
|
+
"scopeWhen": {
|
|
209
|
+
"LOAD": [
|
|
210
|
+
"large"
|
|
211
|
+
]
|
|
212
|
+
}
|
|
114
213
|
},
|
|
115
214
|
{
|
|
116
215
|
"key": "LOADTEST",
|
|
@@ -240,6 +339,11 @@
|
|
|
240
339
|
"SCALING": [
|
|
241
340
|
"horizontal",
|
|
242
341
|
"serverless"
|
|
342
|
+
],
|
|
343
|
+
"OVERLOAD": [
|
|
344
|
+
"shed",
|
|
345
|
+
"backpressure",
|
|
346
|
+
"both"
|
|
243
347
|
]
|
|
244
348
|
}
|
|
245
349
|
},
|
|
@@ -377,6 +481,11 @@
|
|
|
377
481
|
"SCALING": [
|
|
378
482
|
"horizontal",
|
|
379
483
|
"serverless"
|
|
484
|
+
],
|
|
485
|
+
"OVERLOAD": [
|
|
486
|
+
"shed",
|
|
487
|
+
"backpressure",
|
|
488
|
+
"both"
|
|
380
489
|
]
|
|
381
490
|
}
|
|
382
491
|
},
|
|
@@ -452,7 +561,7 @@
|
|
|
452
561
|
"status": "accepted",
|
|
453
562
|
"date": "",
|
|
454
563
|
"context": "This element runs on capacity someone has to provide. The forces: load is not flat (a busy hour, a campaign, a sale day can be several times the usual), and a service sized for the average falls over at the peak; an overloaded service does not slow down gracefully, it queues, times out and retries until it serves nobody (a cascading failure); adding instances takes minutes and only helps when the element keeps no state of its own; whatever it calls (a database, a partner) has limits of its own that scaling out can break; idle capacity costs money every hour; and the only way to know the breaking point is to measure it before users find it. The snippets of this pack assume the element is order-api in the shop namespace, with Prometheus, cAdvisor and kube-state-metrics on Kubernetes; rename them for yours.",
|
|
455
|
-
"decision": "The element runs a fixed number of instances sized so that the peak ({{PEAK_FACTOR}} times {{EXPECTED_RPS}} requests per second) uses at most 70 % of CPU, memory and connection pools, and losing one instance still carries it (N+1). Capacity changes by a reviewed change in the infrastructure code (Terraform, Pulumi, Helm values), driven by a headroom alert on the weekly busiest hour that opens a ticket.
|
|
564
|
+
"decision": "The element runs a fixed number of instances sized so that the peak ({{PEAK_FACTOR}} times {{EXPECTED_RPS}} requests per second) uses at most 70 % of CPU, memory and connection pools, and losing one instance still carries it (N+1). Capacity changes by a reviewed change in the infrastructure code (Terraform, Pulumi, Helm values), driven by a headroom alert on the weekly busiest hour that opens a ticket. Load tests: {{LOADTEST}}. Choose bigger instances over more of them only while the element keeps state that cannot be split; otherwise add instances.",
|
|
456
565
|
"consequences": "• Predictable cost and behaviour; nothing scales by surprise.\n• Paying for the peak all the time: at a peak factor of {{PEAK_FACTOR}}, most of the capacity idles most of the day.\n• An unexpected peak above the headroom is handled only by the overload rule, until someone adds capacity.\n• Growing one instance has a ceiling: the largest instance type.",
|
|
457
566
|
"alternatives": "1. Horizontal autoscaling: follows the load and saves idle cost, but the element must be stateless and start fast.\n2. Serverless: no capacity to plan, but cold starts and per-request cost at steady high load.",
|
|
458
567
|
"hubWhen": {
|
|
@@ -471,7 +580,7 @@
|
|
|
471
580
|
"status": "accepted",
|
|
472
581
|
"date": "",
|
|
473
582
|
"context": "This element runs on capacity someone has to provide. The forces: load is not flat (a busy hour, a campaign, a sale day can be several times the usual), and a service sized for the average falls over at the peak; an overloaded service does not slow down gracefully, it queues, times out and retries until it serves nobody (a cascading failure); adding instances takes minutes and only helps when the element keeps no state of its own; whatever it calls (a database, a partner) has limits of its own that scaling out can break; idle capacity costs money every hour; and the only way to know the breaking point is to measure it before users find it. The snippets of this pack assume the element is order-api in the shop namespace, with Prometheus, cAdvisor and kube-state-metrics on Kubernetes; rename them for yours.",
|
|
474
|
-
"decision": "The element runs stateless instances that the platform adds and removes: on Kubernetes, a HorizontalPodAutoscaler on CPU or on request rate (through KEDA or the Prometheus Adapter); elsewhere ECS Service Auto Scaling, Azure VM scale sets or Container Apps scale rules. Minimum replicas (at least 2) carry {{EXPECTED_RPS}} requests per second with one zone lost; maximum replicas carry 1.5 times the peak ({{PEAK_FACTOR}} times the normal load) and, times the pool size per instance, stay within the {{CONCURRENCY_CAP}} connections the database accepts; scale-in waits 15 minutes. Instances start serving within 60 seconds and hold no session or file of their own.
|
|
583
|
+
"decision": "The element runs stateless instances that the platform adds and removes: on Kubernetes, a HorizontalPodAutoscaler on CPU or on request rate (through KEDA or the Prometheus Adapter); elsewhere ECS Service Auto Scaling, Azure VM scale sets or Container Apps scale rules. Minimum replicas (at least 2) carry {{EXPECTED_RPS}} requests per second with one zone lost; maximum replicas carry 1.5 times the peak ({{PEAK_FACTOR}} times the normal load) and, times the pool size per instance, stay within the {{CONCURRENCY_CAP}} connections the database accepts; scale-in waits 15 minutes. Instances start serving within 60 seconds and hold no session or file of their own. Load tests: {{LOADTEST}}. Choose the metric that rises first with load: request rate or concurrency for APIs, queue length for workers, CPU only when the work is CPU-bound.",
|
|
475
584
|
"consequences": "• Capacity follows the load; idle cost drops at night.\n• The element must be stateless and start fast; sessions and uploads live in shared stores.\n• Scaling takes minutes; a spike faster than that is met by the overload rule.\n• The maximum is a deliberate ceiling: at it, an alert asks whether to raise it or shed load.\n• Downstream limits (database connections) cap how far scaling helps; the pool size times the maximum replicas is that cap.",
|
|
476
585
|
"alternatives": "1. A fixed fleet sized for the peak: simpler, but pays for the peak all year.\n2. Serverless: scales per request to zero, at the cost of cold starts and platform limits.",
|
|
477
586
|
"hubWhen": {
|
|
@@ -490,7 +599,7 @@
|
|
|
490
599
|
"status": "accepted",
|
|
491
600
|
"date": "",
|
|
492
601
|
"context": "This element runs on capacity someone has to provide. The forces: load is not flat (a busy hour, a campaign, a sale day can be several times the usual), and a service sized for the average falls over at the peak; an overloaded service does not slow down gracefully, it queues, times out and retries until it serves nobody (a cascading failure); adding instances takes minutes and only helps when the element keeps no state of its own; whatever it calls (a database, a partner) has limits of its own that scaling out can break; idle capacity costs money every hour; and the only way to know the breaking point is to measure it before users find it. The snippets of this pack assume the element is order-api in the shop namespace, with Prometheus, cAdvisor and kube-state-metrics on Kubernetes; rename them for yours.",
|
|
493
|
-
"decision": "The element runs on a serverless platform that starts instances per demand: AWS Lambda, Google Cloud Run, Azure Functions (Flex Consumption) or Azure Container Apps. Warm capacity (provisioned concurrency or minimum instances) carries {{EXPECTED_RPS}} requests per second; maximum concurrency is capped at {{CONCURRENCY_CAP}}, what its database and other dependencies accept, with a connection pooler (Amazon RDS Proxy, PgBouncer) in front of the database; above the cap the platform throttles, which is the overload behaviour working.
|
|
602
|
+
"decision": "The element runs on a serverless platform that starts instances per demand: AWS Lambda, Google Cloud Run, Azure Functions (Flex Consumption) or Azure Container Apps. Warm capacity (provisioned concurrency or minimum instances) carries {{EXPECTED_RPS}} requests per second; maximum concurrency is capped at {{CONCURRENCY_CAP}}, what its database and other dependencies accept, with a connection pooler (Amazon RDS Proxy, PgBouncer) in front of the database; above the cap the platform throttles, which is the overload behaviour working. Load tests: {{LOADTEST}}. Choose the platform by request duration (Lambda up to 15 minutes; Cloud Run and Container Apps for containers and longer requests), cold start of the runtime, and cost at the steady load: above a few million requests a day, compare with containers on autoscaling.",
|
|
494
603
|
"consequences": "• No capacity to plan or idle fleet to pay for; scaling is per request.\n• Cold starts add latency at the start of every burst; warm capacity costs money.\n• Account and regional concurrency limits apply and must be raised ahead of peaks; a throttle below our own cap means that limit was hit.\n• Scaling out can flood the database: the concurrency cap and the pooler are not optional.\n• Ties the element to the platform's runtime, limits and pricing.",
|
|
495
604
|
"alternatives": "1. Containers with horizontal autoscaling: no cold starts and cheaper at steady load, but capacity to manage.\n2. A fixed fleet: predictable, but sized for a peak that rarely comes.",
|
|
496
605
|
"hubWhen": {
|
|
@@ -642,6 +751,11 @@
|
|
|
642
751
|
"hubWhen": {
|
|
643
752
|
"SCALING": [
|
|
644
753
|
"horizontal"
|
|
754
|
+
],
|
|
755
|
+
"OVERLOAD": [
|
|
756
|
+
"shed",
|
|
757
|
+
"backpressure",
|
|
758
|
+
"both"
|
|
645
759
|
]
|
|
646
760
|
}
|
|
647
761
|
},
|
|
@@ -659,6 +773,11 @@
|
|
|
659
773
|
"hubWhen": {
|
|
660
774
|
"SCALING": [
|
|
661
775
|
"serverless"
|
|
776
|
+
],
|
|
777
|
+
"OVERLOAD": [
|
|
778
|
+
"shed",
|
|
779
|
+
"backpressure",
|
|
780
|
+
"both"
|
|
662
781
|
]
|
|
663
782
|
}
|
|
664
783
|
},
|
|
@@ -19,7 +19,66 @@
|
|
|
19
19
|
"id": "ci-cd-pipeline",
|
|
20
20
|
"trigger": "LIST NODES WHERE (type = \"container\" OR type = \"webapp\") AND external != true",
|
|
21
21
|
"why": "these elements are built, checked and deployed by a pipeline, so how that pipeline is defined, what it gates, what it deploys and how fast and reliable it is has to be decided.",
|
|
22
|
-
"group": "sdlc"
|
|
22
|
+
"group": "sdlc",
|
|
23
|
+
"scope": {
|
|
24
|
+
"group": "sdlc",
|
|
25
|
+
"questions": [
|
|
26
|
+
{
|
|
27
|
+
"key": "USE",
|
|
28
|
+
"label": "What is the software for?",
|
|
29
|
+
"default": "business",
|
|
30
|
+
"hint": "Software for one's own use can be built by hand; an organisation that runs or ships it needs a repeatable way to build, release and deploy.",
|
|
31
|
+
"options": [
|
|
32
|
+
{
|
|
33
|
+
"value": "personal",
|
|
34
|
+
"label": "our own or home use",
|
|
35
|
+
"description": "A hobby project or a tool for oneself or a household; nobody else depends on it."
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"value": "business",
|
|
39
|
+
"label": "a system an organisation runs",
|
|
40
|
+
"description": "A company or public body runs it for its staff or customers (an internal tool, an online shop, a booking system)."
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
"value": "product",
|
|
44
|
+
"label": "a product we ship to others",
|
|
45
|
+
"description": "Software sold or handed to customers who install or run it themselves, or offered to many organisations."
|
|
46
|
+
}
|
|
47
|
+
]
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
"key": "TEAM",
|
|
51
|
+
"label": "Who builds it?",
|
|
52
|
+
"default": "small",
|
|
53
|
+
"hint": "Review, a Definition of Done and delivery metrics need more than one or two people.",
|
|
54
|
+
"options": [
|
|
55
|
+
{
|
|
56
|
+
"value": "small",
|
|
57
|
+
"label": "one or two people",
|
|
58
|
+
"description": "One or two developers."
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
"value": "team",
|
|
62
|
+
"label": "a team",
|
|
63
|
+
"description": "A team of its own."
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
"value": "teams",
|
|
67
|
+
"label": "several teams",
|
|
68
|
+
"description": "Several teams contributing to it."
|
|
69
|
+
}
|
|
70
|
+
]
|
|
71
|
+
}
|
|
72
|
+
],
|
|
73
|
+
"when": [
|
|
74
|
+
{
|
|
75
|
+
"USE": [
|
|
76
|
+
"business",
|
|
77
|
+
"product"
|
|
78
|
+
]
|
|
79
|
+
}
|
|
80
|
+
]
|
|
81
|
+
}
|
|
23
82
|
},
|
|
24
83
|
"sources": [
|
|
25
84
|
{
|
|
@@ -170,7 +229,13 @@
|
|
|
170
229
|
"label": "in CI only",
|
|
171
230
|
"description": "The checks are written for the CI runners, and developers push to learn the result. Pick it when the checks need what laptops lack (a GPU, cloud services, large data sets), or when the pipeline answers fast enough that a local run adds little."
|
|
172
231
|
}
|
|
173
|
-
]
|
|
232
|
+
],
|
|
233
|
+
"scopeWhen": {
|
|
234
|
+
"TEAM": [
|
|
235
|
+
"team",
|
|
236
|
+
"teams"
|
|
237
|
+
]
|
|
238
|
+
}
|
|
174
239
|
},
|
|
175
240
|
{
|
|
176
241
|
"key": "PR_MINUTES",
|
|
@@ -227,7 +292,13 @@
|
|
|
227
292
|
"y": 130,
|
|
228
293
|
"ears_type": "ubiquitous",
|
|
229
294
|
"action": "run its pull-request checks on the CI platform's runners for every pull request, and refuse the merge until the gate job ci, which needs every other job of the pull-request workflow, has succeeded, counting a skipped or cancelled job as a failure",
|
|
230
|
-
"rationale": "A green run on a developer's machine is evidence nobody else can see; a required check on the server is the gate nobody can skip, and GitHub reports a skipped job as a success unless a gate counts it (Fowler, Continuous Integration; GitHub Docs: Using conditions to control job execution)."
|
|
295
|
+
"rationale": "A green run on a developer's machine is evidence nobody else can see; a required check on the server is the gate nobody can skip, and GitHub reports a skipped job as a success unless a gate counts it (Fowler, Continuous Integration; GitHub Docs: Using conditions to control job execution).",
|
|
296
|
+
"hubWhen": {
|
|
297
|
+
"LOCAL": [
|
|
298
|
+
"mirrored",
|
|
299
|
+
"ci-only"
|
|
300
|
+
]
|
|
301
|
+
}
|
|
231
302
|
},
|
|
232
303
|
{
|
|
233
304
|
"id": "req-pr-time",
|
|
@@ -237,7 +308,13 @@
|
|
|
237
308
|
"y": 260,
|
|
238
309
|
"ears_type": "ubiquitous",
|
|
239
310
|
"action": "finish all the pipeline runs of a pull-request commit, from the start of the first to the end of the last, within {{PR_MINUTES}} minutes for at least 90 % of the commits of the last 30 days",
|
|
240
|
-
"rationale": "Feedback that people wait for keeps changes small and integrated; a slow pipeline is worked around by batching changes and merging without waiting (Fowler, Continuous Integration: keep the build fast; DORA: continuous integration)."
|
|
311
|
+
"rationale": "Feedback that people wait for keeps changes small and integrated; a slow pipeline is worked around by batching changes and merging without waiting (Fowler, Continuous Integration: keep the build fast; DORA: continuous integration).",
|
|
312
|
+
"hubWhen": {
|
|
313
|
+
"LOCAL": [
|
|
314
|
+
"mirrored",
|
|
315
|
+
"ci-only"
|
|
316
|
+
]
|
|
317
|
+
}
|
|
241
318
|
},
|
|
242
319
|
{
|
|
243
320
|
"id": "req-main-green",
|
|
@@ -247,7 +324,13 @@
|
|
|
247
324
|
"y": 390,
|
|
248
325
|
"ears_type": "ubiquitous",
|
|
249
326
|
"action": "complete every run of at least {{MAIN_SUCCESS_PCT}} % of the commits pushed to main successfully, over the last 30 days, with cancelled and skipped runs left out",
|
|
250
|
-
"rationale": "A main branch that is often red cannot be released from, and a red build everyone is used to hides the next real failure (Fowler, Continuous Integration: fix broken builds immediately)."
|
|
327
|
+
"rationale": "A main branch that is often red cannot be released from, and a red build everyone is used to hides the next real failure (Fowler, Continuous Integration: fix broken builds immediately).",
|
|
328
|
+
"hubWhen": {
|
|
329
|
+
"LOCAL": [
|
|
330
|
+
"mirrored",
|
|
331
|
+
"ci-only"
|
|
332
|
+
]
|
|
333
|
+
}
|
|
251
334
|
},
|
|
252
335
|
{
|
|
253
336
|
"id": "req-reruns",
|
|
@@ -257,7 +340,13 @@
|
|
|
257
340
|
"y": 520,
|
|
258
341
|
"ears_type": "ubiquitous",
|
|
259
342
|
"action": "need a second attempt for at most {{RERUN_PCT}} % of its completed runs over the last 30 days",
|
|
260
|
-
"rationale": "A run that passes on a second attempt teaches everyone to press Re-run, and then real failures are rerun too; the rerun rate shows the pipeline's own flakiness, while flaky tests are handled as the Test strategy pack decides (Fowler, Eradicating Non-Determinism in Tests)."
|
|
343
|
+
"rationale": "A run that passes on a second attempt teaches everyone to press Re-run, and then real failures are rerun too; the rerun rate shows the pipeline's own flakiness, while flaky tests are handled as the Test strategy pack decides (Fowler, Eradicating Non-Determinism in Tests).",
|
|
344
|
+
"hubWhen": {
|
|
345
|
+
"LOCAL": [
|
|
346
|
+
"mirrored",
|
|
347
|
+
"ci-only"
|
|
348
|
+
]
|
|
349
|
+
}
|
|
261
350
|
},
|
|
262
351
|
{
|
|
263
352
|
"id": "req-concurrency",
|
|
@@ -267,7 +356,13 @@
|
|
|
267
356
|
"y": 650,
|
|
268
357
|
"ears_type": "ubiquitous",
|
|
269
358
|
"action": "cancel the running pipeline of a pull request when a newer commit is pushed to it, and run the deploys to one environment one at a time, never cancelling one that has started",
|
|
270
|
-
"rationale": "Runs of a superseded commit only take runners from the current one, while a deploy cut off halfway leaves an environment in neither version (GitHub Docs: Control the concurrency of workflows and jobs)."
|
|
359
|
+
"rationale": "Runs of a superseded commit only take runners from the current one, while a deploy cut off halfway leaves an environment in neither version (GitHub Docs: Control the concurrency of workflows and jobs).",
|
|
360
|
+
"hubWhen": {
|
|
361
|
+
"LOCAL": [
|
|
362
|
+
"mirrored",
|
|
363
|
+
"ci-only"
|
|
364
|
+
]
|
|
365
|
+
}
|
|
271
366
|
},
|
|
272
367
|
{
|
|
273
368
|
"id": "req-build-once",
|
|
@@ -363,7 +458,13 @@
|
|
|
363
458
|
"y": 130,
|
|
364
459
|
"given": "a pull request whose test job fails, so that the job after it is skipped",
|
|
365
460
|
"when": "the pipeline finishes",
|
|
366
|
-
"then": "the gate job ci fails and the pull request cannot be merged, although the skipped job shows as passed"
|
|
461
|
+
"then": "the gate job ci fails and the pull request cannot be merged, although the skipped job shows as passed",
|
|
462
|
+
"hubWhen": {
|
|
463
|
+
"LOCAL": [
|
|
464
|
+
"mirrored",
|
|
465
|
+
"ci-only"
|
|
466
|
+
]
|
|
467
|
+
}
|
|
367
468
|
},
|
|
368
469
|
{
|
|
369
470
|
"id": "sc-pr-time",
|
|
@@ -373,7 +474,13 @@
|
|
|
373
474
|
"y": 260,
|
|
374
475
|
"given": "the pull-request commits of the last 30 days",
|
|
375
476
|
"when": "the nightly measurement runs",
|
|
376
|
-
"then": "the 90th percentile of their pipeline time is at most {{PR_MINUTES}} minutes, and the check fails on the night it is not"
|
|
477
|
+
"then": "the 90th percentile of their pipeline time is at most {{PR_MINUTES}} minutes, and the check fails on the night it is not",
|
|
478
|
+
"hubWhen": {
|
|
479
|
+
"LOCAL": [
|
|
480
|
+
"mirrored",
|
|
481
|
+
"ci-only"
|
|
482
|
+
]
|
|
483
|
+
}
|
|
377
484
|
},
|
|
378
485
|
{
|
|
379
486
|
"id": "sc-main-green",
|
|
@@ -383,7 +490,13 @@
|
|
|
383
490
|
"y": 390,
|
|
384
491
|
"given": "the commits pushed to main in the last 30 days, some with a failed run",
|
|
385
492
|
"when": "the nightly measurement runs",
|
|
386
|
-
"then": "the share of commits whose runs all succeeded is at least {{MAIN_SUCCESS_PCT}} %, and the check fails below it"
|
|
493
|
+
"then": "the share of commits whose runs all succeeded is at least {{MAIN_SUCCESS_PCT}} %, and the check fails below it",
|
|
494
|
+
"hubWhen": {
|
|
495
|
+
"LOCAL": [
|
|
496
|
+
"mirrored",
|
|
497
|
+
"ci-only"
|
|
498
|
+
]
|
|
499
|
+
}
|
|
387
500
|
},
|
|
388
501
|
{
|
|
389
502
|
"id": "sc-reruns",
|
|
@@ -393,7 +506,13 @@
|
|
|
393
506
|
"y": 520,
|
|
394
507
|
"given": "the completed runs of the last 30 days",
|
|
395
508
|
"when": "the nightly measurement runs",
|
|
396
|
-
"then": "at most {{RERUN_PCT}} % of them have a run attempt above 1, and the check fails above it"
|
|
509
|
+
"then": "at most {{RERUN_PCT}} % of them have a run attempt above 1, and the check fails above it",
|
|
510
|
+
"hubWhen": {
|
|
511
|
+
"LOCAL": [
|
|
512
|
+
"mirrored",
|
|
513
|
+
"ci-only"
|
|
514
|
+
]
|
|
515
|
+
}
|
|
397
516
|
},
|
|
398
517
|
{
|
|
399
518
|
"id": "sc-concurrency",
|
|
@@ -403,7 +522,13 @@
|
|
|
403
522
|
"y": 650,
|
|
404
523
|
"given": "a pull request whose pipeline is running, and a deploy to staging in progress",
|
|
405
524
|
"when": "a new commit is pushed to the pull request and a second merge starts another deploy to staging",
|
|
406
|
-
"then": "the old pull-request run is cancelled, and the second deploy waits until the first has finished"
|
|
525
|
+
"then": "the old pull-request run is cancelled, and the second deploy waits until the first has finished",
|
|
526
|
+
"hubWhen": {
|
|
527
|
+
"LOCAL": [
|
|
528
|
+
"mirrored",
|
|
529
|
+
"ci-only"
|
|
530
|
+
]
|
|
531
|
+
}
|
|
407
532
|
},
|
|
408
533
|
{
|
|
409
534
|
"id": "sc-build-once",
|
|
@@ -490,7 +615,7 @@
|
|
|
490
615
|
"status": "accepted",
|
|
491
616
|
"date": "",
|
|
492
617
|
"context": "This element is built, checked and deployed by machine many times a day, and the pipeline that does it is code with failures of its own. The forces: a pipeline clicked together in a web UI cannot be reviewed, versioned or rebuilt; a check that runs only on a developer's machine is skipped the day it matters, while one that runs only in CI is slow to learn from; a rebuild for each environment ships something other than what was tested, as dependencies, base images and tools move between builds; long-lived cloud keys in CI secrets are among the credentials most often stolen from pipelines, readable by every workflow that may use them and valid from anywhere once leaked; a slow pipeline is worked around (changes batched, merges made without waiting), and one that fails at random teaches everyone to press Re-run; caches and parallel jobs buy time but go stale or race; and two deploys to one environment at once leave it in neither version. Neighbouring packs own the rest: the main branch's ruleset (no direct pushes, no force pushes, the approvals) in the Code review and branching pack; the test run and its own time limit in the Test strategy pack, the static checks and theirs in the Code quality gate pack; rollout, rollback and how often the element is released in the Deployment and rollback pack; which environments exist, and the gate that production gets the digest staging tested, in the Infrastructure pack; version numbers and who approves a release in the Release and versioning pack; pinning actions by commit SHA, provenance and SBOMs in the Software supply chain pack; the running element's own credentials in the Secrets pack; and the DORA delivery metrics in the Delivery metrics pack.",
|
|
493
|
-
"decision": "A change merged to main is built once: the job build of deliver.yml builds the image with docker/build-push-action, pushes it to ghcr.io/our-org/shop/order-api tagged with the commit SHA, and passes its sha256 digest on as a job output. Every deploy job, for staging and for production, calls the reusable workflow deploy.yml with that digest and deploys image@digest; no deploy job builds anything, and what differs between environments is configuration read at start, never the image. That production gets the digest staging tested is checked by the Infrastructure pack's promotion gate; signing, provenance and SBOMs of the image are the Software supply chain pack's. The pipeline is code: every workflow lives under .github/workflows in the element's repository and changes through pull requests like any other code, nothing is configured by hand in the web UI, and steps that more than one workflow or repository needs live in reusable workflows (on: workflow_call) instead of being copied; actionlint checks every workflow on every pull request. The pull-request workflow ci.yml ends in a gate job named ci that needs every other job of the workflow and fails unless all of them succeeded, because GitHub reports a skipped job as a success. The main branch's ruleset, which the Code review and branching pack keeps, requires ci beside the checks the Code quality gate and Test strategy packs name, so the gate always runs on the CI platform's runners, whatever ran before on a developer's machine.
|
|
618
|
+
"decision": "A change merged to main is built once: the job build of deliver.yml builds the image with docker/build-push-action, pushes it to ghcr.io/our-org/shop/order-api tagged with the commit SHA, and passes its sha256 digest on as a job output. Every deploy job, for staging and for production, calls the reusable workflow deploy.yml with that digest and deploys image@digest; no deploy job builds anything, and what differs between environments is configuration read at start, never the image. That production gets the digest staging tested is checked by the Infrastructure pack's promotion gate; signing, provenance and SBOMs of the image are the Software supply chain pack's. The pipeline is code: every workflow lives under .github/workflows in the element's repository and changes through pull requests like any other code, nothing is configured by hand in the web UI, and steps that more than one workflow or repository needs live in reusable workflows (on: workflow_call) instead of being copied; actionlint checks every workflow on every pull request. The pull-request workflow ci.yml ends in a gate job named ci that needs every other job of the workflow and fails unless all of them succeeded, because GitHub reports a skipped job as a success. The main branch's ruleset, which the Code review and branching pack keeps, requires ci beside the checks the Code quality gate and Test strategy packs name, so the gate always runs on the CI platform's runners, whatever ran before on a developer's machine. A pull request's runs are cancelled when a newer commit is pushed to it (concurrency with cancel-in-progress), while deploys to one environment queue in a concurrency group of that environment and are never cancelled halfway. Dependencies are cached by their lockfile (setup-node's npm cache, BuildKit's GitHub Actions cache for image layers), and jobs that do not depend on each other run in parallel. The pipeline is held to targets over the last 30 days: all the checks of a pull-request commit finish within {{PR_MINUTES}} minutes at the 90th percentile, the runs of at least {{MAIN_SUCCESS_PCT}} % of the commits on main succeed, and at most {{RERUN_PCT}} % of runs need a second attempt. CI platform: {{PLATFORM}}. On GitHub Actions radical sense github-actions measures those figures every night; on another platform a job of the team's own writes the same figures for radical sense json, until an adapter for the platform is contributed to radical sense by pull request. Cloud credentials: {{CLOUD}}.",
|
|
494
619
|
"consequences": "• What production runs is, byte for byte, what staging tested.\n• Configuration has to live outside the image (environment variables, mounted files), so that one image fits every environment; a setting baked in at build time per environment is no longer possible.\n• Images stay in the registry as long as they may be promoted or rolled back to.\n• Workflows are tied together by job outputs and a reusable deploy workflow; a deploy started by hand names a digest.\n• The pipeline's own time, success rate and reruns are measured and judged like any other quality of the element, so a slow or flaky pipeline becomes a finding rather than a complaint.",
|
|
495
620
|
"alternatives": "1. A build per environment, made reproducible: needed where environments cannot share an artifact, at the price of keeping every build reproducible.\n2. A build per environment without that: what staging tested is not what production runs (Humble, Farley: Continuous Delivery).\n3. Promotion by a mutable tag (latest, staging): the tag can move between the test and the deploy.",
|
|
496
621
|
"hubWhen": {
|
|
@@ -509,7 +634,7 @@
|
|
|
509
634
|
"status": "accepted",
|
|
510
635
|
"date": "",
|
|
511
636
|
"context": "This element is built, checked and deployed by machine many times a day, and the pipeline that does it is code with failures of its own. The forces: a pipeline clicked together in a web UI cannot be reviewed, versioned or rebuilt; a check that runs only on a developer's machine is skipped the day it matters, while one that runs only in CI is slow to learn from; a rebuild for each environment ships something other than what was tested, as dependencies, base images and tools move between builds; long-lived cloud keys in CI secrets are among the credentials most often stolen from pipelines, readable by every workflow that may use them and valid from anywhere once leaked; a slow pipeline is worked around (changes batched, merges made without waiting), and one that fails at random teaches everyone to press Re-run; caches and parallel jobs buy time but go stale or race; and two deploys to one environment at once leave it in neither version. Neighbouring packs own the rest: the main branch's ruleset (no direct pushes, no force pushes, the approvals) in the Code review and branching pack; the test run and its own time limit in the Test strategy pack, the static checks and theirs in the Code quality gate pack; rollout, rollback and how often the element is released in the Deployment and rollback pack; which environments exist, and the gate that production gets the digest staging tested, in the Infrastructure pack; version numbers and who approves a release in the Release and versioning pack; pinning actions by commit SHA, provenance and SBOMs in the Software supply chain pack; the running element's own credentials in the Secrets pack; and the DORA delivery metrics in the Delivery metrics pack.",
|
|
512
|
-
"decision": "Each environment's image is built by its own deploy run from the same commit, and the build is reproducible: SOURCE_DATE_EPOCH is the commit's time and file timestamps are rewritten to it (rewrite-timestamp=true), the base image and every downloaded tool are pinned by digest or checksum, dependencies are installed from the lockfile, nothing reads the network or the clock beyond that, and provenance and SBOM attestations are kept outside the image (attached as the Software supply chain pack decides) so that they do not change its digest. A nightly job builds the head of main twice from scratch and fails when the two digests differ, and the Infrastructure pack's promotion gate holds production to the digest staging tested, which a reproducible rebuild meets. The pipeline is code: every workflow lives under .github/workflows in the element's repository and changes through pull requests like any other code, nothing is configured by hand in the web UI, and steps that more than one workflow or repository needs live in reusable workflows (on: workflow_call) instead of being copied; actionlint checks every workflow on every pull request. The pull-request workflow ci.yml ends in a gate job named ci that needs every other job of the workflow and fails unless all of them succeeded, because GitHub reports a skipped job as a success. The main branch's ruleset, which the Code review and branching pack keeps, requires ci beside the checks the Code quality gate and Test strategy packs name, so the gate always runs on the CI platform's runners, whatever ran before on a developer's machine.
|
|
637
|
+
"decision": "Each environment's image is built by its own deploy run from the same commit, and the build is reproducible: SOURCE_DATE_EPOCH is the commit's time and file timestamps are rewritten to it (rewrite-timestamp=true), the base image and every downloaded tool are pinned by digest or checksum, dependencies are installed from the lockfile, nothing reads the network or the clock beyond that, and provenance and SBOM attestations are kept outside the image (attached as the Software supply chain pack decides) so that they do not change its digest. A nightly job builds the head of main twice from scratch and fails when the two digests differ, and the Infrastructure pack's promotion gate holds production to the digest staging tested, which a reproducible rebuild meets. The pipeline is code: every workflow lives under .github/workflows in the element's repository and changes through pull requests like any other code, nothing is configured by hand in the web UI, and steps that more than one workflow or repository needs live in reusable workflows (on: workflow_call) instead of being copied; actionlint checks every workflow on every pull request. The pull-request workflow ci.yml ends in a gate job named ci that needs every other job of the workflow and fails unless all of them succeeded, because GitHub reports a skipped job as a success. The main branch's ruleset, which the Code review and branching pack keeps, requires ci beside the checks the Code quality gate and Test strategy packs name, so the gate always runs on the CI platform's runners, whatever ran before on a developer's machine. A pull request's runs are cancelled when a newer commit is pushed to it (concurrency with cancel-in-progress), while deploys to one environment queue in a concurrency group of that environment and are never cancelled halfway. Dependencies are cached by their lockfile (setup-node's npm cache, BuildKit's GitHub Actions cache for image layers), and jobs that do not depend on each other run in parallel. The pipeline is held to targets over the last 30 days: all the checks of a pull-request commit finish within {{PR_MINUTES}} minutes at the 90th percentile, the runs of at least {{MAIN_SUCCESS_PCT}} % of the commits on main succeed, and at most {{RERUN_PCT}} % of runs need a second attempt. CI platform: {{PLATFORM}}. On GitHub Actions radical sense github-actions measures those figures every night; on another platform a job of the team's own writes the same figures for radical sense json, until an adapter for the platform is contributed to radical sense by pull request. Cloud credentials: {{CLOUD}}.",
|
|
513
638
|
"consequences": "• Each environment builds inside its own boundary, and still runs what was tested, as long as the builds stay reproducible.\n• Reproducibility is work: package installs without pinned versions, timestamps, random identifiers and build-time downloads each break it, and the nightly double build finds them only after they are merged.\n• Every environment pays for its own build, so a deploy takes longer than a promotion.\n• The pipeline's own time, success rate and reruns are measured and judged like any other quality of the element.",
|
|
514
639
|
"alternatives": "1. One build promoted by digest: simpler, and what runs is what was tested by construction; needs one registry every environment can pull from.\n2. Rebuilds without reproducibility: what staging tested is not what production runs.\n3. Copying the image between registries by digest (crane copy, skopeo copy): keeps one build across separate registries when only a copy step, not a pull, can cross the boundary.",
|
|
515
640
|
"hubWhen": {
|
|
@@ -606,6 +731,10 @@
|
|
|
606
731
|
"hubWhen": {
|
|
607
732
|
"PLATFORM": [
|
|
608
733
|
"github"
|
|
734
|
+
],
|
|
735
|
+
"LOCAL": [
|
|
736
|
+
"mirrored",
|
|
737
|
+
"ci-only"
|
|
609
738
|
]
|
|
610
739
|
}
|
|
611
740
|
},
|
|
@@ -624,6 +753,10 @@
|
|
|
624
753
|
"hubWhen": {
|
|
625
754
|
"PLATFORM": [
|
|
626
755
|
"other"
|
|
756
|
+
],
|
|
757
|
+
"LOCAL": [
|
|
758
|
+
"mirrored",
|
|
759
|
+
"ci-only"
|
|
627
760
|
]
|
|
628
761
|
}
|
|
629
762
|
},
|
|
@@ -638,7 +771,13 @@
|
|
|
638
771
|
"cadence": "triggered",
|
|
639
772
|
"trigger": "pull-request",
|
|
640
773
|
"invocation": "automated",
|
|
641
|
-
"description": "A check on every pull request reads each workflow file as JSON and fails when a workflow that runs on pull requests does not cancel its superseded runs, or when a job that deploys to an environment has no concurrency group (its own, or the workflow's) or has one that would cancel a deploy in progress.\n\nThreshold: 0 workflows triggered by pull requests without concurrency.cancel-in-progress: true; 0 jobs with an environment outside a concurrency group, or in one that cancels in progress\n\nTool: yq and jq (both on GitHub's Ubuntu runners), run as npm run check:concurrency in ci.yml\n\n```bash\n#!/usr/bin/env bash\n# scripts/check-concurrency.sh (package.json: \"check:concurrency\": \"bash scripts/check-concurrency.sh\")\nset -euo pipefail\nproblems=$(for wf in .github/workflows/*.yml; do\n yq -o=json \"$wf\" | jq -r --arg wf \"$wf\" '\n (.on | if type == \"object\" then keys elif type == \"array\" then . else [.] end) as $events\n | .concurrency as $top\n | ( select($events | index(\"pull_request\"))\n | select(($top | type) != \"object\" or $top[\"cancel-in-progress\"] != true)\n | \"\\($wf): runs on pull requests without concurrency.cancel-in-progress: true\" ),\n ( .jobs | to_entries[] | select(.value.environment) | (.value.concurrency // $top) as $c\n | if $c == null then \"\\($wf): job \\(.key) deploys outside a concurrency group, so two deploys can overlap\"\n elif ($c | type) == \"object\" and $c[\"cancel-in-progress\"] == true then \"\\($wf): job \\(.key) deploys with cancel-in-progress, so a newer run cuts it off halfway\"\n else empty end )'\ndone)\n[ -z \"$problems\" ] || { echo \"$problems\"; exit 1; }\n```"
|
|
774
|
+
"description": "A check on every pull request reads each workflow file as JSON and fails when a workflow that runs on pull requests does not cancel its superseded runs, or when a job that deploys to an environment has no concurrency group (its own, or the workflow's) or has one that would cancel a deploy in progress.\n\nThreshold: 0 workflows triggered by pull requests without concurrency.cancel-in-progress: true; 0 jobs with an environment outside a concurrency group, or in one that cancels in progress\n\nTool: yq and jq (both on GitHub's Ubuntu runners), run as npm run check:concurrency in ci.yml\n\n```bash\n#!/usr/bin/env bash\n# scripts/check-concurrency.sh (package.json: \"check:concurrency\": \"bash scripts/check-concurrency.sh\")\nset -euo pipefail\nproblems=$(for wf in .github/workflows/*.yml; do\n yq -o=json \"$wf\" | jq -r --arg wf \"$wf\" '\n (.on | if type == \"object\" then keys elif type == \"array\" then . else [.] end) as $events\n | .concurrency as $top\n | ( select($events | index(\"pull_request\"))\n | select(($top | type) != \"object\" or $top[\"cancel-in-progress\"] != true)\n | \"\\($wf): runs on pull requests without concurrency.cancel-in-progress: true\" ),\n ( .jobs | to_entries[] | select(.value.environment) | (.value.concurrency // $top) as $c\n | if $c == null then \"\\($wf): job \\(.key) deploys outside a concurrency group, so two deploys can overlap\"\n elif ($c | type) == \"object\" and $c[\"cancel-in-progress\"] == true then \"\\($wf): job \\(.key) deploys with cancel-in-progress, so a newer run cuts it off halfway\"\n else empty end )'\ndone)\n[ -z \"$problems\" ] || { echo \"$problems\"; exit 1; }\n```",
|
|
775
|
+
"hubWhen": {
|
|
776
|
+
"LOCAL": [
|
|
777
|
+
"mirrored",
|
|
778
|
+
"ci-only"
|
|
779
|
+
]
|
|
780
|
+
}
|
|
642
781
|
},
|
|
643
782
|
{
|
|
644
783
|
"id": "ff-promote-digest",
|