This is an automated email from the ASF dual-hosted git repository.
wusheng pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/skywalking-rover.git
The following commit(s) were added to refs/heads/main by this push:
new b421259 Restore the Profiling E2E (#14)
b421259 is described below
commit b421259424aeb05b67c671d6b4e782fbf9658a08
Author: mrproliu <[email protected]>
AuthorDate: Thu Apr 14 13:26:09 2022 +0800
Restore the Profiling E2E (#14)
---
.github/workflows/rover.yaml | 9 ++++-----
test/e2e/base/base-compose.yml | 1 +
test/e2e/base/env | 2 +-
test/e2e/cases/profiling/c++/e2e.yaml | 11 +++++------
test/e2e/cases/profiling/c/e2e.yaml | 11 +++++------
.../profiling/expected/process-estimate-scale.yml} | 2 +-
test/e2e/cases/profiling/expected/process.yml | 5 +++++
.../expected/profiling-create-prepare.yml} | 7 ++++++-
.../profiling/expected/profiling-schedule-list.yml | 5 +++++
.../profiling/expected/profiling-task-list.yml | 10 +++++-----
test/e2e/cases/profiling/golang/e2e.yaml | 11 +++++------
test/e2e/cases/profiling/profiling-cases.yaml | 21 +++++++++------------
12 files changed, 52 insertions(+), 43 deletions(-)
diff --git a/.github/workflows/rover.yaml b/.github/workflows/rover.yaml
index f3c44bc..4b68061 100644
--- a/.github/workflows/rover.yaml
+++ b/.github/workflows/rover.yaml
@@ -66,7 +66,6 @@ jobs:
e2e-test:
name: E2E test
- if: ${{ false }} # disable for temporary, it would activate after OAP
side finished
needs: [ docker ]
runs-on: ubuntu-latest
timeout-minutes: 60
@@ -111,7 +110,7 @@ jobs:
name: Required
needs:
- build
-# - e2e-test
+ - e2e-test
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
@@ -120,6 +119,6 @@ jobs:
if [[ ${{ needs.build.result }} != 'success' ]]; then
exit -1
fi
-# if [[ ${{ needs.e2e-test.result }} != 'success' ]]; then
-# exit -1
-# fi
\ No newline at end of file
+ if [[ ${{ needs.e2e-test.result }} != 'success' ]]; then
+ exit -1
+ fi
\ No newline at end of file
diff --git a/test/e2e/base/base-compose.yml b/test/e2e/base/base-compose.yml
index 168ca1f..fa83014 100644
--- a/test/e2e/base/base-compose.yml
+++ b/test/e2e/base/base-compose.yml
@@ -46,6 +46,7 @@ services:
ROVER_PROCESS_DISCOVERY_VM_FINDER_SERVICE_NAME: sqrt
ROVER_PROCESS_DISCOVERY_VM_FINDER_INSTANCE_NAME: test-instance
ROVER_PROCESS_DISCOVERY_VM_FINDER_PROCESS_NAME: "{{.Process.ExeName}}"
+ ROVER_PROCESS_DISCOVERY_VM_FINDER_PROCESS_LABELS: e2e-label1,e2e-label2
ROVER_PROFILING_ACTIVE: "true"
ROVER_PROFILING_CHECK_INTERVAL: 2s
ROVER_PROFILING_FLUSH_INTERVAL: 5s
diff --git a/test/e2e/base/env b/test/e2e/base/env
index 0dfe380..b2d2380 100644
--- a/test/e2e/base/env
+++ b/test/e2e/base/env
@@ -13,4 +13,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-SW_CTL_COMMIT=60cee4a926a867a7bd934b7f94c9a8517e141608
+SW_CTL_COMMIT=5a62c2e029e17234e6bbad18ced0ce31d0f67ce9
diff --git a/test/e2e/cases/profiling/c++/e2e.yaml
b/test/e2e/cases/profiling/c++/e2e.yaml
index 61c77e0..0d79f55 100644
--- a/test/e2e/cases/profiling/c++/e2e.yaml
+++ b/test/e2e/cases/profiling/c++/e2e.yaml
@@ -37,10 +37,9 @@ verify:
- includes:
- ../profiling-cases.yaml
- query: |
- taskid=$(swctl --display yaml profiling ebpf list --process-id=$( \
- swctl --display yaml process ls --service-name sqrt| yq e '.[0].id'
- \
- ) |yq e '.[0].taskid' -);
- start=$(swctl --display yaml profiling ebpf schedules
--task-id=$taskid | yq e '.[0].starttime' -)
- end=$(swctl --display yaml profiling ebpf schedules --task-id=$taskid
| yq e '.[0].endtime' -)
- swctl --display yaml profiling ebpf analysis --task-id=$taskid
--time-ranges=$start-$end
+ taskid=$(swctl --base-url=http://${oap_host}:${oap_12800}/graphql
--display yaml profiling ebpf list --service-name sqrt |yq e '.[0].taskid' -)
+ scheduleid=$(swctl --base-url=http://${oap_host}:${oap_12800}/graphql
--display yaml profiling ebpf schedules --task-id=$taskid |yq e
'.[0].scheduleid' -);
+ start=$(swctl --base-url=http://${oap_host}:${oap_12800}/graphql
--display yaml profiling ebpf schedules --task-id=$taskid | yq e
'.[0].starttime' -)
+ end=$(swctl --base-url=http://${oap_host}:${oap_12800}/graphql
--display yaml profiling ebpf schedules --task-id=$taskid | yq e '.[0].endtime'
-)
+ swctl --base-url=http://${oap_host}:${oap_12800}/graphql --display
yaml profiling ebpf analysis --schedule-id=$scheduleid --time-ranges=$start-$end
expected: profiling-analysis.yml
\ No newline at end of file
diff --git a/test/e2e/cases/profiling/c/e2e.yaml
b/test/e2e/cases/profiling/c/e2e.yaml
index 61c77e0..0d79f55 100644
--- a/test/e2e/cases/profiling/c/e2e.yaml
+++ b/test/e2e/cases/profiling/c/e2e.yaml
@@ -37,10 +37,9 @@ verify:
- includes:
- ../profiling-cases.yaml
- query: |
- taskid=$(swctl --display yaml profiling ebpf list --process-id=$( \
- swctl --display yaml process ls --service-name sqrt| yq e '.[0].id'
- \
- ) |yq e '.[0].taskid' -);
- start=$(swctl --display yaml profiling ebpf schedules
--task-id=$taskid | yq e '.[0].starttime' -)
- end=$(swctl --display yaml profiling ebpf schedules --task-id=$taskid
| yq e '.[0].endtime' -)
- swctl --display yaml profiling ebpf analysis --task-id=$taskid
--time-ranges=$start-$end
+ taskid=$(swctl --base-url=http://${oap_host}:${oap_12800}/graphql
--display yaml profiling ebpf list --service-name sqrt |yq e '.[0].taskid' -)
+ scheduleid=$(swctl --base-url=http://${oap_host}:${oap_12800}/graphql
--display yaml profiling ebpf schedules --task-id=$taskid |yq e
'.[0].scheduleid' -);
+ start=$(swctl --base-url=http://${oap_host}:${oap_12800}/graphql
--display yaml profiling ebpf schedules --task-id=$taskid | yq e
'.[0].starttime' -)
+ end=$(swctl --base-url=http://${oap_host}:${oap_12800}/graphql
--display yaml profiling ebpf schedules --task-id=$taskid | yq e '.[0].endtime'
-)
+ swctl --base-url=http://${oap_host}:${oap_12800}/graphql --display
yaml profiling ebpf analysis --schedule-id=$scheduleid --time-ranges=$start-$end
expected: profiling-analysis.yml
\ No newline at end of file
diff --git a/test/e2e/base/env
b/test/e2e/cases/profiling/expected/process-estimate-scale.yml
similarity index 93%
copy from test/e2e/base/env
copy to test/e2e/cases/profiling/expected/process-estimate-scale.yml
index 0dfe380..a4bfca0 100644
--- a/test/e2e/base/env
+++ b/test/e2e/cases/profiling/expected/process-estimate-scale.yml
@@ -13,4 +13,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-SW_CTL_COMMIT=60cee4a926a867a7bd934b7f94c9a8517e141608
+1
\ No newline at end of file
diff --git a/test/e2e/cases/profiling/expected/process.yml
b/test/e2e/cases/profiling/expected/process.yml
index 17f1911..31fac87 100644
--- a/test/e2e/cases/profiling/expected/process.yml
+++ b/test/e2e/cases/profiling/expected/process.yml
@@ -32,4 +32,9 @@
- name: command_line
value: /sqrt
{{- end }}
+ labels:
+ {{- contains .labels }}
+ - e2e-label1
+ - e2e-label2
+ {{- end }}
{{- end }}
\ No newline at end of file
diff --git a/test/e2e/base/env
b/test/e2e/cases/profiling/expected/profiling-create-prepare.yml
similarity index 87%
copy from test/e2e/base/env
copy to test/e2e/cases/profiling/expected/profiling-create-prepare.yml
index 0dfe380..b1226a3 100644
--- a/test/e2e/base/env
+++ b/test/e2e/cases/profiling/expected/profiling-create-prepare.yml
@@ -13,4 +13,9 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-SW_CTL_COMMIT=60cee4a926a867a7bd934b7f94c9a8517e141608
+couldprofiling: true
+processlabels:
+ {{- contains .processlabels }}
+ - e2e-label1
+ - e2e-label2
+ {{- end }}
\ No newline at end of file
diff --git a/test/e2e/cases/profiling/expected/profiling-schedule-list.yml
b/test/e2e/cases/profiling/expected/profiling-schedule-list.yml
index d1f788c..e19b699 100644
--- a/test/e2e/cases/profiling/expected/profiling-schedule-list.yml
+++ b/test/e2e/cases/profiling/expected/profiling-schedule-list.yml
@@ -35,6 +35,11 @@
- name: command_line
value: /sqrt
{{- end }}
+ labels:
+ {{- contains .process.labels }}
+ - e2e-label1
+ - e2e-label2
+ {{- end }}
starttime: {{ gt .starttime 0 }}
endtime: {{ gt .endtime 0 }}
{{- end }}
\ No newline at end of file
diff --git a/test/e2e/cases/profiling/expected/profiling-task-list.yml
b/test/e2e/cases/profiling/expected/profiling-task-list.yml
index 05abb5e..f561c46 100644
--- a/test/e2e/cases/profiling/expected/profiling-task-list.yml
+++ b/test/e2e/cases/profiling/expected/profiling-task-list.yml
@@ -15,13 +15,13 @@
{{- contains . }}
- taskid: {{ notEmpty .taskid }}
- processfindertype: PROCESS_ID
serviceid: {{ b64enc "sqrt" }}.1
servicename: sqrt
- instanceid: {{ b64enc "sqrt" }}.1_{{ b64enc "test-instance" }}
- instancename: test-instance
- processid: {{ notEmpty .processid }}
- processname: sqrt
+ processlabels:
+ {{- contains .processlabels }}
+ - e2e-label1
+ - e2e-label2
+ {{- end }}
taskstarttime: {{ gt .taskstarttime 0 }}
triggertype: FIXED_TIME
fixedtriggerduration: 60
diff --git a/test/e2e/cases/profiling/golang/e2e.yaml
b/test/e2e/cases/profiling/golang/e2e.yaml
index 61c77e0..0d79f55 100644
--- a/test/e2e/cases/profiling/golang/e2e.yaml
+++ b/test/e2e/cases/profiling/golang/e2e.yaml
@@ -37,10 +37,9 @@ verify:
- includes:
- ../profiling-cases.yaml
- query: |
- taskid=$(swctl --display yaml profiling ebpf list --process-id=$( \
- swctl --display yaml process ls --service-name sqrt| yq e '.[0].id'
- \
- ) |yq e '.[0].taskid' -);
- start=$(swctl --display yaml profiling ebpf schedules
--task-id=$taskid | yq e '.[0].starttime' -)
- end=$(swctl --display yaml profiling ebpf schedules --task-id=$taskid
| yq e '.[0].endtime' -)
- swctl --display yaml profiling ebpf analysis --task-id=$taskid
--time-ranges=$start-$end
+ taskid=$(swctl --base-url=http://${oap_host}:${oap_12800}/graphql
--display yaml profiling ebpf list --service-name sqrt |yq e '.[0].taskid' -)
+ scheduleid=$(swctl --base-url=http://${oap_host}:${oap_12800}/graphql
--display yaml profiling ebpf schedules --task-id=$taskid |yq e
'.[0].scheduleid' -);
+ start=$(swctl --base-url=http://${oap_host}:${oap_12800}/graphql
--display yaml profiling ebpf schedules --task-id=$taskid | yq e
'.[0].starttime' -)
+ end=$(swctl --base-url=http://${oap_host}:${oap_12800}/graphql
--display yaml profiling ebpf schedules --task-id=$taskid | yq e '.[0].endtime'
-)
+ swctl --base-url=http://${oap_host}:${oap_12800}/graphql --display
yaml profiling ebpf analysis --schedule-id=$scheduleid --time-ranges=$start-$end
expected: profiling-analysis.yml
\ No newline at end of file
diff --git a/test/e2e/cases/profiling/profiling-cases.yaml
b/test/e2e/cases/profiling/profiling-cases.yaml
index 9b0bf33..eb6956f 100644
--- a/test/e2e/cases/profiling/profiling-cases.yaml
+++ b/test/e2e/cases/profiling/profiling-cases.yaml
@@ -20,22 +20,19 @@ cases:
expected: expected/service.yml
- query: swctl --display yaml instance ls --service-name sqrt
expected: expected/instance.yml
- - query: swctl --display yaml process ls --service-name sqrt
+ - query: swctl --display yaml process ls --service-name sqrt --instance-name
test-instance
expected: expected/process.yml
+ - query: swctl --base-url=http://${oap_host}:${oap_12800}/graphql --display
yaml profiling ebpf create prepare --service-name sqrt
+ expected: expected/profiling-create-prepare.yml
+ - query: swctl --base-url=http://${oap_host}:${oap_12800}/graphql --display
yaml process estimate scale --service-name sqrt --labels e2e-label1,e2e-label2
+ expected: expected/process-estimate-scale.yml
- query: |
- swctl --display yaml profiling ebpf create fixed --process-id=$( \
- swctl --display yaml process ls --service-name sqrt| yq e '.[0].id' - \
- ) --duration=1m
+ swctl --base-url=http://${oap_host}:${oap_12800}/graphql --display yaml
profiling ebpf create fixed --service-name sqrt --labels e2e-label1,e2e-label2
--duration 1m
expected: expected/profiling-create.yml
- - query: |
- swctl --display yaml profiling ebpf list --process-id=$( \
- swctl --display yaml process ls --service-name sqrt| yq e '.[0].id' - \
- )
+ - query: swctl --base-url=http://${oap_host}:${oap_12800}/graphql --display
yaml profiling ebpf list --service-name sqrt
expected: expected/profiling-task-list.yml
- query: |
- swctl --display yaml profiling ebpf schedules --task-id=$( \
- swctl --display yaml profiling ebpf list --process-id=$( \
- swctl --display yaml process ls --service-name sqrt| yq e '.[0].id'
- \
- ) |yq e '.[0].taskid' - \
+ swctl --base-url=http://${oap_host}:${oap_12800}/graphql --display yaml
profiling ebpf schedules --task-id=$( \
+ swctl --base-url=http://${oap_host}:${oap_12800}/graphql --display
yaml profiling ebpf list --service-name sqrt |yq e '.[0].taskid' -
)
expected: expected/profiling-schedule-list.yml
\ No newline at end of file