Skip to content

Commit 7bcc5c2

Browse files
[ACIX-1916] feat(ai): Create /follow-pr skill (#54482)
<!--Please give us some feedback on your experience writing this PR ! https://app.datadoghq.com/forms/43db4c02-6837-400c-8083-692e141b1b88 !--> ### What does this PR do? Adds a new skill, `/follow-pr` for.... well, following the status of a PR. ### Motivation This is meant as a base for a future, more fully-featured `/polish-pr` skill ### Describe how you validated your changes ### Additional Notes Co-authored-by: pierrelouis.veyrenc <pierrelouis.veyrenc@datadoghq.com> 25ec4bf
1 parent b6a556d commit 7bcc5c2

65 files changed

Lines changed: 422 additions & 422 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

agent-schema/cli/index.html

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4040,7 +4040,7 @@
40404040

40414041

40424042

4043-
<h1 id="cli-commands-dda-inv-schema">CLI Commands (<code>dda inv schema.*</code>)<a class="headerlink" href="#cli-commands-dda-inv-schema" title="Permanent link">&para;</a></h1>
4043+
<h1 id="cli-commands-dda-inv-schema">CLI Commands (<code>dda inv schema.*</code>)</h1>
40444044
<p>The schema tooling is exposed through a set of <code>dda inv schema.*</code> invoke tasks
40454045
(defined in <code>tasks/schema/</code>). This page documents each command, its arguments,
40464046
and when you would run it.</p>
@@ -4049,8 +4049,8 @@ <h1 id="cli-commands-dda-inv-schema">CLI Commands (<code>dda inv schema.*</code>
40494049
pipelines, so you rarely need to invoke them by hand — but they are useful when
40504050
adding or editing settings, debugging schema problems, or regenerating output
40514051
locally.</p>
4052-
<h2 id="how-the-commands-fit-together">How the commands fit together<a class="headerlink" href="#how-the-commands-fit-together" title="Permanent link">&para;</a></h2>
4053-
<h2 id="schemaadd-setting"><code>schema.add-setting</code><a class="headerlink" href="#schemaadd-setting" title="Permanent link">&para;</a></h2>
4052+
<h2 id="how-the-commands-fit-together">How the commands fit together</h2>
4053+
<h2 id="schemaadd-setting"><code>schema.add-setting</code></h2>
40544054
<p>Interactive wizard to add a new setting to the schema. It prompts for the
40554055
setting name (dotted path), type, default, visibility, and description, then
40564056
inserts the node into the correct schema file under <code>pkg/config/schema/yaml/</code>
@@ -4080,7 +4080,7 @@ <h2 id="schemaadd-setting"><code>schema.add-setting</code><a class="headerlink"
40804080
public with a description. It runs <code>schema.lint</code> at the end so any remaining
40814081
problems are visible.</p>
40824082
<hr />
4083-
<h2 id="schemagenerate"><code>schema.generate</code><a class="headerlink" href="#schemagenerate" title="Permanent link">&para;</a></h2>
4083+
<h2 id="schemagenerate"><code>schema.generate</code></h2>
40844084
<p>Generate the enriched schema files for the core Agent and system-probe.</p>
40854085
<div class="language-bash highlight"><pre><span></span><code><span id="__span-1-1"><a id="__codelineno-1-1" name="__codelineno-1-1" href="#__codelineno-1-1"></a>dda<span class="w"> </span>inv<span class="w"> </span>schema.generate<span class="w"> </span>--agent-bin<span class="o">=</span>./bin/agent/agent
40864086
</span></code></pre></div>
@@ -4125,7 +4125,7 @@ <h2 id="schemagenerate"><code>schema.generate</code><a class="headerlink" href="
41254125
<code>dda inv agent.build</code>. Rebuild after changing any <code>pkg/config/setup</code> code so
41264126
the schema reflects your changes.</p>
41274127
<hr />
4128-
<h2 id="schemalint"><code>schema.lint</code><a class="headerlink" href="#schemalint" title="Permanent link">&para;</a></h2>
4128+
<h2 id="schemalint"><code>schema.lint</code></h2>
41294129
<p>Validate the schema against the schema quality rules and exit
41304130
non-zero on any violation. This is the check enforced in CI
41314131
(<code>generate_config_schema-linux</code>).</p>
@@ -4156,7 +4156,7 @@ <h2 id="schemalint"><code>schema.lint</code><a class="headerlink" href="#schemal
41564156
</tbody>
41574157
</table>
41584158
<hr />
4159-
<h2 id="schematemplate"><code>schema.template</code><a class="headerlink" href="#schematemplate" title="Permanent link">&para;</a></h2>
4159+
<h2 id="schematemplate"><code>schema.template</code></h2>
41604160
<p>Render a single config template (one build type, one OS) from the schema file. Useful for inspecting what a setting will
41614161
look like in the generated example without running the whole build.</p>
41624162
<div class="language-bash highlight"><pre><span></span><code><span id="__span-3-1"><a id="__codelineno-3-1" name="__codelineno-3-1" href="#__codelineno-3-1"></a>dda<span class="w"> </span>inv<span class="w"> </span>schema.template<span class="w"> </span><span class="se">\</span>
@@ -4200,7 +4200,7 @@ <h2 id="schematemplate"><code>schema.template</code><a class="headerlink" href="
42004200
template sections are included; the OS target controls which platform-specific
42014201
defaults and <code>platform_only</code> settings are emitted.</p>
42024202
<hr />
4203-
<h2 id="schematemplate-all"><code>schema.template-all</code><a class="headerlink" href="#schematemplate-all" title="Permanent link">&para;</a></h2>
4203+
<h2 id="schematemplate-all"><code>schema.template-all</code></h2>
42044204
<p>Render every combination of build type × OS target from the core and
42054205
system-probe schemas at once. This is what the build pipeline uses to keep the
42064206
shipped <code>*.yaml.example</code> files in sync.</p>
@@ -4236,7 +4236,7 @@ <h2 id="schematemplate-all"><code>schema.template-all</code><a class="headerlink
42364236
</tbody>
42374237
</table>
42384238
<hr />
4239-
<h2 id="schemalocate"><code>schema.locate</code><a class="headerlink" href="#schemalocate" title="Permanent link">&para;</a></h2>
4239+
<h2 id="schemalocate"><code>schema.locate</code></h2>
42404240
<p>Find where a setting or section is defined in the schema source and print its
42414241
node plus the exact file and line.</p>
42424242
<div class="language-bash highlight"><pre><span></span><code><span id="__span-5-1"><a id="__codelineno-5-1" name="__codelineno-5-1" href="#__codelineno-5-1"></a>dda<span class="w"> </span>inv<span class="w"> </span>--<span class="w"> </span>schema.locate<span class="w"> </span>apm_config.enabled
@@ -4264,7 +4264,7 @@ <h2 id="schemalocate"><code>schema.locate</code><a class="headerlink" href="#sch
42644264
</span><span id="__span-6-8"><a id="__codelineno-6-8" name="__codelineno-6-8" href="#__codelineno-6-8"></a>dda<span class="w"> </span>inv<span class="w"> </span>--<span class="w"> </span>schema.locate<span class="w"> </span><span class="s1">&#39;apm_config\..*enabled&#39;</span><span class="w"> </span>--json
42654265
</span></code></pre></div>
42664266
<hr />
4267-
<h2 id="typical-workflows">Typical workflows<a class="headerlink" href="#typical-workflows" title="Permanent link">&para;</a></h2>
4267+
<h2 id="typical-workflows">Typical workflows</h2>
42684268
<p><strong>I edited a setting in <code>pkg/config/setup</code> and want the schema to reflect it:</strong></p>
42694269
<div class="language-bash highlight"><pre><span></span><code><span id="__span-7-1"><a id="__codelineno-7-1" name="__codelineno-7-1" href="#__codelineno-7-1"></a>dda<span class="w"> </span>inv<span class="w"> </span>agent.build<span class="w"> </span><span class="c1"># rebuild the binary</span>
42704270
</span><span id="__span-7-2"><a id="__codelineno-7-2" name="__codelineno-7-2" href="#__codelineno-7-2"></a>dda<span class="w"> </span>inv<span class="w"> </span>schema.generate<span class="w"> </span>--agent-bin<span class="o">=</span>./bin/agent/agent<span class="w"> </span><span class="c1"># regenerate the schema</span>
@@ -4279,7 +4279,7 @@ <h2 id="typical-workflows">Typical workflows<a class="headerlink" href="#typical
42794279
<div class="language-bash highlight"><pre><span></span><code><span id="__span-9-1"><a id="__codelineno-9-1" name="__codelineno-9-1" href="#__codelineno-9-1"></a>dda<span class="w"> </span>inv<span class="w"> </span>--<span class="w"> </span>schema.locate<span class="w"> </span>apm_config.enabled<span class="w"> </span><span class="c1"># exact: node + file:line</span>
42804280
</span><span id="__span-9-2"><a id="__codelineno-9-2" name="__codelineno-9-2" href="#__codelineno-9-2"></a>dda<span class="w"> </span>inv<span class="w"> </span>--<span class="w"> </span>schema.locate<span class="w"> </span><span class="s1">&#39;*enabled&#39;</span><span class="w"> </span><span class="c1"># pattern: all paths ending in &quot;enabled&quot;</span>
42814281
</span></code></pre></div>
4282-
<h2 id="see-also">See also<a class="headerlink" href="#see-also" title="Permanent link">&para;</a></h2>
4282+
<h2 id="see-also">See also</h2>
42834283
<ul>
42844284
<li><a href="../">Introduction</a> — what the schema is and why it exists.</li>
42854285
<li><a href="../keywords/">Keyword Reference</a> — the keywords these commands read and write.</li>

agent-schema/examples/index.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3908,12 +3908,12 @@
39083908

39093909

39103910

3911-
<h1 id="examples">Examples<a class="headerlink" href="#examples" title="Permanent link">&para;</a></h1>
3911+
<h1 id="examples">Examples</h1>
39123912
<p>This page walks through three annotated examples taken from or inspired by the
39133913
real schema files. Each example builds on the concepts introduced in the
39143914
<a href="../keywords/">Keyword Reference</a>.</p>
39153915
<hr />
3916-
<h2 id="example-1-simple-public-setting-node-api_key">Example 1 — Simple public setting node (<code>api_key</code>)<a class="headerlink" href="#example-1-simple-public-setting-node-api_key" title="Permanent link">&para;</a></h2>
3916+
<h2 id="example-1-simple-public-setting-node-api_key">Example 1 — Simple public setting node (<code>api_key</code>)</h2>
39173917
<div class="language-yaml highlight"><pre><span></span><code><span id="__span-0-1"><a id="__codelineno-0-1" name="__codelineno-0-1" href="#__codelineno-0-1"></a><span class="nt">api_key</span><span class="p">:</span>
39183918
</span><span id="__span-0-2"><a id="__codelineno-0-2" name="__codelineno-0-2" href="#__codelineno-0-2"></a><span class="w"> </span><span class="nt">node_type</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">setting</span><span class="w"> </span><span class="c1"># (1)</span>
39193919
</span><span id="__span-0-3"><a id="__codelineno-0-3" name="__codelineno-0-3" href="#__codelineno-0-3"></a><span class="w"> </span><span class="nt">type</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">string</span><span class="w"> </span><span class="c1"># (2)</span>
@@ -3945,7 +3945,7 @@ <h2 id="example-1-simple-public-setting-node-api_key">Example 1 — Simple publi
39453945
and public documentation. Without this, the setting is considered internal.</li>
39463946
</ol>
39473947
<hr />
3948-
<h2 id="example-2-section-node-with-mixed-children-apm_config">Example 2 — Section node with mixed children (<code>apm_config</code>)<a class="headerlink" href="#example-2-section-node-with-mixed-children-apm_config" title="Permanent link">&para;</a></h2>
3948+
<h2 id="example-2-section-node-with-mixed-children-apm_config">Example 2 — Section node with mixed children (<code>apm_config</code>)</h2>
39493949
<p>This example shows a section node taken from <code>pkg/config/schema/core_schema.yaml</code>
39503950
with several child setting nodes, including one with a <code>platform_default</code>.</p>
39513951
<div class="language-yaml highlight"><pre><span></span><code><span id="__span-1-1"><a id="__codelineno-1-1" name="__codelineno-1-1" href="#__codelineno-1-1"></a><span class="nt">apm_config</span><span class="p">:</span>
@@ -4009,7 +4009,7 @@ <h2 id="example-2-section-node-with-mixed-children-apm_config">Example 2 — Sec
40094009
is known, eg. setting a value for <code>other</code> which is Darwin specific when you already have a value for Linux and Windows.</li>
40104010
</ol>
40114011
<hr />
4012-
<h2 id="example-3-complex-nested-type-cel_workload_exclude">Example 3 — Complex nested type (<code>cel_workload_exclude</code>)<a class="headerlink" href="#example-3-complex-nested-type-cel_workload_exclude" title="Permanent link">&para;</a></h2>
4012+
<h2 id="example-3-complex-nested-type-cel_workload_exclude">Example 3 — Complex nested type (<code>cel_workload_exclude</code>)</h2>
40134013
<p>This example shows how JSON Schema's composable
40144014
validation handles a non-trivial type. <code>cel_workload_exclude</code> corresponds to
40154015
the following Go struct:</p>

agent-schema/faq/index.html

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3974,9 +3974,9 @@
39743974

39753975

39763976

3977-
<h1 id="faq">FAQ<a class="headerlink" href="#faq" title="Permanent link">&para;</a></h1>
3977+
<h1 id="faq">FAQ</h1>
39783978
<hr />
3979-
<h2 id="how-do-i-add-a-new-setting">How do I add a new setting?<a class="headerlink" href="#how-do-i-add-a-new-setting" title="Permanent link">&para;</a></h2>
3979+
<h2 id="how-do-i-add-a-new-setting">How do I add a new setting?</h2>
39803980
<ol>
39813981
<li>
39823982
<p><strong>Determine the node type.</strong> If the setting holds a value (string, number,
@@ -4019,12 +4019,12 @@ <h2 id="how-do-i-add-a-new-setting">How do I add a new setting?<a class="headerl
40194019
</span><span id="__span-0-4"><a id="__codelineno-0-4" name="__codelineno-0-4" href="#__codelineno-0-4"></a><span class="w"> </span><span class="nt">description</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">Enables the new feature.</span>
40204020
</span></code></pre></div>
40214021
<hr />
4022-
<h2 id="how-do-i-deprecate-a-setting">How do I deprecate a setting?<a class="headerlink" href="#how-do-i-deprecate-a-setting" title="Permanent link">&para;</a></h2>
4022+
<h2 id="how-do-i-deprecate-a-setting">How do I deprecate a setting?</h2>
40234023
<blockquote>
40244024
<p><strong>Note:</strong> [WIP] Automated solution coming soon.</p>
40254025
</blockquote>
40264026
<hr />
4027-
<h2 id="how-do-i-make-a-setting-public">How do I make a setting public?<a class="headerlink" href="#how-do-i-make-a-setting-public" title="Permanent link">&para;</a></h2>
4027+
<h2 id="how-do-i-make-a-setting-public">How do I make a setting public?</h2>
40284028
<ol>
40294029
<li>
40304030
<p><strong>Write a <code>description</code></strong> that explains what the setting does, what the default means, and any caveats. Every public
@@ -4057,7 +4057,7 @@ <h2 id="how-do-i-make-a-setting-public">How do I make a setting public?<a class=
40574057
<p>The setting will appear in the configuration examples (ex: <code>datadog.yaml.example</code>) the next time the file is
40584058
regenerated.</p>
40594059
<hr />
4060-
<h2 id="how-do-i-document-a-public-setting">How do I document a public setting?<a class="headerlink" href="#how-do-i-document-a-public-setting" title="Permanent link">&para;</a></h2>
4060+
<h2 id="how-do-i-document-a-public-setting">How do I document a public setting?</h2>
40614061
<ol>
40624062
<li><strong>Write a clear <code>description</code></strong> covering:</li>
40634063
<li>What the setting does.</li>
@@ -4082,13 +4082,13 @@ <h2 id="how-do-i-document-a-public-setting">How do I document a public setting?<
40824082
<li><strong>Set <code>visibility: public</code></strong> to include the setting in generated output.</li>
40834083
</ol>
40844084
<hr />
4085-
<h2 id="how-do-i-generate-datadogyamlexample">How do I generate <code>datadog.yaml.example</code>?<a class="headerlink" href="#how-do-i-generate-datadogyamlexample" title="Permanent link">&para;</a></h2>
4085+
<h2 id="how-do-i-generate-datadogyamlexample">How do I generate <code>datadog.yaml.example</code>?</h2>
40864086
<p>The generation of <code>datadog.yaml.example</code> from the schema is wired into the
40874087
Agent's build pipeline and runs automatically. Developers do not normally need
40884088
to trigger it manually.</p>
40894089
<p>If you want to validate the generated example you can use <code>dda inv schema.template-all</code> command.</p>
40904090
<hr />
4091-
<h2 id="what-is-the-difference-between-datadogyamlexample-and-system-probeyamlexample">What is the difference between <code>datadog.yaml.example</code> and <code>system-probe.yaml.example</code>?<a class="headerlink" href="#what-is-the-difference-between-datadogyamlexample-and-system-probeyamlexample" title="Permanent link">&para;</a></h2>
4091+
<h2 id="what-is-the-difference-between-datadogyamlexample-and-system-probeyamlexample">What is the difference between <code>datadog.yaml.example</code> and <code>system-probe.yaml.example</code>?</h2>
40924092
<p>Each configuration file has its own schema and its own generated example file:</p>
40934093
<ul>
40944094
<li>

agent-schema/index.html

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3870,19 +3870,19 @@
38703870

38713871

38723872

3873-
<h1 id="agent-configuration-schema">Agent Configuration Schema<a class="headerlink" href="#agent-configuration-schema" title="Permanent link">&para;</a></h1>
3873+
<h1 id="agent-configuration-schema">Agent Configuration Schema</h1>
38743874
<p>The Datadog Agent configuration schema is a YAML-based
38753875
<a href="https://json-schema.org/">JSON Schema</a> that centrally describes every
38763876
configuration setting for the Agent. It is written in YAML for readability but
38773877
is fully compatible with JSON Schema tooling.</p>
3878-
<h2 id="why-it-exists">Why it exists<a class="headerlink" href="#why-it-exists" title="Permanent link">&para;</a></h2>
3878+
<h2 id="why-it-exists">Why it exists</h2>
38793879
<p>Previously, Agent configuration was defined through a combination of imperative Go code (<code>BindEnvAndSetDefault</code> calls in
38803880
<code>pkg/config/setup</code>), YAML example files maintained by-hand, and scattered validation logic. This made it hard to
38813881
understand what a setting does, what values it accepts, or what its default is — without reading source code.</p>
38823882
<p>The schema replaces this with a <strong>single source of truth</strong>. All information
38833883
about a setting — its type, default value, documentation, environment variables,
38843884
validation rules, and visibility — lives in one place.</p>
3885-
<h2 id="what-it-enables">What it enables<a class="headerlink" href="#what-it-enables" title="Permanent link">&para;</a></h2>
3885+
<h2 id="what-it-enables">What it enables</h2>
38863886
<ul>
38873887
<li><strong>Config validation without running the Agent</strong> — any JSON Schema library can
38883888
validate a customer's <code>datadog.yaml</code> against the schema.</li>
@@ -3896,15 +3896,15 @@ <h2 id="what-it-enables">What it enables<a class="headerlink" href="#what-it-ena
38963896
<li><strong>Runtime validation</strong> — The user configuration can be validate at runtime by the Agent allowing automatic fallback
38973897
to default upon an invalid value.</li>
38983898
</ul>
3899-
<h2 id="terminology">Terminology<a class="headerlink" href="#terminology" title="Permanent link">&para;</a></h2>
3899+
<h2 id="terminology">Terminology</h2>
39003900
<ul>
39013901
<li><strong>Path</strong> — a string of terms separated by dots (<code>"."</code>) that represents a series of nodes in the config tree.</li>
39023902
<li><strong>Setting</strong> — a configurable value that can be located using a path (example <code>apm_config.enabled</code>)</li>
39033903
<li><strong>Section</strong> — a groupping of settings under a common name (example <code>apm_config</code>)</li>
39043904
<li><strong>Object</strong> — a data type of key-value pairs. Also called a map (in Go) or dict (in Python), but called an object in JSON Schema since it comes from JavaScript.</li>
39053905
<li><strong>Default</strong> — the value that will be retrieved for a given setting if none is specified by the user's file-based configuration or environment variable (or other source).</li>
39063906
</ul>
3907-
<h2 id="node-types">Node types<a class="headerlink" href="#node-types" title="Permanent link">&para;</a></h2>
3907+
<h2 id="node-types">Node types</h2>
39083908
<p>The schema tree is composed of two types of nodes:</p>
39093909
<ul>
39103910
<li><strong>Setting nodes</strong> represent individual settings. They have a type and a value.
@@ -3917,7 +3917,7 @@ <h2 id="node-types">Node types<a class="headerlink" href="#node-types" title="Pe
39173917
<p>The distinction matters when a setting's value is an object. For example, <code>docker_labels_as_tags</code> is a <code>type: object</code>
39183918
setting node — its value is a dict of strings, but that dict is the setting's <em>value</em>, not a group of child settings. It
39193919
is a setting node, and <strong>not</strong> a section node.</p>
3920-
<h2 id="one-schema-per-configuration-file">One schema per configuration file<a class="headerlink" href="#one-schema-per-configuration-file" title="Permanent link">&para;</a></h2>
3920+
<h2 id="one-schema-per-configuration-file">One schema per configuration file</h2>
39213921
<p>The Agent ships with multiple configuration files, each with its own schema:</p>
39223922
<table>
39233923
<thead>
@@ -3938,12 +3938,12 @@ <h2 id="one-schema-per-configuration-file">One schema per configuration file<a c
39383938
</tbody>
39393939
</table>
39403940
<p>All schemas share the same keyword set described in this documentation.</p>
3941-
<h2 id="json-schema-foundation">JSON Schema foundation<a class="headerlink" href="#json-schema-foundation" title="Permanent link">&para;</a></h2>
3941+
<h2 id="json-schema-foundation">JSON Schema foundation</h2>
39423942
<p>The Agent schema builds on <a href="https://json-schema.org/">JSON Schema draft 2020-12</a>.
39433943
This documentation focuses on how keywords are used in the Agent schema
39443944
specifically. For a general introduction to JSON Schema, see
39453945
<a href="https://json-schema.org/understanding-json-schema">Understanding JSON Schema</a>.</p>
3946-
<h2 id="next-steps">Next steps<a class="headerlink" href="#next-steps" title="Permanent link">&para;</a></h2>
3946+
<h2 id="next-steps">Next steps</h2>
39473947
<ul>
39483948
<li><a href="keywords/">Keyword Reference</a> — complete reference for all supported keywords.</li>
39493949
<li><a href="examples/">Examples</a> — annotated, real-world examples from the schema.</li>

0 commit comments

Comments
 (0)