Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/e2e.so11y.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,6 @@ jobs:
uses: ./.github/actions/skip
- name: Run E2E Test
if: env.SKIP_CI != 'true'
uses: ./.github/actions/e2e-test
uses: ./.github/actions/infra-e2e-test
with:
test_class: org.apache.skywalking.e2e.SO11yE2E
config-file: so11y/e2e.yaml
4 changes: 2 additions & 2 deletions .github/workflows/e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ jobs:
config-file: simple/ssl/e2e.yaml
- name: mTLS
config-file: simple/mtls/e2e.yaml
- name: Lua Nginx
config-file: lua/e2e.yaml
steps:
- uses: actions/checkout@v2
with:
Expand All @@ -67,8 +69,6 @@ jobs:
strategy:
matrix:
case:
- name: Lua Nginx
class: org.apache.skywalking.e2e.LuaE2E
- name: Gateway
class: org.apache.skywalking.e2e.GatewayE2E
- name: Meter
Expand Down
1 change: 1 addition & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ Release Notes.
#### OAP Server
* Add component definition for `Jackson`.
* Fix that zipkin-receiver plugin is not packaged into dist.
* Replace e2e cases to e2e-v2: Lua Nginx/SelfObservability.
* Upgrade Armeria to 1.12, upgrade OpenSearch test version to 1.1.0.

#### UI
Expand Down
29 changes: 29 additions & 0 deletions test/e2e-v2/cases/lua/Dockerfile.nginx
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

FROM openresty/openresty:1.17.8.2-5-alpine-fat

ARG SW_AGENT_NGINX_LUA_COMMIT

WORKDIR /usr/share/skywalking-nginx-lua

ADD https://github.com/apache/skywalking-nginx-lua/archive/${SW_AGENT_NGINX_LUA_COMMIT}.tar.gz .

RUN tar -xf ${SW_AGENT_NGINX_LUA_COMMIT}.tar.gz --strip 1

RUN rm ${SW_AGENT_NGINX_LUA_COMMIT}.tar.gz

RUN luarocks make rockspec/skywalking-nginx-lua-master-0.rockspec

70 changes: 70 additions & 0 deletions test/e2e-v2/cases/lua/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

version: '2.1'

services:
oap:
extends:
file: ../../script/docker-compose/base-compose.yml
service: oap
ports:
- 12800

provider-entry:
extends:
file: ../../script/docker-compose/base-compose.yml
service: provider
environment:
SW_AGENT_NAME: e2e-service-entry-provider
depends_on:
oap:
condition: service_healthy
ports:
- 9090

provider-end:
extends:
file: ../../script/docker-compose/base-compose.yml
service: provider
environment:
SW_AGENT_NAME: e2e-service-end-provider
depends_on:
oap:
condition: service_healthy

nginx:
build:
context: ..
dockerfile: lua/Dockerfile.nginx
args:
- SW_AGENT_NGINX_LUA_COMMIT=${SW_AGENT_NGINX_LUA_COMMIT}
networks:
- e2e
expose:
- 8080
depends_on:
oap:
condition: service_healthy
provider-entry:
condition: service_healthy
provider-end:
condition: service_healthy
volumes:
- ../lua/nginx.conf:/var/nginx/conf.d/nginx.conf
entrypoint: ['bash', '-c', 'sleep 5 && openresty -c /var/nginx/conf.d/nginx.conf']

networks:
e2e:
106 changes: 106 additions & 0 deletions test/e2e-v2/cases/lua/e2e.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# This file is used to show how to write configuration files and can be used to test.

setup:
env: compose
file: docker-compose.yml
timeout: 1200
init-system-environment: ../../script/env
steps:
- name: install yq
command: bash test/e2e-v2/script/prepare/setup-e2e-shell/install.sh yq
- name: install swctl
command: bash test/e2e-v2/script/prepare/setup-e2e-shell/install.sh swctl
- name: install etcdctl
command: bash test/e2e-v2/script/prepare/setup-e2e-shell/install.sh etcdctl

trigger:
action: http
interval: 3s
times: 10
url: http://${provider-entry_host}:${provider-entry_9090}/nginx/entry/info
method: POST

verify:
# verify with retry strategy
retry:
# max retry count
count: 20
# the interval between two retries, in millisecond.
interval: 3s
cases:
# service list
- query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql service ls
expected: expected/service.yml
# service instance list
- query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql instance list --service-name=e2e-service-entry-provider
expected: expected/service-instance.yml
- query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql instance list --service-name=User_Service_Name
expected: expected/service-instance-nginx.yml
# service endpoint
- query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql endpoint list --keyword=info --service-name=User_Service_Name
expected: expected/service-endpoint-nginx.yml
- query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql endpoint list --keyword=info --service-name=e2e-service-entry-provider
expected: expected/service-endpoint-entry.yml
- query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql endpoint list --keyword=info --service-name=e2e-service-end-provider
expected: expected/service-endpoint-end.yml
# trace segment list
- query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql trace ls
expected: expected/traces-list.yml
# dependency service
- query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql dependency service --service-name=User_Service_Name
expected: expected/dependency-services.yml
# dependency instance
- query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql dependency instance --service-name=e2e-service-entry-provider --dest-service-name=User_Service_Name
expected: expected/dependency-instance.yml
# service metrics
- query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql metrics linear --name=service_sla --service-name=User_Service_Name |yq e 'to_entries' -
expected: expected/metrics-has-value.yml
- query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql metrics linear --name=service_cpm --service-name=User_Service_Name |yq e 'to_entries' -
expected: expected/metrics-has-value.yml
- query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql metrics linear --name=service_resp_time --service-name=User_Service_Name |yq e 'to_entries' -
expected: expected/metrics-has-value.yml
- query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql metrics linear --name=service_apdex --service-name=User_Service_Name |yq e 'to_entries' -
expected: expected/metrics-has-value.yml
# service instance metrics
- query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql metrics linear --name=service_instance_resp_time --instance-name=User_Service_Instance_Name --service-name=User_Service_Name |yq e 'to_entries' -
expected: expected/metrics-has-value.yml
- query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql metrics linear --name=service_instance_cpm --instance-name=User_Service_Instance_Name --service-name=User_Service_Name |yq e 'to_entries' -
expected: expected/metrics-has-value.yml
- query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql metrics linear --name=service_instance_sla --instance-name=User_Service_Instance_Name --service-name=User_Service_Name |yq e 'to_entries' -
expected: expected/metrics-has-value.yml
# service endpoint metrics
- query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql metrics linear --name=endpoint_cpm --endpoint-name=/nginx/info --service-name=User_Service_Name |yq e 'to_entries' -
expected: expected/metrics-has-value.yml
- query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql metrics linear --name=endpoint_avg --endpoint-name=/nginx/info --service-name=User_Service_Name |yq e 'to_entries' -
expected: expected/metrics-has-value.yml
- query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql metrics linear --name=endpoint_sla --endpoint-name=/nginx/info --service-name=User_Service_Name |yq e 'to_entries' -
expected: expected/metrics-has-value.yml
# service relation metrics
- query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql metrics linear --name=service_relation_client_cpm --service-name=e2e-service-entry-provider --dest-service-name=User_Service_Name|yq e 'to_entries' -
expected: expected/metrics-has-value.yml
- query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql metrics linear --name=service_relation_server_cpm --service-name=e2e-service-entry-provider --dest-service-name=User_Service_Name|yq e 'to_entries' -
expected: expected/metrics-has-value.yml
- query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql metrics linear --name=service_relation_client_cpm --service-name=User_Service_Name --dest-service-name=e2e-service-end-provider|yq e 'to_entries' -
expected: expected/metrics-has-value.yml
- query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql metrics linear --name=service_relation_server_cpm --service-name=User_Service_Name --dest-service-name=e2e-service-end-provider|yq e 'to_entries' -
expected: expected/metrics-has-value.yml
# service instance relation metrics
- query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql metrics linear --name=service_instance_relation_client_cpm --instance-name=provider1 --service-name=e2e-service-entry-provider --dest-instance-name=User_Service_Instance_Name --dest-service-name=User_Service_Name |yq e 'to_entries' -
expected: expected/metrics-has-value.yml
- query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql metrics linear --name=service_instance_relation_server_cpm --instance-name=provider1 --service-name=e2e-service-entry-provider --dest-instance-name=User_Service_Instance_Name --dest-service-name=User_Service_Name |yq e 'to_entries' -
expected: expected/metrics-has-value.yml
41 changes: 41 additions & 0 deletions test/e2e-v2/cases/lua/expected/dependency-instance.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

nodes:
{{- contains .nodes }}
- id: {{ b64enc "User_Service_Name" }}.1_{{ b64enc "User_Service_Instance_Name" }}
name: User_Service_Instance_Name
serviceid: {{ b64enc "User_Service_Name" }}.1
servicename: User_Service_Name
type: Nginx
isreal: true
- id: {{ b64enc "e2e-service-entry-provider" }}.1_{{ b64enc "provider1" }}
name: provider1
serviceid: {{ b64enc "e2e-service-entry-provider" }}.1
servicename: e2e-service-entry-provider
type: ""
isreal: true
{{- end }}
calls:
{{- contains .calls }}
- source: {{ b64enc "e2e-service-entry-provider" }}.1_{{ b64enc "provider1" }}
sourcecomponents: []
target: {{ b64enc "User_Service_Name" }}.1_{{ b64enc "User_Service_Instance_Name" }}
targetcomponents: []
id: {{ b64enc "e2e-service-entry-provider" }}.1_{{ b64enc "provider1" }}-{{ b64enc "User_Service_Name" }}.1_{{ b64enc "User_Service_Instance_Name" }}
detectpoints:
- CLIENT
- SERVER
{{- end }}
49 changes: 49 additions & 0 deletions test/e2e-v2/cases/lua/expected/dependency-services.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

nodes:
{{- contains .nodes }}
- id: {{ b64enc "e2e-service-entry-provider" }}.1
name: e2e-service-entry-provider
type: Tomcat
isreal: true
- id: {{ b64enc "e2e-service-end-provider"}}.1
name: e2e-service-end-provider
type: Tomcat
isreal: true
- id: {{ b64enc "User_Service_Name"}}.1
name: User_Service_Name
type: Nginx
isreal: true
{{- end }}
calls:
{{- contains .calls }}
- source: {{ b64enc "e2e-service-entry-provider"}}.1
sourcecomponents: []
target: {{ b64enc "User_Service_Name"}}.1
targetcomponents: []
id: {{ b64enc "e2e-service-entry-provider"}}.1-{{ b64enc "User_Service_Name"}}.1
detectpoints:
- CLIENT
- SERVER
- source: {{ b64enc "User_Service_Name" }}.1
sourcecomponents: []
target: {{ b64enc "e2e-service-end-provider"}}.1
targetcomponents: []
id: {{ b64enc "User_Service_Name" }}.1-{{ b64enc "e2e-service-end-provider"}}.1
detectpoints:
- CLIENT
- SERVER
{{- end }}
19 changes: 19 additions & 0 deletions test/e2e-v2/cases/lua/expected/metrics-has-value.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

{{- contains . }}
- key: {{ notEmpty .key }}
value: {{ ge .value 1 }}
{{- end }}
19 changes: 19 additions & 0 deletions test/e2e-v2/cases/lua/expected/service-endpoint-end.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

{{- contains .}}
- id: {{ b64enc "e2e-service-end-provider" }}.1_{{ b64enc "POST:/nginx/end/info" }}
name: POST:/nginx/end/info
{{- end}}
19 changes: 19 additions & 0 deletions test/e2e-v2/cases/lua/expected/service-endpoint-entry.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

{{- contains .}}
- id: {{ b64enc "e2e-service-entry-provider" }}.1_{{ b64enc "POST:/nginx/entry/info" }}
name: POST:/nginx/entry/info
{{- end}}
Loading