-
Notifications
You must be signed in to change notification settings - Fork 15
[nodejs] fix remote config polling slowing down multiple tests #6808
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
c8ceec2
77646f0
fea7637
02ccdf9
9417c54
a2db25c
173493b
d907741
fa0032e
1f59966
49571fd
bc70b59
00fea28
73b9b1b
ee07ec9
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -309,6 +309,9 @@ def configure(self, config: pytest.Config): | |
|
|
||
| library = self.weblog_infra.library_name | ||
|
|
||
| if library == "nodejs": | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It'll make the default configuration for almost all scenarios different from the default configuration our customers are using. Can you rather add this on individual scenarios when there is an explicit advantage ?
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There is an explicit advantage everywhere to being faster. Doing something faster is not much different than what customers are using, it just happens faster. It's not like an option that changes behaviour where I would be more in agreement (and even then if the config exists we should test multiple values at that point) |
||
| self.weblog_infra.http_container.environment.setdefault("DD_REMOTE_CONFIG_POLL_INTERVAL_SECONDS", "0.5") | ||
|
|
||
| if self._library_interface_timeout is None: | ||
| if library == "java": | ||
| self.library_interface_timeout = 25 | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -141,7 +141,8 @@ def remote_config_applied(data: dict) -> bool: | |
|
|
||
| library.wait_for(remote_config_applied, timeout=30) | ||
| # ensure the library has enough time to apply the config to all subprocesses | ||
| time.sleep(2) | ||
| if context.library.name != "nodejs": | ||
| time.sleep(2) | ||
|
Comment on lines
+144
to
+145
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Useful? React with 👍 / 👎.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. According to Claude this doesn't apply to Node. |
||
|
|
||
| return current_states | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This introduces Node-specific behavior directly in shared test logic (
context.library == "nodejs") instead of splitting behavior via manifests/separate test methods. Per.cursor/rules/pr-review.mdc(rule 2), runtime library branching in tests should be avoided because it hides per-library behavior differences inside one test path and makes scenario coverage and future maintenance error-prone.Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is by design. There are a lot of hacks and workarounds in system tests which makes it difficult to make an improvement across the board. Limiting them to just one language avoids weird side-effects in other languages.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In theory, we try to avoid any language-specific assertions. Unfortunately, yes, there are (too many) execpetions, but they are not an argument to add more 😉
FMI, this changes seems to me very legit (wait for explicit signal seems always better), it does not work for other libs ?
Now, it's not my decisions here, if debugger team is happy with this, I'm ok. Could you ask a review from them ? cc @tylfin
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just saw the approval from @tylfin, so AGTM.
But I'm curious to know if we could apply this to other libs.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know how to validate that as system tests just keep blowing up in several languages (especially Java and PHP) even with no changes at all. They're also much much slower than Node, so timing specific things tend to impact them a lot. I'd rather start with Node as we know it works, and then expand if we want, or I can yolo every language if that's preferred (except the sleep because that cannot work in languages with asynchronous workers)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The change seems to me very valid, and should be applied on all languages. WDYT @tylfin ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm actually splitting up the work as separate PRs, starting with #6851