Skip to content

docs(governance console): generate the available controls list - #38650

Open
bi1yeu wants to merge 3 commits into
masterfrom
matthew.bilyeu/governance-controls-generated
Open

docs(governance console): generate the available controls list#38650
bi1yeu wants to merge 3 commits into
masterfrom
matthew.bilyeu/governance-controls-generated

Conversation

@bi1yeu

@bi1yeu bi1yeu commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

AGV-1614

What

Generates the "All available controls" section of the Governance Console controls page from the control definitions, instead of maintaining it by hand.

Why

The hand-maintained list had drifted from the source of truth:

  • Missing entirely: Dashboards with Low Quality Scores, Empty Log Indexes, Inactive Log Pipelines, Unscoped Application Keys
  • Wrong name: "Inactive Metric Tag" should be "Inactive Metrics Tags"
  • Should not be public: "Monitors Without Team Tags" is release_status: dev

Once this lands, shipping a control to prod publishes its docs entry automatically.

How

A new shortcode reads data/governance_controls.json, published by the governance_controls invocation in ddoghq/websites-sources. It is called once per usage concern, so each section keeps its own intro prose and collapse-content wrapper — only the control entries are generated. The markup mirrors what a markdown definition list compiles to, so the entries render as they did before.

The generator publishes only controls with release_status: prod, and only mitigations that are not feature-flagged, so everything rendered is available to every org. An unrecognised usage_concern fails the build with the list of valid groups rather than silently rendering an empty section.

⚠️ Merge order

Do not merge before ddoghq/websites-sources publishes data/governance_controls.json. The shortcode calls errorf when the data is absent, so the site build will fail. That is deliberate — a missing data file should break the build rather than silently empty the page.

There is also a dd-source change (control description copy) that should deploy before this merges, otherwise the entries render without the default-parameter sentences ("The default threshold is 30 days of inactivity…"). The page is correct either way; it is just less complete until that ships.

Copy change for review

Enforcement lines now read "Enforcement: Automatically identifies and revokes…" rather than "Enforcement automatically identifies and revokes…". The colon lets the template use mitigations[].description verbatim instead of lowercasing its first character in Hugo. Happy to restore the original wording if preferred.

Verification

Built against live API data (GET /api/v2/governance/control, HTTP 200, 26 controls / 16 prod) and asserted on the rendered HTML:

  • 16 controls render, exactly the expected set
  • "Monitors Without Team Tags" absent
  • "Inactive Metrics Tags" present, "Inactive Metric Tag" gone
  • security / cost-optimization / data-hygiene section ids preserved

🤖 Generated with Claude Code

The "All available controls" section was hand-maintained and had drifted from
the control definitions: Dashboards with Low Quality Scores, Empty Log
Indexes, Inactive Log Pipelines and Unscoped Application Keys were missing,
"Inactive Metric Tag" should read "Inactive Metrics Tags", and "Monitors
Without Team Tags" is still in development and should not have been published.

Replaces the entries with a shortcode over data/governance_controls.json from
websites-sources. Each section keeps its own intro prose and collapse-content
wrapper, so only the control entries are generated; the shortcode is called
once per usage concern. Its markup mirrors what a markdown definition list
compiles to, so the entries render as they did before.

Enforcement copy now reads "Enforcement: Automatically ..." rather than
"Enforcement automatically ...", so the template can use the mitigation
description verbatim instead of lowercasing its first character.

An unrecognised usage_concern fails the build with the list of valid groups
rather than silently rendering an empty section.

Environment: Datadog workspace

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@github-actions github-actions Bot added the Architecture Everything related to the Doc backend label Jul 31, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Preview links (active after the build_preview check completes)

Modified Files


Controls are organized by usage concern: security, cost optimization, and data hygiene.

<div class="alert alert-info">The controls below are generated from the Governance Console control definitions, so this list always reflects the controls that are generally available. Controls still in development are not listed.</div>

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove this comment; it's an implementation detail unnecessary for the public-facing docs

Removes the alert box introducing the section as generated. How the list is
produced is not something a reader needs to act on, and the page already reads
as the authoritative list of available controls.

Environment: Datadog workspace

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@datadog-prod-us1-5

datadog-prod-us1-5 Bot commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Pipelines

⚠️ Warnings

🚦 1 Pipeline job failed

DataDog/documentation | build_preview   View in Datadog   GitLab

Useful? React with 👍 / 👎

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 4928bcc | Docs | Datadog PR Page | Give us feedback!

data/governance_controls.json is published by websites-sources and mounted from
_vendor/data at build time, like permissions.json and workflow_bundles.json. A
local copy - from a preview build, say - should never be committed, since it
would shadow the sourced file with stale content.

Environment: Datadog workspace

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@bi1yeu
bi1yeu marked this pull request as ready for review July 31, 2026 22:01
@bi1yeu
bi1yeu requested review from a team as code owners July 31, 2026 22:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Architecture Everything related to the Doc backend

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant