Skip to content

Commit 824537f

Browse files
ctauchenclaude
andcommitted
DOCS-2970: Fail the build when a FelixConfig lookup key doesn't resolve
The FelixConfig component previously degraded silently: when a group name lookup missed, it rendered a small "No matching group found" paragraph that was easy to overlook. That is exactly how a prose/casing style sweep dropped iptablesRefreshInterval and 7 other groups from the FelixConfiguration reference without anyone noticing until a customer RCA. Turn that silent miss into a thrown error so a broken lookup fails the Docusaurus build instead of shipping a page with missing fields. This guards against every cause -- Vale-driven sweeps, manual edits, refactors, or a config-params.json regen that renames a group -- not just the one that triggered DOCS-2970. Applied to all FelixConfig component copies (current + versioned_docs across calico, calico-enterprise, calico-cloud) since style sweeps edit versioned pages too. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 0dc936b commit 824537f

11 files changed

Lines changed: 99 additions & 11 deletions

File tree

  • calico-cloud_versioned_docs/version-22-2/_includes/components/FelixConfig
  • calico-cloud/_includes/components/FelixConfig
  • calico-enterprise_versioned_docs
    • version-3.21-2/_includes/components/FelixConfig
    • version-3.22-2/_includes/components/FelixConfig
    • version-3.23-2/_includes/components/FelixConfig
  • calico-enterprise/_includes/components/FelixConfig
  • calico_versioned_docs
    • version-3.29/_includes/components/FelixConfig
    • version-3.30/_includes/components/FelixConfig
    • version-3.31/_includes/components/FelixConfig
    • version-3.32/_includes/components/FelixConfig
  • calico/_includes/components/FelixConfig

calico-cloud/_includes/components/FelixConfig/index.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,15 @@ const FelixConfig = ({ configType, name }) => {
3232
// Debugging logs
3333

3434
if (!matchedGroup) {
35-
return <p>No matching group found for '{name}'.</p>;
35+
// Fail the build loudly rather than silently dropping the group's fields.
36+
// `name` must exactly match a group Name in config-params.json, which is
37+
// auto-synced from the Felix source repos. A prose/casing sweep once
38+
// restyled these lookup keys and silently dropped fields (DOCS-2970).
39+
throw new Error(
40+
`FelixConfig: no group named '${name}' in config-params.json. The 'name' `
41+
+ `prop must exactly match a group Name in config-params.json; do not `
42+
+ `restyle it as prose.`
43+
);
3644
}
3745

3846
let content;

calico-cloud_versioned_docs/version-22-2/_includes/components/FelixConfig/index.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,15 @@ const FelixConfig = ({ configType, name }) => {
3232
// Debugging logs
3333

3434
if (!matchedGroup) {
35-
return <p>No matching group found for '{name}'.</p>;
35+
// Fail the build loudly rather than silently dropping the group's fields.
36+
// `name` must exactly match a group Name in config-params.json, which is
37+
// auto-synced from the Felix source repos. A prose/casing sweep once
38+
// restyled these lookup keys and silently dropped fields (DOCS-2970).
39+
throw new Error(
40+
`FelixConfig: no group named '${name}' in config-params.json. The 'name' `
41+
+ `prop must exactly match a group Name in config-params.json; do not `
42+
+ `restyle it as prose.`
43+
);
3644
}
3745

3846
let content;

calico-enterprise/_includes/components/FelixConfig/index.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,15 @@ const FelixConfig = ({ configType, name }) => {
3232
// Debugging logs
3333

3434
if (!matchedGroup) {
35-
return <p>No matching group found for '{name}'.</p>;
35+
// Fail the build loudly rather than silently dropping the group's fields.
36+
// `name` must exactly match a group Name in config-params.json, which is
37+
// auto-synced from the Felix source repos. A prose/casing sweep once
38+
// restyled these lookup keys and silently dropped fields (DOCS-2970).
39+
throw new Error(
40+
`FelixConfig: no group named '${name}' in config-params.json. The 'name' `
41+
+ `prop must exactly match a group Name in config-params.json; do not `
42+
+ `restyle it as prose.`
43+
);
3644
}
3745

3846
let content;

calico-enterprise_versioned_docs/version-3.21-2/_includes/components/FelixConfig/index.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,15 @@ const FelixConfig = ({ configType, name }) => {
3232
// Debugging logs
3333

3434
if (!matchedGroup) {
35-
return <p>No matching group found for '{name}'.</p>;
35+
// Fail the build loudly rather than silently dropping the group's fields.
36+
// `name` must exactly match a group Name in config-params.json, which is
37+
// auto-synced from the Felix source repos. A prose/casing sweep once
38+
// restyled these lookup keys and silently dropped fields (DOCS-2970).
39+
throw new Error(
40+
`FelixConfig: no group named '${name}' in config-params.json. The 'name' `
41+
+ `prop must exactly match a group Name in config-params.json; do not `
42+
+ `restyle it as prose.`
43+
);
3644
}
3745

3846
let content;

calico-enterprise_versioned_docs/version-3.22-2/_includes/components/FelixConfig/index.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,15 @@ const FelixConfig = ({ configType, name }) => {
3232
// Debugging logs
3333

3434
if (!matchedGroup) {
35-
return <p>No matching group found for '{name}'.</p>;
35+
// Fail the build loudly rather than silently dropping the group's fields.
36+
// `name` must exactly match a group Name in config-params.json, which is
37+
// auto-synced from the Felix source repos. A prose/casing sweep once
38+
// restyled these lookup keys and silently dropped fields (DOCS-2970).
39+
throw new Error(
40+
`FelixConfig: no group named '${name}' in config-params.json. The 'name' `
41+
+ `prop must exactly match a group Name in config-params.json; do not `
42+
+ `restyle it as prose.`
43+
);
3644
}
3745

3846
let content;

calico-enterprise_versioned_docs/version-3.23-2/_includes/components/FelixConfig/index.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,15 @@ const FelixConfig = ({ configType, name }) => {
3232
// Debugging logs
3333

3434
if (!matchedGroup) {
35-
return <p>No matching group found for '{name}'.</p>;
35+
// Fail the build loudly rather than silently dropping the group's fields.
36+
// `name` must exactly match a group Name in config-params.json, which is
37+
// auto-synced from the Felix source repos. A prose/casing sweep once
38+
// restyled these lookup keys and silently dropped fields (DOCS-2970).
39+
throw new Error(
40+
`FelixConfig: no group named '${name}' in config-params.json. The 'name' `
41+
+ `prop must exactly match a group Name in config-params.json; do not `
42+
+ `restyle it as prose.`
43+
);
3644
}
3745

3846
let content;

calico/_includes/components/FelixConfig/index.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,15 @@ const FelixConfig = ({ configType, name }) => {
3232
// Debugging logs
3333

3434
if (!matchedGroup) {
35-
return <p>No matching group found for '{name}'.</p>;
35+
// Fail the build loudly rather than silently dropping the group's fields.
36+
// `name` must exactly match a group Name in config-params.json, which is
37+
// auto-synced from the Felix source repos. A prose/casing sweep once
38+
// restyled these lookup keys and silently dropped fields (DOCS-2970).
39+
throw new Error(
40+
`FelixConfig: no group named '${name}' in config-params.json. The 'name' `
41+
+ `prop must exactly match a group Name in config-params.json; do not `
42+
+ `restyle it as prose.`
43+
);
3644
}
3745

3846
let content;

calico_versioned_docs/version-3.29/_includes/components/FelixConfig/index.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,15 @@ const FelixConfig = ({ configType, name }) => {
3232
// Debugging logs
3333

3434
if (!matchedGroup) {
35-
return <p>No matching group found for '{name}'.</p>;
35+
// Fail the build loudly rather than silently dropping the group's fields.
36+
// `name` must exactly match a group Name in config-params.json, which is
37+
// auto-synced from the Felix source repos. A prose/casing sweep once
38+
// restyled these lookup keys and silently dropped fields (DOCS-2970).
39+
throw new Error(
40+
`FelixConfig: no group named '${name}' in config-params.json. The 'name' `
41+
+ `prop must exactly match a group Name in config-params.json; do not `
42+
+ `restyle it as prose.`
43+
);
3644
}
3745

3846
let content;

calico_versioned_docs/version-3.30/_includes/components/FelixConfig/index.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,15 @@ const FelixConfig = ({ configType, name }) => {
3232
// Debugging logs
3333

3434
if (!matchedGroup) {
35-
return <p>No matching group found for '{name}'.</p>;
35+
// Fail the build loudly rather than silently dropping the group's fields.
36+
// `name` must exactly match a group Name in config-params.json, which is
37+
// auto-synced from the Felix source repos. A prose/casing sweep once
38+
// restyled these lookup keys and silently dropped fields (DOCS-2970).
39+
throw new Error(
40+
`FelixConfig: no group named '${name}' in config-params.json. The 'name' `
41+
+ `prop must exactly match a group Name in config-params.json; do not `
42+
+ `restyle it as prose.`
43+
);
3644
}
3745

3846
let content;

calico_versioned_docs/version-3.31/_includes/components/FelixConfig/index.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,15 @@ const FelixConfig = ({ configType, name }) => {
3232
// Debugging logs
3333

3434
if (!matchedGroup) {
35-
return <p>No matching group found for '{name}'.</p>;
35+
// Fail the build loudly rather than silently dropping the group's fields.
36+
// `name` must exactly match a group Name in config-params.json, which is
37+
// auto-synced from the Felix source repos. A prose/casing sweep once
38+
// restyled these lookup keys and silently dropped fields (DOCS-2970).
39+
throw new Error(
40+
`FelixConfig: no group named '${name}' in config-params.json. The 'name' `
41+
+ `prop must exactly match a group Name in config-params.json; do not `
42+
+ `restyle it as prose.`
43+
);
3644
}
3745

3846
let content;

0 commit comments

Comments
 (0)