Enhance the stability of e2e PHP tests and update the PHP agent version. (#13294)

This commit is contained in:
jmjoy 2025-06-04 21:34:02 +08:00 committed by GitHub
parent 30e2dcdf2d
commit 1eb406771b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
7 changed files with 26 additions and 7 deletions

View File

@ -29,6 +29,7 @@
* [Break Change]Storage: Move `event` from metrics to records.
* Remove string limitation in Jackson deserializer for ElasticSearch client.
* Fix `disable.oal` does not work.
* Enhance the stability of e2e PHP tests and update the PHP agent version.
#### UI

View File

@ -20,12 +20,12 @@ ARG SW_AGENT_PHP_COMMIT
ENV RUSTUP_HOME=/usr/local/rustup \
CARGO_HOME=/usr/local/cargo \
PATH=/usr/local/cargo/bin:$PATH \
RUST_VERSION=1.64.0
RUST_VERSION=1.85.1
WORKDIR /tmp
RUN apt update \
&& apt install -y wget protobuf-compiler libclang-dev git \
&& wget https://static.rust-lang.org/rustup/archive/1.25.1/x86_64-unknown-linux-gnu/rustup-init \
&& wget https://static.rust-lang.org/rustup/archive/1.28.2/x86_64-unknown-linux-gnu/rustup-init \
&& chmod +x rustup-init \
&& ./rustup-init -y --no-modify-path --profile minimal --default-toolchain $RUST_VERSION --default-host x86_64-unknown-linux-gnu \
&& rm rustup-init \

View File

@ -22,6 +22,8 @@ services:
service: oap
ports:
- 12800
networks:
- e2e
banyandb:
extends:
@ -29,6 +31,8 @@ services:
service: banyandb
ports:
- 17912
networks:
- e2e
php:
build:
@ -42,13 +46,20 @@ services:
- 8080
depends_on:
provider:
condition: service_started
condition: service_healthy
oap:
condition: service_healthy
banyandb:
condition: service_healthy
volumes:
- ./index.php:/var/www/html/index.php
- ./php.ini:/usr/local/etc/php/conf.d/ext-skywalking_agent.ini
- ./nginx.conf:/etc/nginx/nginx.conf
healthcheck:
test: ["CMD", "sh", "-c", "nc -z 127.0.0.1 8080"]
interval: 5s
timeout: 60s
retries: 120
provider:
extends:
@ -57,6 +68,8 @@ services:
depends_on:
oap:
condition: service_healthy
networks:
- e2e
networks:
e2e:

View File

@ -38,7 +38,7 @@ trigger:
verify:
# verify with retry strategy
retry:
count: 30
count: 10
interval: 15s
cases:
# layer list
@ -66,7 +66,7 @@ verify:
- query: |
swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql trace $( \
swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql trace ls --service-name=php\
| yq e '.traces | select(.[].endpointnames[0]=="POST:/php/info") | .[9].traceids[0]' -
| yq e '.traces | select(.[].endpointnames[0]=="POST:/php/info") | .[2].traceids[0]' -
)
expected: expected/trace-info-detail.yml
# dependency service

View File

@ -22,5 +22,10 @@ if($uri == '/php/info') {
curl_setopt($ch, CURLOPT_URL, "http://provider:9090/info");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$output = curl_exec($ch);
if (curl_errno($ch)) {
$error_code = curl_errno($ch);
$error_message = curl_error($ch);
throw new Exception("curl failed: $error_code $error_message");
}
curl_close($ch);
}

View File

@ -18,7 +18,7 @@
extension = skywalking_agent.so
skywalking_agent.service_name = php
skywalking_agent.enable = 1
skywalking_agent.log_file = /tmp/skywalking-agent.log
skywalking_agent.log_file = /proc/1/fd/2
skywalking_agent.log_level = DEBUG
skywalking_agent.server_addr = oap:11800

View File

@ -24,7 +24,7 @@ SW_AGENT_CLIENT_JS_TEST_COMMIT=4f1eb1dcdbde3ec4a38534bf01dded4ab5d2f016
SW_KUBERNETES_COMMIT_SHA=6fe5e6f0d3b7686c6be0457733e825ee68cb9b35
SW_ROVER_COMMIT=79292fe07f17f98f486e0c4471213e1961fb2d1d
SW_BANYANDB_COMMIT=c4b4384f3083f44ca6067257f5fa59030427ad6b
SW_AGENT_PHP_COMMIT=3192c553002707d344bd6774cfab5bc61f67a1d3
SW_AGENT_PHP_COMMIT=d1114e7be5d89881eec76e5b56e69ff844691e35
SW_PREDICTOR_COMMIT=54a0197654a3781a6f73ce35146c712af297c994
SW_CTL_COMMIT=7bbac156e74e8fdc0c5bd6f377be9f0b30420176