From 787034ce69948608e83604721bef863fb247e86f Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Fri, 6 Sep 2024 09:56:50 +0200 Subject: test build for upcoming 1.4.0 --- PHPINFO | 12 ++++----- REFLECTION | 6 ++--- php-pecl-datadog-trace.spec | 61 ++++++++++++++++++++++----------------------- 3 files changed, 39 insertions(+), 40 deletions(-) diff --git a/PHPINFO b/PHPINFO index ab5d236..7baef9d 100644 --- a/PHPINFO +++ b/PHPINFO @@ -7,12 +7,12 @@ For help, check out the documentation at https://docs.datadoghq.com/tracing/lang (c) Datadog 2020 Datadog tracing support => disabled -Version => 1.3.0 +Version => 1.4.0+5b5ed2bc3476bca4135a0e6e007afe39b694f0ff DATADOG TRACER CONFIGURATION => { - "date": "2024-08-30T13:35:29Z", - "os_name": "Linux builder.remirepo.net 6.10.6-100.fc39.x86_64 #1 SMP PREEMPT_DYNAMIC Mon Aug 19 14:35:32 UTC 2024 x86_64", - "os_version": "6.10.6-100.fc39.x86_64", - "version": "1.3.0", + "date": "2024-09-06T07:02:37Z", + "os_name": "Linux builder.remirepo.net 6.10.7-100.fc39.x86_64 #1 SMP PREEMPT_DYNAMIC Fri Aug 30 00:07:39 UTC 2024 x86_64", + "os_version": "6.10.7-100.fc39.x86_64", + "version": "1.4.0+5b5ed2bc3476bca4135a0e6e007afe39b694f0ff", "lang": "php", "lang_version": "8.2.23", "env": null, @@ -53,7 +53,7 @@ ddtrace.disable => 0 => 0 ddtrace.cgroup_file => /proc/self/cgroup => /proc/self/cgroup datadog.trace.sidecar_trace_sender => Off => Off datadog.trace.sources_path => /usr/share/pear/datadog_trace/src/ => /usr/share/pear/datadog_trace/src/ -datadog.autoload_no_compile => 0 => 0 +datadog.autoload_no_compile => Off => Off datadog.trace.agent_url => no value => no value datadog.agent_host => no value => no value datadog.dogstatsd_url => no value => no value diff --git a/REFLECTION b/REFLECTION index 4b926c0..6deceaf 100644 --- a/REFLECTION +++ b/REFLECTION @@ -1,4 +1,4 @@ -Extension [ extension #115 ddtrace version 1.3.0 ] { +Extension [ extension #115 ddtrace version 1.4.0+5b5ed2bc3476bca4135a0e6e007afe39b694f0ff ] { - Dependencies { Dependency [ json (Required) ] @@ -19,7 +19,7 @@ Extension [ extension #115 ddtrace version 1.3.0 ] { Current = '/usr/share/pear/datadog_trace/src/' } Entry [ datadog.autoload_no_compile ] - Current = '0' + Current = 'false' } Entry [ datadog.trace.agent_url ] Current = '' @@ -941,7 +941,7 @@ Extension [ extension #115 ddtrace version 1.3.0 ] { Constant [ int DDTrace\DBM_PROPAGATION_FULL ] { 2 } Constant [ int DDTrace\Internal\SPAN_FLAG_OPENTELEMETRY ] { 1 } Constant [ int DDTrace\Internal\SPAN_FLAG_OPENTRACING ] { 2 } - Constant [ string DD_TRACE_VERSION ] { 1.3.0 } + Constant [ string DD_TRACE_VERSION ] { 1.4.0+5b5ed2bc3476bca4135a0e6e007afe39b694f0ff } Constant [ int DD_TRACE_PRIORITY_SAMPLING_AUTO_KEEP ] { 1 } Constant [ int DD_TRACE_PRIORITY_SAMPLING_AUTO_REJECT ] { 0 } Constant [ int DD_TRACE_PRIORITY_SAMPLING_USER_KEEP ] { 2 } diff --git a/php-pecl-datadog-trace.spec b/php-pecl-datadog-trace.spec index 05e74ae..aeb2d5a 100644 --- a/php-pecl-datadog-trace.spec +++ b/php-pecl-datadog-trace.spec @@ -30,17 +30,21 @@ # extension name %global pecl_name ddtrace -%global upstream_version 1.3.0 +%global upstream_version 1.4.0 #global upstream_prever beta1 %global with_zts 0%{!?_without_zts:%{?__ztsphp:1}} %global ini_name 40-%{pecl_name}.ini %global sources %{proj_name}-%{upstream_version}%{?upstream_prever} %global _configure ../%{sources}/configure +# if needed for test build +#undefine _hardened_build +#undefine _lto_cflags + Summary: APM and distributed tracing for PHP Name: %{?scl_prefix}php-pecl-datadog-trace Version: %{upstream_version}%{?upstream_prever:~%{upstream_prever}} -Release: 1%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} +Release: 0%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} # extension is dual-licensed under Apache 2.0 or BSD3. # bundled rust ext are MIT AND Apache-2.0 License: (Apache-2.0 OR BSD-3-Clause) AND MIT AND Apache-2.0 @@ -77,9 +81,6 @@ BuildRequires: libssh2 Requires: %{?scl_prefix}php(zend-abi) = %{php_zend_api} Requires: %{?scl_prefix}php(api) = %{php_core_api} Requires: %{?scl_prefix}php-json%{?_isa} -%if "%{php_version}" > "8.0" -Requires: %{?scl_prefix}php-curl%{?_isa} -%endif Provides: %{?scl_prefix}php-%{pecl_name} = %{version} Provides: %{?scl_prefix}php-%{pecl_name}%{?_isa} = %{version} @@ -114,7 +115,7 @@ sed -e 's:@php_dir@:%{pear_phpdir}:' \ extver=$(cat VERSION) if test "x${extver}" != "x%{upstream_version}%{?upstream_prever}"; then : Error: Upstream extension version is ${extver}, expecting %{upstream_version}%{?upstream_prever}. - exit 1 + #exit 1 fi cd .. @@ -212,49 +213,30 @@ done %check cd %{sources} -export DD_TRACE_CLI_ENABLED=1 -export DD_INSTRUMENTATION_TELEMETRY_ENABLED=0 -# Erratic results -rm tests/ext/segfault_backtrace_*.phpt -rm tests/ext/sandbox/memory_limit_graceful_bailout.phpt -%if "%{php_version}" > "8.0" -rm tests/ext/sandbox/fatal_errors_are_tracked_005.phpt -%endif # XFAIL find tests/ -type f -exec grep -q -- '--XFAIL--' {} \; -delete -print -# https://github.com/DataDog/dd-trace-php/issues/2115 -rm -r tests/ext/telemetry -# https://github.com/DataDog/dd-trace-php/issues/2248 -rm tests/ext/force_flush_traces.phpt -rm tests/ext/sandbox/fatal_errors_ignored_in_tracing_closure.phpt # DEP for ext dependencies, MOD for ext used in tests DEP="" -MOD="-n -d ddtrace.request_init_hook=" +MOD="" OPT="-q --show-diff" %if "%{php_version}" > "8.0" OPT="$OPT %{?_smp_mflags}" -[ -f %{php_extdir}/curl.so ] && DEP="$DEP -d extension=curl.so" -%else -[ -f %{php_extdir}/curl.so ] && MOD="$MOD -d extension=curl.so" %endif +# Extension dependency [ -f %{php_extdir}/json.so ] && DEP="$DEP -d extension=json.so" +# Used by test suite +[ -f %{php_extdir}/curl.so ] && MOD="$MOD -d extension=curl.so" [ -f %{php_extdir}/posix.so ] && MOD="$MOD -d extension=posix.so" +export DD_INSTRUMENTATION_TELEMETRY_ENABLED=0 + : Minimal load test for NTS extension %{__php} --no-php-ini $DEP \ --define extension=%{buildroot}%{php_extdir}/%{pecl_name}.so \ --modules | grep -i '^%{pecl_name}$' -%if %{with tests} -: Upstream test suite for NTS extension -TEST_PHP_EXECUTABLE=%{_bindir}/php \ -TEST_PHP_ARGS="$DEP $MOD -d extension=$PWD/../NTS/modules/%{pecl_name}.so" \ -REPORT_EXIT_STATUS=1 \ -%{_bindir}/php -n run-tests.php $OPT -%endif - %if %{with_zts} : Minimal load test for ZTS extension %{__ztsphp} --no-php-ini $DEP \ @@ -262,6 +244,20 @@ REPORT_EXIT_STATUS=1 \ --modules | grep -i '^%{pecl_name}$' %endif +%if %{with tests} +export DD_TRACE_CLI_ENABLED=1 +export DD_INSTRUMENTATION_TELEMETRY_ENABLED=1 +#export DD_TRACE_LOG_LEVEL=trace +#export DD_TRACE_LOG_FILE=$PWD/logfile.log +#export RUST_BACKTRACE=1 + +: Upstream test suite for NTS extension +TEST_PHP_EXECUTABLE=%{_bindir}/php \ +TEST_PHP_ARGS="-n $DEP $MOD -d extension=$PWD/../NTS/modules/%{pecl_name}.so" \ +REPORT_EXIT_STATUS=1 \ +%{_bindir}/php -n run-tests.php $OPT +%endif + %files %doc %{pecl_docdir}/%{pecl_name} @@ -280,6 +276,9 @@ REPORT_EXIT_STATUS=1 \ %changelog +* Fri Sep 6 2024 Remi Collet - 1.4.0-0 +- test build for upcoming 1.4.0 + * Fri Aug 30 2024 Remi Collet - 1.3.0-1 - update to 1.3.0 - open https://github.com/DataDog/dd-trace-php/issues/2825 offline build -- cgit