Skip to content

Commit d943c71

Browse files
pierotiboubwoebi
andauthored
Disable sidecar on 8.3 (#2700)
* disable sidecar on 8.3 * Update sidecar_fallback.phpt * Run tests without explicit sidecar --------- Co-authored-by: Bob Weinand <[email protected]>
1 parent 8686a6f commit d943c71

6 files changed

Lines changed: 11 additions & 4 deletions

File tree

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -985,7 +985,7 @@ define run_composer_with_retry
985985
endef
986986

987987
define run_tests_without_coverage
988-
$(TEST_EXTRA_ENV) $(ENV_OVERRIDE) php $(TEST_EXTRA_INI) -d datadog.instrumentation_telemetry_enabled=0 -d datadog.trace.sidecar_trace_sender=$(shell test $(PHP_MAJOR_MINOR) -ge 83 && echo 1 || echo 0) $(TRACER_SOURCES_INI) $(PHPUNIT) $(1) --filter=$(FILTER)
988+
$(TEST_EXTRA_ENV) $(ENV_OVERRIDE) php $(TEST_EXTRA_INI) -d datadog.instrumentation_telemetry_enabled=0 -d datadog.trace.sidecar_trace_sender=$(shell test $(PHP_MAJOR_MINOR) -ge 84 && echo 1 || echo 0) $(TRACER_SOURCES_INI) $(PHPUNIT) $(1) --filter=$(FILTER)
989989
endef
990990

991991
define run_tests_with_coverage

ext/configuration.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ enum ddtrace_sampling_rules_format {
5353
#define DD_INTEGRATION_ANALYTICS_ENABLED_DEFAULT false
5454
#define DD_INTEGRATION_ANALYTICS_SAMPLE_RATE_DEFAULT 1
5555

56-
#if PHP_VERSION_ID >= 80300 || defined(_WIN32)
56+
#if defined(_WIN32)
5757
#define DD_SIDECAR_TRACE_SENDER_DEFAULT true
5858
#else
5959
#define DD_SIDECAR_TRACE_SENDER_DEFAULT false

tests/ext/background-sender/sidecar_fallback.phpt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
Send telemetry about the sidecar being disabled
33
--SKIPIF--
44
<?php include __DIR__ . '/../includes/skipif_no_dev_env.inc'; ?>
5+
<?php die('skip: Sidecar is nowhere enabled by default yet.'); ?>
56
<?php if (PHP_VERSION_ID < 80300) die('skip: Sidecar fallback exists only on PHP 8.3'); ?>
67
<?php if (strncasecmp(PHP_OS, "WIN", 3) == 0) die('skip: There is no background sender on Windows'); ?>
78
<?php if (getenv('USE_ZEND_ALLOC') === '0' && !getenv("SKIP_ASAN")) die('skip: valgrind reports sendmsg(msg.msg_control) points to uninitialised byte(s), but it is unproblematic and outside our control in rust code'); ?>

tests/ext/sidecar_disabled_when_telemetry_disabled.phpt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ Sidecar should be disabled when telemetry is disabled
66
<?php
77
include_once 'startup_logging.inc';
88

9+
// This test isn't relevant now as we're not enabling sidecar on 8.3.
10+
// It is still working so I'll leave it here as a commodity.
11+
912
// IN PHP 8.3, the sidecar is enabled
1013
// In all other versions the sidecar is disabled.
1114
// But we disable in all cases if telemetry is disabled.

tests/ext/sidecar_enabled.phpt

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
11
--TEST--
22
Sidecar should be enabled by default on PHP 8.3
33
--SKIPIF--
4-
<?php include 'startup_logging_skipif_unix_83.inc'; ?>
4+
<?php include 'startup_logging_skip_unless_unix_83.inc'; ?>
55
--FILE--
66
<?php
77
include_once 'startup_logging.inc';
88

9+
// This test isn't relevant now as we're not enabling sidecar on 8.3.
10+
// I'll leave it here as a commodity.
11+
912
// IN PHP 8.3, the sidecar is enabled by default, let's test this here
1013
// In all other versions the sidecar is disabled but this is tested by sidecar_disabled_when_telemetry_disabled.phpt
1114
$logs = dd_get_startup_logs([], [
@@ -18,4 +21,4 @@ dd_dump_startup_logs($logs, [
1821

1922
?>
2023
--EXPECT--
21-
sidecar_trace_sender: true
24+
sidecar_trace_sender: false
File renamed without changes.

0 commit comments

Comments
 (0)