Skip to content

Improve performances by reducing RC poll interval on all E2E scenarios on python and node.js#6879

Merged
rochdev merged 3 commits into
mainfrom
roch.devost/nodejs-rc-poll-interval-default
May 12, 2026
Merged

Improve performances by reducing RC poll interval on all E2E scenarios on python and node.js#6879
rochdev merged 3 commits into
mainfrom
roch.devost/nodejs-rc-poll-interval-default

Conversation

@rochdev
Copy link
Copy Markdown
Member

@rochdev rochdev commented May 7, 2026

Summary

Test plan

  • Run an RC-dependent scenario against the Node.js weblog and verify the poll interval is applied

Human notes

Example gains from the worst offenders:

  • APPSEC_RUNTIME_ACTIVATION goes from 9 minutes to 3 minutes.
  • APPSEC_API_SECURITY_RC goes from 8 minutes to <3 minutes.

This is significant because for languages that parallelize the tests, our total test time of our entire CI ends up being our slowest jobs, which were those. So fixing this one problem alone will reduce our total run time significantly.


🤖 Generated with Claude Code

Node.js starts the poll timer only after a response is received, so
0.2s is safe. Other languages may use a fixed interval or have bugs
that cause race conditions at shorter intervals.

Co-Authored-By: Claude Sonnet 4.6 (1M context) <[email protected]>
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 7, 2026

CODEOWNERS have been resolved as:

utils/_context/_scenarios/endtoend.py                                   @DataDog/system-tests-core

@rochdev rochdev marked this pull request as ready for review May 7, 2026 21:59
@rochdev rochdev requested a review from a team as a code owner May 7, 2026 21:59
@datadog-datadog-prod-us1-2
Copy link
Copy Markdown

datadog-datadog-prod-us1-2 Bot commented May 7, 2026

Tests

🎉 All green!

❄️ No new flaky tests detected
🧪 All tests passed

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

Comment thread utils/_context/_scenarios/endtoend.py Outdated
Copy link
Copy Markdown
Collaborator

@cbeauchesne cbeauchesne left a comment

Choose a reason for hiding this comment

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

As we've discussed by zoom, my point about this is that it diverges from the standard configuration applied on our customers, and does so across all scenarios without distinction. It also introduces a different testing approach for Python/Node compared to the other languages.

As a result:

  • From a QA perspective, this is not something I would recommend.
  • That said, this is not my decision to make, so I’m neither opposing nor approving it. Each product team should weigh in on this. If there is alignment across teams, then that’s fine.

Just one "request" change : the PR description does not include the expected time savings. This is important to help evaluate the trade-offs, so it would be helpful to add it.

@rochdev
Copy link
Copy Markdown
Member Author

rochdev commented May 11, 2026

As we've discussed by zoom, my point about this is that it diverges from the standard configuration applied on our customers, and does so across all scenarios without distinction. It also introduces a different testing approach for Python/Node compared to the other languages.

Yes, it's always better to not have any special casing, but this is a problem that is impacting us significantly, so the trade-off is worth it. That is not necessarily the case for every language. For example, a language that already has a 1h CI would not case that system tests are slower. But for languages that have an efficient CI pipeline, this has a huge impact. So the trade-off of polling faster is worth more than the potential risk. That risk is also extremely minimal, polling should always work the same regardless of the interval. That is the nature of short-polling. Long-polling would be instant but that would be a design change.

That said, this is not my decision to make, so I’m neither opposing nor approving it. Each product team should weigh in on this. If there is alignment across teams, then that’s fine.

Discussed this with the teams and everyone is on board with the change. Still limiting the scope to languages that are known to have a safe polling strategy.

Just one "request" change : the PR description does not include the expected time savings. This is important to help evaluate the trade-offs, so it would be helpful to add it.

Added!

@tabgok tabgok requested a review from crysmags May 11, 2026 14:43
Copy link
Copy Markdown
Contributor

@bm1549 bm1549 left a comment

Choose a reason for hiding this comment

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

LGTM, one non-blocking comment


library = self.weblog_infra.library_name

if library in ("nodejs", "python"):
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

If we want to consider this as the default behavior, it would be nice to invert the condition here so that it signals that a lower polling rate is the "default" and the higher one is anomalous

Not blocking for this PR, but definitely a nice to have

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I agree with the sentiment. I'll open a follow-up PR to expand this to other languages and do some more testing, but for now the opt-in is fine I think to at least unblock Node and improve Python.

@cbeauchesne cbeauchesne dismissed their stale review May 12, 2026 07:42

Description updated

@cbeauchesne cbeauchesne changed the title feat: set faster RC poll interval default for Node.js scenarios Improve performances by reducing RC poll interval on all E2E scenarios on python and node.js May 12, 2026
@rochdev rochdev merged commit f21fb43 into main May 12, 2026
1398 of 1405 checks passed
@rochdev rochdev deleted the roch.devost/nodejs-rc-poll-interval-default branch May 12, 2026 14:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants