Skip to content

Commit b84845e

Browse files
committed
Fix build errors on Mermaid chart malformed graphs
1 parent 33f491a commit b84845e

21 files changed

Lines changed: 210 additions & 103 deletions

File tree

.cache/pages.json

Lines changed: 85 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,84 @@
22
"about",
33
{
44
"articles": [
5+
"alert-fatigue-reduction-triage-actionable-alerts",
6+
"api-deprecation-sunset-headers-consumer-migration",
7+
"api-gateway-metrics-traces-logs-debugging",
8+
"api-usage-metering-quotas-cost-attribution",
9+
"api-versioning-deprecation-sunset-headers-migration",
10+
"argocd-sync-failures-gitops-debugging-troubleshooting",
11+
"availability-targets-five-nines-cost-benefit-analysis",
12+
"backpressure-load-shedding-admission-control-overload",
13+
"blameless-postmortem-incident-analysis-systemic-causes",
14+
"blue-green-canary-deployment-strategy-comparison",
515
"building-with-astro",
6-
"typescript-best-practices",
7-
"useful-vs-code-extensions",
8-
"writing-library-code"
16+
"cdn-edge-caching-cache-keys-vary-headers",
17+
"chaos-engineering-failure-injection-low-cost-experiments",
18+
"ci-pipeline-caching-docker-layers-dependency-cache",
19+
"circuit-breaker-retry-budget-cascade-failure-prevention",
20+
"consumer-driven-contract-testing-pact-internal-apis",
21+
"container-vulnerability-scanning-ci-shift-left-security",
22+
"contract-testing-consumer-driven-api-breaking-changes",
23+
"database-schema-migrations-continuous-deployment-zero-downtime",
24+
"dead-letter-queue-design-replay-debugging",
25+
"deployment-rollback-state-dependencies-feature-flags",
26+
"distributed-tracing-sampling-strategies-head-tail",
27+
"eol-runtime-upgrade-dependency-hell-migration",
28+
"ephemeral-preview-environments-cost-control-cleanup",
29+
"error-budget-policy-slo-velocity-reliability-tradeoffs",
30+
"event-schema-versioning-compatibility-evolution",
31+
"flaky-test-diagnosis-race-conditions-e2e-stabilization",
32+
"golden-paths-developer-experience-standardization-autonomy",
33+
"grafana-dashboard-hygiene-pruning-actionable-metrics",
34+
"graphql-federation-caching-challenges-vs-rest",
35+
"helm-release-management-drift-detection-debugging",
36+
"idempotent-message-handlers-deduplication-retries",
37+
"internal-cli-kubectl-terraform-wrapper-abstraction",
38+
"internal-developer-portal-platform-self-service-actions",
39+
"internal-platform-api-versioning-deprecation-breaking-changes",
40+
"kubernetes-cluster-upgrade-playbook-risk-reduction",
41+
"kubernetes-cost-optimization-resource-sizing-spot-instances",
42+
"kubernetes-decision-framework-when-not-to-use",
43+
"kubernetes-dns-debugging-ndots-coredns-troubleshooting",
44+
"kubernetes-hpa-autoscaling-metrics-tuning-latency",
45+
"kubernetes-ingress-gateway-api-comparison-migration",
46+
"kubernetes-multi-cluster-fleet-management-configuration",
47+
"kubernetes-pod-disruption-budget-autoscaler-node-rotation",
48+
"kubernetes-pod-resource-requests-limits-qos-classes",
49+
"kubernetes-secrets-external-secrets-operator-csi-vault",
50+
"legacy-code-testing-characterization-tests-seams",
51+
"monorepo-affected-builds-remote-caching-ci-optimization",
52+
"mtls-certificate-rotation-service-mesh-authentication",
53+
"nginx-haproxy-reverse-proxy-production-tuning",
54+
"on-call-rotation-small-teams-sustainable-coverage",
55+
"opa-conftest-policy-as-code-infrastructure-guardrails",
56+
"openapi-spec-documentation-sdk-generation-validation",
57+
"opentelemetry-span-design-granularity-overhead",
58+
"performance-testing-load-models-benchmark-accuracy",
59+
"platform-architecture-control-plane-data-plane-separation",
60+
"platform-engineering-metrics-lead-time-developer-friction",
61+
"postgresql-connection-pooling-saturation-sizing",
62+
"private-networking-dns-routing-tls-debugging",
63+
"prometheus-high-cardinality-metrics-label-design",
64+
"rate-limiting-token-bucket-leaky-bucket-implementation",
65+
"release-quality-gates-automated-deployment-validation",
66+
"retry-storm-prevention-exponential-backoff-jitter",
67+
"reverse-engineering-documentation-legacy-systems",
68+
"service-catalog-metadata-schema-ownership-tracking",
69+
"service-decommissioning-scream-test-shutdown",
70+
"sli-selection-user-centric-service-level-indicators",
71+
"slo-adoption-internal-services-reliability-culture",
72+
"slsa-build-provenance-artifact-signing-supply-chain",
73+
"strangler-fig-migration-observability-traffic-shifting",
74+
"strangler-fig-monolith-auth-extraction-migration",
75+
"structured-logging-correlation-ids-log-schema-design",
76+
"symptom-based-alerting-runbooks-alert-design",
77+
"synthetic-test-data-pii-anonymization-fixtures",
78+
"terraform-module-design-defaults-versioning-interfaces",
79+
"terraform-state-locking-corruption-recovery-backend",
80+
"workload-identity-federation-keyless-cloud-authentication",
81+
"writing-library-code",
82+
"zero-downtime-database-migration-expand-contract"
983
]
1084
},
1185
{
@@ -37,14 +111,14 @@
37111
},
38112
{
39113
"tags": [
40-
"api-platforms-and-edge",
41-
"cloud-infrastructure",
42-
"legacy-systems-and-modernization",
43-
"observability",
44-
"platform-engineering-and-developer-experience",
45-
"release-engineering",
46-
"reliability-engineering",
47-
"typescript"
114+
"apis-and-gateways",
115+
"build-and-deploy",
116+
"cloud-platforms",
117+
"observability-and-telemetry",
118+
"platform-engineering",
119+
"reliability-and-testing",
120+
"system-modernization",
121+
"systems-and-development"
48122
]
49123
}
50124
]

.github/instructions/markdown.instructions.md

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
applyTo: "**/*.md"
2+
applyTo: "**/*.{md,mdx}"
33
---
44

55
# Markdown Linting Instructions
@@ -24,6 +24,26 @@ applyTo: "**/*.md"
2424
- Ordered lists should use consistent numbering (`MD029`). Either use sequential numbering (1, 2, 3) or all ones (1, 1, 1). Do not mix styles (e.g., 1, 2, 3, 4 is correct; 1, 2, 3, 4 where one item is numbered 2 when it should be 3 is incorrect).
2525
- No trailing spaces on lines (`MD009`), except when intentionally using two trailing spaces for a line break.
2626

27+
## MDX And Inline Code Safety
28+
29+
- When you mean the less-than operator (e.g. `a < b`), do not write a raw `<` in prose.
30+
- Prefer `&lt;` (and `&gt;` when needed), or wrap the expression in backticks.
31+
- Always wrap code-y snippets in backticks so the Markdown/MDX parser doesn’t treat them as HTML/JSX.
32+
- Examples: `{ param, ... }`, `generic<T>`, `Array<string>`, `T extends Foo`.
33+
34+
## Mermaid Diagram Authoring
35+
36+
- This repo renders Mermaid during builds; invalid or unsupported Mermaid syntax will fail `npm run build`.
37+
- Subgraphs:
38+
- Do not use quoted subgraph titles like `subgraph "Title"`.
39+
- Prefer a simple subgraph id with a simple label in brackets: `subgraph myGroup[My Group]`.
40+
- Avoid punctuation-heavy labels in subgraph brackets (parentheses, `+`, `%`, em-dashes). Keep labels plain words.
41+
- Labels:
42+
- Avoid double quotes inside node labels like `A[When is a trace "complete"?]`.
43+
- Avoid `@` in node labels (it can be parsed as a reserved token in some Mermaid flowchart grammars).
44+
- Diagram types:
45+
- Do not use `quadrantChart` (not supported by the current renderer); use `graph TD` (or another supported type) instead.
46+
2747
## How to Apply These Rules
2848

2949
- If you are generating a new Markdown file, follow these rules from the beginning.

.vscode/settings.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,11 @@
3030
"DTEND",
3131
"Dynatrace",
3232
"ecommerce",
33+
"elbv",
3334
"enddt",
3435
"fastly",
3536
"Favicons",
37+
"fbclid",
3638
"Fedi",
3739
"Fedibird",
3840
"Fediverse",
@@ -43,6 +45,7 @@
4345
"fosstodon",
4446
"FOUC",
4547
"fprintf",
48+
"gclid",
4649
"gemoji",
4750
"glidejs",
4851
"gomodule",
@@ -75,6 +78,7 @@
7578
"moyai",
7679
"MTTD",
7780
"MTTR",
81+
"myapp",
7882
"nanostores",
7983
"navigations",
8084
"ndots",
@@ -96,6 +100,7 @@
96100
"Poslovski",
97101
"Postg",
98102
"postgrest",
103+
"preemptible",
99104
"psql",
100105
"Pulumi",
101106
"pylint",
@@ -135,6 +140,7 @@
135140
"tsdoc",
136141
"tseslint",
137142
"tshirt",
143+
"TTFB",
138144
"Turborepo",
139145
"Tursa",
140146
"Turso",

src/components/Breadcrumbs/index.astro

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,14 +36,12 @@ const breadcrumbSchema =
3636
breadcrumbs.length > 1 && (
3737
<div id="breadcrumbs" class="mt-4">
3838
<nav aria-label="Breadcrumbs" class="breadcrumbs pl-8">
39-
<ol class="flex items-center space-x-2 text-sm text-content-offset">
39+
<ol class="flex items-center space-x-2 text-sm text-primary-offset">
4040
{breadcrumbs.map((item, index) => (
4141
<li class="flex items-center">
4242
{index > 0 && (
4343
<svg
44-
class="w-4 h-4 mx-2 text-content-offset opacity-60"
45-
fill="none"
46-
stroke="currentColor"
44+
class="w-4 h-4 mx-2 opacity-60 fill-none stroke-primary-offset"
4745
viewBox="0 0 24 24"
4846
aria-hidden="true"
4947
focusable="false"
@@ -58,13 +56,13 @@ const breadcrumbSchema =
5856
)}
5957

6058
{item.isCurrentPage ? (
61-
<span class="text-content font-medium" aria-current="page">
59+
<span aria-current="page">
6260
{item.label}
6361
</span>
6462
) : (
6563
<a
6664
href={item.href}
67-
class="text-primary hover:text-primary-offset hover:underline focus:text-primary-offset focus:underline focus:outline-none transition-colors duration-200"
65+
class="text-inherit underline decoration-current decoration-dotted hover:text-secondary focus:text-secondary focus:outline-none transition-colors duration-200"
6866
>
6967
{item.label}
7068
</a>

src/content.config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ const createBaseCollectionSchema = ({ image }: SchemaContext) =>
3131
featured: z.boolean().default(false),
3232
isDraft: z.boolean().default(false),
3333
publishDate: z.date(),
34+
modifiedDate: z.date().optional(),
3435
})
3536

3637
const createSocialCollectionSchema = () =>

src/content/articles/api-versioning-deprecation-sunset-headers-migration/index.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -491,7 +491,7 @@ GET /v2/users HTTP/1.1
491491
Authorization: Bearer your-access-token
492492
```
493493
494-
[Detailed OAuth 2.0 setup guide](./oauth-setup.md)
494+
`[Detailed OAuth 2.0 setup guide](./oauth-setup.md)`
495495

496496
### Step 2: Update Pagination
497497
...
@@ -781,7 +781,7 @@ Authorization: Bearer {token}
781781

782782
<Callout type="warning">
783783
API v1 is deprecated and will be removed on June 1, 2025.
784-
[Migration guide →](/migration/v1-to-v2)
784+
`[Migration guide →](/migration/v1-to-v2)`
785785
</Callout>
786786

787787
### Request

src/content/articles/availability-targets-five-nines-cost-benefit-analysis/index.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -488,7 +488,7 @@ Figure: Four-nines architecture with multi-region deployment.
488488
- Cross-region database replication
489489
- Automated regional failover
490490
- Zero-downtime deployments required
491-
- 24/7 on-call with <15 minute response
491+
- 24/7 on-call with &lt15 minute response
492492

493493
### Five Nines (99.999%): Exotic Territory
494494

src/content/articles/blameless-postmortem-incident-analysis-systemic-causes/index.mdx

Lines changed: 22 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -95,13 +95,13 @@ Explain how knowing the outcome distorts our analysis of the decision-making pro
9595

9696
```mermaid
9797
graph LR
98-
subgraph "At Decision Time"
98+
subgraph decision[At Decision Time]
9999
A[Multiple Options] --> B[Reasonable Choice]
100100
C[Incomplete Information] --> B
101101
D[Time Pressure] --> B
102102
end
103103
104-
subgraph "After Incident (Hindsight)"
104+
subgraph hindsight[After Incident Hindsight]
105105
B --> E[Outcome Known]
106106
E --> F["Obviously wrong choice"]
107107
E --> G["Should have known better"]
@@ -419,20 +419,20 @@ Introduce systems-theoretic analysis for complex incidents.
419419

420420
```mermaid
421421
graph TD
422-
subgraph "Control Structure"
422+
subgraph control[Control Structure]
423423
A[Company Leadership] -->|Sets priorities| B[Engineering Management]
424424
B -->|Allocates resources| C[Platform Team]
425425
C -->|Creates tools| D[Deploy Pipeline]
426426
D -->|Enables| E[Engineer Actions]
427427
end
428428
429-
subgraph "Feedback Loops"
429+
subgraph feedback[Feedback Loops]
430430
E -->|Incident reports| C
431431
C -->|Metrics| B
432432
B -->|Performance data| A
433433
end
434434
435-
subgraph "Analysis Questions"
435+
subgraph questions[Analysis Questions]
436436
F[What control was missing?]
437437
G[What feedback was absent?]
438438
H[What constraint was violated?]
@@ -491,19 +491,23 @@ Explain how to prioritize remediations when there are many potential actions.
491491
Table: Prioritization matrix for remediation action items.
492492
493493
```mermaid
494-
quadrantChart
495-
title Remediation Prioritization
496-
x-axis Low Effort --> High Effort
497-
y-axis Low Impact --> High Impact
498-
quadrant-1 Do Now (P0)
499-
quadrant-2 Plan (P1)
500-
quadrant-3 Defer (P3-P4)
501-
quadrant-4 Quick Wins (P2)
502-
Add config validation: [0.2, 0.9]
503-
Canary deployments: [0.8, 0.95]
504-
Update runbook: [0.15, 0.4]
505-
Redesign config system: [0.9, 0.6]
506-
Better error messages: [0.3, 0.3]
494+
graph TD
495+
subgraph doNow[Do Now P0 High impact low effort]
496+
A[Add config validation]
497+
end
498+
499+
subgraph plan[Plan P1 High impact high effort]
500+
B[Canary deployments]
501+
end
502+
503+
subgraph quickWins[Quick Wins P2 Medium impact low effort]
504+
C[Update runbook]
505+
D[Better error messages]
506+
end
507+
508+
subgraph defer[Defer P3 P4 Medium low impact high effort]
509+
E[Redesign config system]
510+
end
507511
```
508512
Figure: Quadrant chart for visualizing remediation prioritization.
509513

src/content/articles/blue-green-canary-deployment-strategy-comparison/index.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -469,7 +469,7 @@ Provide a comprehensive comparison for decision-making.
469469

470470
| Factor | Blue/Green | Canary |
471471
|--------|------------|--------|
472-
| **Rollback speed** | Instant (<1s) | Fast (10-30s) |
472+
| **Rollback speed** | Instant (&lt1s) | Fast (10-30s) |
473473
| **Blast radius control** | All or nothing | Gradual |
474474
| **Resource overhead** | 2x during deploy | 1.1x-1.5x |
475475
| **Complexity** | Medium | High |

src/content/articles/cdn-edge-caching-cache-keys-vary-headers/index.mdx

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ Each unique combination = separate cache entry
231231

232232
```mermaid
233233
graph TD
234-
A[/products] --> B{Vary: Accept-Language}
234+
A["/products"] --> B{Vary: Accept-Language}
235235
B -->|en-US| C[English Response]
236236
B -->|es-ES| D[Spanish Response]
237237
B -->|fr-FR| E[French Response]
@@ -279,7 +279,7 @@ caching:
279279
Code: Vary header configuration with normalization.
280280
281281
<Callout type="danger">
282-
`Vary: *` means "this response is unique to every request"—it effectively disables caching. Never use `Vary: *` unless you truly intend to make the response uncacheable.
282+
`Vary: *` means "this response is unique to every request"—it effectively disables caching. Never use `Vary: *` unless you truly intend to make the response noncacheable.
283283
</Callout>
284284

285285
### The Cookie Vary Trap
@@ -458,10 +458,10 @@ graph TD
458458
A[Product 123 Updated] --> B[Purge tag: product-123]
459459
B --> C[All URLs with tag invalidated]
460460
461-
C --> D[/products/123]
462-
C --> E[/api/products/123]
463-
C --> F[/categories/shoes includes 123]
464-
C --> G[/brands/nike includes 123]
461+
C --> D["/products/123"]
462+
C --> E["/api/products/123"]
463+
C --> F["/categories/shoes includes 123"]
464+
C --> G["/brands/nike includes 123"]
465465
```
466466
Figure: Tag-based purging invalidating all related content.
467467

@@ -738,8 +738,8 @@ Key metrics and what they indicate.
738738
|--------|------|---------|----------------|
739739
| Cache Hit Ratio | >90% | 70-90% | Analyze cache keys, extend TTL |
740740
| Origin Load | Low, stable | Spiky | Check for cache misses, warming |
741-
| TTFB (cached) | <50ms | 50-200ms | Check PoP coverage, edge compute |
742-
| Purge Latency | <5s | 5-30s | Consider cache tags |
741+
| TTFB (cached) | &lt50ms | 50-200ms | Check PoP coverage, edge compute |
742+
| Purge Latency | &lt5s | 5-30s | Consider cache tags |
743743
| Cache Fill Rate | Low | High | Check TTL, invalidation frequency |
744744
745745
Table: Cache performance metrics and targets.

0 commit comments

Comments
 (0)