Skip to content

Commit 5b536da

Browse files
committed
fix conflicts and merge master
2 parents 8b52e89 + d1752ba commit 5b536da

956 files changed

Lines changed: 98522 additions & 38610 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.

.github/workflows/bump_synthetics_worker_version.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,8 @@ jobs:
7171
owner: context.repo.owner,
7272
repo: context.repo.repo,
7373
title: "(Automated) Bump version",
74-
body: "### Merge instructions\n- [x] Please merge after reviewing",
74+
body: "### Merge instructions\n- **Please merge this PR after approving!**",
7575
head: "automatic-version-update/synthetics-worker",
7676
base: "master",
7777
maintainer_can_modify: true
78-
})
78+
})

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ _vendor/
99

1010
# htmltest tmp files
1111
bin/htmltest
12+
htmltest_report.txt
1213
tmp
1314

1415
# Ignore generated examples

CLAUDE.md

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,48 @@ CRITICAL: Always use format `<name>/<description>` with forward slash. Without t
6868
- No branch preview will be generated
6969
- CI will fail
7070

71+
### PR Checklist
72+
- Leave the "Ready for merge" checkbox unchecked unless explicitly requested.
73+
74+
### PR Title Format
75+
Use the Jira ticket key in square brackets: `[DOCS-XXXXX] Brief description`
76+
77+
### PR Description Template
78+
```
79+
<!-- *Note: Please remember to review the Datadog Documentation [Contribution Guidelines](https://github.com/DataDog/documentation/blob/master/CONTRIBUTING.md) if you have not yet done so.* -->
80+
81+
### What does this PR do? What is the motivation?
82+
83+
Fixes DOCS-XXXXX
84+
85+
[Brief description of changes]
86+
87+
### Merge instructions
88+
89+
Merge readiness:
90+
- [ ] Ready for merge
91+
92+
### Additional notes
93+
94+
```
95+
96+
### Pre-commit Checklist
97+
Before committing changes, run Vale to check style compliance:
98+
```bash
99+
vale /path/to/changed/file.md
100+
```
101+
Fix any warnings before committing. Common issues:
102+
- "once you" → "after you"
103+
- "fine-tune" → "customize"
104+
- "ensure" → "helps ensure"
105+
- Remove filler words: easy, simple, just, please, very
106+
107+
### Commit Messages
108+
- Keep messages concise and descriptive
109+
110+
### Jira Workflow
111+
- When a PR is created, transition the Jira ticket to **Reviewable** status (transition ID: 101)
112+
71113
### Content Guidelines
72114
Follow the CONTRIBUTING.md style guide:
73115
- Use American English (en_US)
@@ -76,6 +118,31 @@ Follow the CONTRIBUTING.md style guide:
76118
- Use imperative voice for instructions
77119
- Don't edit translated content directly (managed externally)
78120

121+
### Style Rules (from datadog-vale)
122+
The full Vale linter rules are at https://github.com/DataDog/datadog-vale. Key substitutions:
123+
124+
| Don't use | Use instead |
125+
|-----------|-------------|
126+
| once you/once the | after you/after the |
127+
| fine-tune | customize, optimize, or refine |
128+
| ensure/ensures | helps, helps ensure |
129+
| leverage | use, apply, take advantage of |
130+
| utilize | use |
131+
| in order to | to |
132+
| easy/easily | (remove) |
133+
| simple/simply | (remove) |
134+
| just | (remove) |
135+
| please | (remove) |
136+
| via | with, through |
137+
| Note that | **Note**: |
138+
| drill down/into | examine, investigate, analyze |
139+
| refer to/visit | see, read, follow |
140+
| obvious/obviously | (remove) |
141+
| seamless/seamlessly | (remove) |
142+
| quick/quickly | (remove) |
143+
144+
Avoid temporal words: currently, now, will, won't
145+
79146
## Hugo-Specific Details
80147

81148
### Shortcodes

assets/scripts/components/expression-language-parser.js

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,17 @@ class ExpressionLanguageParser {
1111

1212
// Built-in functions
1313
this.builtinFunctions = {
14+
// Variable operations
15+
isDefined: (varNameNode) => {
16+
// isDefined receives the AST node directly, not the evaluated value
17+
// This allows us to check if a variable exists without throwing an error
18+
if (varNameNode && varNameNode.type === 'VARIABLE') {
19+
return this.environment.hasOwnProperty(varNameNode.name);
20+
}
21+
// If it's not a variable node, it must be a value that exists
22+
return true;
23+
},
24+
1425
// String functions
1526
len: (value) => {
1627
if (typeof value === 'string') return value.length;
@@ -290,6 +301,7 @@ class ExpressionLanguageParser {
290301
*/
291302
_getFunctionDescription(funcName) {
292303
const descriptions = {
304+
'isDefined': 'Checks whether a variable is defined',
293305
'len': 'Returns the length of a string, array, or object',
294306
'count': 'Returns the length of a string, array, or object',
295307
'isEmpty': 'Checks if a string, array, or object is empty',
@@ -1044,6 +1056,15 @@ class ExpressionLanguageParser {
10441056

10451057
case 'CALL':
10461058
const callee = this._evaluateAst(ast.callee);
1059+
1060+
// Special handling for isDefined - pass the AST node directly
1061+
if (ast.callee.type === 'VARIABLE' && ast.callee.name === 'isDefined') {
1062+
if (ast.args.length !== 1) {
1063+
throw new Error('isDefined() requires exactly one argument');
1064+
}
1065+
return callee(ast.args[0]);
1066+
}
1067+
10471068
const args = ast.args.map(arg => {
10481069
if (arg.type === 'PREDICATE') {
10491070
return arg;

assets/scripts/config/regions.config.js

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -607,6 +607,24 @@ export default {
607607
ap2: '\n .useSite(DatadogSite.AP2)\n .trackCrashes(true)',
608608
gov: '\n .useSite(DatadogSite.US1_FED)\n .trackCrashes(true)'
609609
},
610+
flutter_web_logs_cdn_path: {
611+
us: 'us1/v5/datadog-logs.js',
612+
us3: 'us3/v5/datadog-logs.js',
613+
us5: 'us5/v5/datadog-logs.js',
614+
eu: 'eu1/v5/datadog-logs.js',
615+
ap1: 'ap1/v5/datadog-logs.js',
616+
ap2: 'ap2/v5/datadog-logs.js',
617+
gov: 'datadog-logs-v5.js'
618+
},
619+
flutter_web_rum_cdn_path: {
620+
us: 'us1/v6/datadog-rum-slim.js',
621+
us3: 'us3/v6/datadog-rum-slim.js',
622+
us5: 'us5/v6/datadog-rum-slim.js',
623+
eu: 'eu1/v6/datadog-rum-slim.js',
624+
ap1: 'ap1/v6/datadog-rum-slim.js',
625+
ap2: 'ap2/v6/datadog-rum-slim.js',
626+
gov: 'datadog-rum-slim-v6.js'
627+
},
610628
reactnative_sdk_init: {
611629
us: '',
612630
us3: '',
@@ -625,6 +643,15 @@ export default {
625643
ap2: 'ap2',
626644
gov: 'us1_fed'
627645
},
646+
synthetics_intake_endpoint: {
647+
us: 'intake.synthetics.datadoghq.com',
648+
us3: 'intake.synthetics.us3.datadoghq.com',
649+
us5: 'intake.synthetics.us5.datadoghq.com',
650+
eu: 'intake.synthetics.datadoghq.eu',
651+
ap1: 'intake.synthetics.ap1.datadoghq.com',
652+
ap2: 'intake.synthetics.ap2.datadoghq.com',
653+
gov: 'intake.synthetics.ddog-gov.com'
654+
},
628655
cursor_mcp_install_deeplink: {
629656
us: 'cursor://anysphere.cursor-deeplink/mcp/install?name=datadog-onboarding-us1&config=eyJ1cmwiOiJodHRwczovL21jcC5kYXRhZG9naHEuY29tL2FwaS91bnN0YWJsZS9tY3Atc2VydmVyL21jcD90b29sc2V0cz1vbmJvYXJkaW5nIiwidHlwZSI6Im9hdXRoIn0=',
630657
us3: 'cursor://anysphere.cursor-deeplink/mcp/install?name=datadog-onboarding-us3&config=eyJ1cmwiOiJodHRwczovL21jcC51czMuZGF0YWRvZ2hxLmNvbS9hcGkvdW5zdGFibGUvbWNwLXNlcnZlci9tY3A/dG9vbHNldHM9b25ib2FyZGluZyIsInR5cGUiOiJvYXV0aCJ9',

assets/scripts/cookie-banner.js

Lines changed: 0 additions & 40 deletions
This file was deleted.

assets/scripts/main-dd-js.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import 'bootstrap/js/dist/collapse';
77
import './datadog-docs';
88
import './utms';
99
import './alpine';
10-
import './cookie-banner';
1110

1211
import './components/copy-code';
1312
import './components/global-modals';
@@ -22,4 +21,4 @@ import './components/signup';
2221

2322
// Add Bootstrap Tooltip across docs
2423
const tooltipTriggerList = document.querySelectorAll('[data-bs-toggle="tooltip"]')
25-
Array.from(tooltipTriggerList).map(tooltipTriggerEl => new Tooltip(tooltipTriggerEl))
24+
Array.from(tooltipTriggerList).map(tooltipTriggerEl => new Tooltip(tooltipTriggerEl))

assets/scripts/tests/expression-language-parser.test.js

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -818,6 +818,45 @@ describe('ExpressionLanguageParser', () => {
818818
});
819819
});
820820

821+
describe('isDefined function', () => {
822+
test('should return true for defined variables', () => {
823+
const parser = new ExpressionLanguageParser();
824+
parser.evaluate('x = 5');
825+
826+
const result = parser.evaluate('isDefined(x)');
827+
expect(result.success).toBe(true);
828+
expect(result.result).toBe('True');
829+
});
830+
831+
test('should return false for undefined variables', () => {
832+
const parser = new ExpressionLanguageParser();
833+
834+
const result = parser.evaluate('isDefined(undefinedVar)');
835+
expect(result.success).toBe(true);
836+
expect(result.result).toBe('False');
837+
});
838+
839+
test('should return true for built-in variables', () => {
840+
const parser = new ExpressionLanguageParser();
841+
842+
const result = parser.evaluate('isDefined(myString)');
843+
expect(result.success).toBe(true);
844+
expect(result.result).toBe('True');
845+
});
846+
847+
test('should work in conditional expressions', () => {
848+
const parser = new ExpressionLanguageParser();
849+
850+
const result1 = parser.evaluate('isDefined(myString) && len(myString) > 0');
851+
expect(result1.success).toBe(true);
852+
expect(result1.result).toBe('True');
853+
854+
const result2 = parser.evaluate('isDefined(notDefined) || mySequence[0] == 1');
855+
expect(result2.success).toBe(true);
856+
expect(result2.result).toBe('True');
857+
});
858+
});
859+
821860
describe('Simulator Mode', () => {
822861
let parser;
823862

0 commit comments

Comments
 (0)