Skip to content

Commit

Permalink
Fix CI
Browse files Browse the repository at this point in the history
  • Loading branch information
mrproliu committed Jun 4, 2024
1 parent 88f332a commit 537ef54
Show file tree
Hide file tree
Showing 13 changed files with 119 additions and 87 deletions.
1 change: 1 addition & 0 deletions pkg/accesslog/collector/connect.go
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ func (c *ConnectCollector) buildSocketFromConnectEvent(event *events.SocketConne
connectLogger.Debugf("found the connection from the socket, connection ID: %d, randomID: %d",
event.ConID, event.RandomID)
pair.Role = enums.ConnectionRole(event.Role)
c.fixSocketFamilyIfNeed(event, pair)
c.tryToUpdateSocketFromConntrack(event, pair)
return pair
}
Expand Down
3 changes: 2 additions & 1 deletion pkg/tools/ip/conntrack.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,14 @@
package ip

import (
"golang.org/x/sys/unix"
"net"
"syscall"

"github.com/apache/skywalking-rover/pkg/logger"

"github.com/florianl/go-conntrack"

"golang.org/x/sys/unix"
)

var log = logger.GetLogger("tools", "ip")
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/base/env
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

SW_CTL_COMMIT=6b2eb0011e38b630db6af7203db215806bd141ed
SW_CTL_COMMIT=ee371a210afe2dc6e65c2229b6a0519f8a4a2752
SW_OAP_COMMIT=7a8bbacd20381bc780c48abf5706fd6e529c9872
SW_KUBERNETES_COMMIT_SHA=a14f386063fffc61ed9b396e1328b76d33239aba

Expand Down
4 changes: 4 additions & 0 deletions test/e2e/cases/access_log/expected/dependency-services.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,18 +19,22 @@ nodes:
name: productpage.default
type: null
isreal: true
layers: []
- id: {{ b64enc "details.default"}}.1
name: details.default
type: http
isreal: true
layers: []
- id: {{ b64enc "ratings.default" }}.1
name: ratings.default
type: http
isreal: true
layers: []
- id: {{ b64enc "reviews.default" }}.1
name: reviews.default
type: http
isreal: true
layers: []
{{- end }}
calls:
{{- contains .calls }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,8 @@ verify:

# check profiling metrics
- query: |
swctl --base-url=http://${service_skywalking_ui_host}:${service_skywalking_ui_80}/graphql --display yaml metrics multiple-linear \
--service-name test-continuous --instance-name test-instance --process-name response_timeout --name continuous_profiling_http_avg_response_time |yq e 'to_entries | with(.[] ; .value=(.value | to_entries))' -
swctl --base-url=http://${service_skywalking_ui_host}:${service_skywalking_ui_80}/graphql --display yaml metrics exec --expression=continuous_profiling_http_avg_response_time \
--service-name test-continuous --instance-name test-instance --process-name response_timeout
expected: expected/metrics-has-value-labeld.yml
# check triggered profiling task
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,23 @@
# See the License for the specific language governing permissions and
# limitations under the License.

{{- contains . }}
- key: {{ notEmpty .key }}
value:
{{- contains .value }}
- key: {{ notEmpty .key }}
value:
value: {{ ge .value.value 1 }}
isemptyvalue: false
{{- end }}
{{- end }}
type: TIME_SERIES_VALUES
results:
{{- contains .results }}
- metric:
labels:
{{- contains .metric.labels }}
- key: {{ .key }}
value: {{ .value }}
{{- end}}
values:
{{- contains .values }}
- id: {{ notEmpty .id }}
value: {{ .value }}
traceid: null
- id: {{ notEmpty .id }}
value: null
traceid: null
{{- end}}
{{- end}}
error: null
4 changes: 2 additions & 2 deletions test/e2e/cases/profiling/continuous/http_error_rate/e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,8 @@ verify:

# check profiling metrics
- query: |
swctl --base-url=http://${service_skywalking_ui_host}:${service_skywalking_ui_80}/graphql --display yaml metrics multiple-linear \
--service-name test-continuous --instance-name test-instance --process-name response_error --name continuous_profiling_http_error_rate |yq e 'to_entries | with(.[] ; .value=(.value | to_entries))' -
swctl --base-url=http://${service_skywalking_ui_host}:${service_skywalking_ui_80}/graphql --display yaml metrics exec --expression=continuous_profiling_http_error_rate \
--service-name test-continuous --instance-name test-instance --process-name response_error
expected: expected/metrics-has-value-labeld.yml
# check triggered profiling task
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,23 @@
# See the License for the specific language governing permissions and
# limitations under the License.

{{- contains . }}
- key: {{ notEmpty .key }}
value:
{{- contains .value }}
- key: {{ notEmpty .key }}
value:
value: {{ ge .value.value 1 }}
isemptyvalue: false
{{- end }}
{{- end }}
type: TIME_SERIES_VALUES
results:
{{- contains .results }}
- metric:
labels:
{{- contains .metric.labels }}
- key: {{ .key }}
value: {{ .value }}
{{- end}}
values:
{{- contains .values }}
- id: {{ notEmpty .id }}
value: {{ .value }}
traceid: null
- id: {{ notEmpty .id }}
value: null
traceid: null
{{- end}}
{{- end}}
error: null
25 changes: 10 additions & 15 deletions test/e2e/cases/profiling/task/network/base-cases.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,32 +63,27 @@ cases:
# histogram value of process relation, client side write_rtt/write_exe/read time
- query: |
swctl --display yaml --base-url=http://${service_skywalking_ui_host}:${service_skywalking_ui_80}/graphql metrics multiple-linear \
swctl --display yaml --base-url=http://${service_skywalking_ui_host}:${service_skywalking_ui_80}/graphql metrics exec --expression=process_relation_client_write_rtt_time_percentile \
--service-name service --instance-name test --process-name service \
--dest-service-name service --dest-instance-name test --dest-process-name UNKNOWN_REMOTE \
--name=process_relation_client_write_rtt_time_percentile|yq e 'to_entries | with(.[] ; .value=(.value | to_entries))' -
--dest-service-name service --dest-instance-name test --dest-process-name UNKNOWN_REMOTE
expected: expected/metrics-has-value-label.yml
- query: |
swctl --display yaml --base-url=http://${service_skywalking_ui_host}:${service_skywalking_ui_80}/graphql metrics multiple-linear \
swctl --display yaml --base-url=http://${service_skywalking_ui_host}:${service_skywalking_ui_80}/graphql metrics exec --expression=process_relation_client_write_exe_time_percentile \
--service-name service --instance-name test --process-name service \
--dest-service-name service --dest-instance-name test --dest-process-name UNKNOWN_REMOTE \
--name=process_relation_client_write_exe_time_percentile|yq e 'to_entries | with(.[] ; .value=(.value | to_entries))' -
--dest-service-name service --dest-instance-name test --dest-process-name UNKNOWN_REMOTE
expected: expected/metrics-has-value-label.yml
- query: |
swctl --display yaml --base-url=http://${service_skywalking_ui_host}:${service_skywalking_ui_80}/graphql metrics multiple-linear \
swctl --display yaml --base-url=http://${service_skywalking_ui_host}:${service_skywalking_ui_80}/graphql metrics exec --expression=process_relation_server_write_rtt_time_percentile \
--service-name service --instance-name test --process-name UNKNOWN_REMOTE \
--dest-service-name service --dest-instance-name test --dest-process-name service \
--name=process_relation_server_write_rtt_time_percentile|yq e 'to_entries | with(.[] ; .value=(.value | to_entries))' -
--dest-service-name service --dest-instance-name test --dest-process-name service
expected: expected/metrics-has-value-label.yml
- query: |
swctl --display yaml --base-url=http://${service_skywalking_ui_host}:${service_skywalking_ui_80}/graphql metrics multiple-linear \
swctl --display yaml --base-url=http://${service_skywalking_ui_host}:${service_skywalking_ui_80}/graphql metrics exec --expression=process_relation_server_write_exe_time_percentile \
--service-name service --instance-name test --process-name UNKNOWN_REMOTE \
--dest-service-name service --dest-instance-name test --dest-process-name service \
--name=process_relation_server_write_exe_time_percentile|yq e 'to_entries | with(.[] ; .value=(.value | to_entries))' -
--dest-service-name service --dest-instance-name test --dest-process-name service
expected: expected/metrics-has-value-label.yml
- query: |
swctl --display yaml --base-url=http://${service_skywalking_ui_host}:${service_skywalking_ui_80}/graphql metrics multiple-linear \
swctl --display yaml --base-url=http://${service_skywalking_ui_host}:${service_skywalking_ui_80}/graphql metrics exec --expression=process_relation_server_write_exe_time_percentile \
--service-name service --instance-name test --process-name UNKNOWN_REMOTE \
--dest-service-name service --dest-instance-name test --dest-process-name service \
--name=process_relation_server_write_exe_time_percentile|yq e 'to_entries | with(.[] ; .value=(.value | to_entries))' -
--dest-service-name service --dest-instance-name test --dest-process-name service
expected: expected/metrics-has-value-label.yml
33 changes: 13 additions & 20 deletions test/e2e/cases/profiling/task/network/envoy/e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -144,40 +144,34 @@ verify:
# histogram value of process relation, client side write_rtt/write_exe/read time
- query: |
swctl --display yaml --base-url=http://${service_skywalking_ui_host}:${service_skywalking_ui_80}/graphql metrics multiple-linear \
swctl --display yaml --base-url=http://${service_skywalking_ui_host}:${service_skywalking_ui_80}/graphql metrics exec --expression=process_relation_client_write_rtt_time_percentile \
--service-name productpage.default --instance-name productpage --process-name envoy \
--dest-service-name productpage.default --dest-instance-name productpage --dest-process-name /usr/local/bin/python \
--name=process_relation_client_write_rtt_time_percentile|yq e 'to_entries | with(.[] ; .value=(.value | to_entries))' -
expected: expected/metrics-has-value-label.yml
- query: |
swctl --display yaml --base-url=http://${service_skywalking_ui_host}:${service_skywalking_ui_80}/graphql metrics multiple-linear \
swctl --display yaml --base-url=http://${service_skywalking_ui_host}:${service_skywalking_ui_80}/graphql metrics exec --expression=process_relation_client_write_exe_time_percentile \
--service-name productpage.default --instance-name productpage --process-name envoy \
--dest-service-name productpage.default --dest-instance-name productpage --dest-process-name /usr/local/bin/python \
--name=process_relation_client_write_exe_time_percentile|yq e 'to_entries | with(.[] ; .value=(.value | to_entries))' -
--dest-service-name productpage.default --dest-instance-name productpage --dest-process-name /usr/local/bin/python
expected: expected/metrics-has-value-label.yml
- query: |
swctl --display yaml --base-url=http://${service_skywalking_ui_host}:${service_skywalking_ui_80}/graphql metrics multiple-linear \
swctl --display yaml --base-url=http://${service_skywalking_ui_host}:${service_skywalking_ui_80}/graphql metrics exec --expression=process_relation_client_read_exe_time_percentile \
--service-name productpage.default --instance-name productpage --process-name envoy \
--dest-service-name productpage.default --dest-instance-name productpage --dest-process-name /usr/local/bin/python \
--name=process_relation_client_read_exe_time_percentile|yq e 'to_entries | with(.[] ; .value=(.value | to_entries))' -
--dest-service-name productpage.default --dest-instance-name productpage --dest-process-name /usr/local/bin/python
expected: expected/metrics-has-value-label.yml
- query: |
swctl --display yaml --base-url=http://${service_skywalking_ui_host}:${service_skywalking_ui_80}/graphql metrics multiple-linear \
swctl --display yaml --base-url=http://${service_skywalking_ui_host}:${service_skywalking_ui_80}/graphql metrics exec --expression=process_relation_server_write_rtt_time_percentile \
--service-name productpage.default --instance-name productpage --process-name envoy \
--dest-service-name productpage.default --dest-instance-name productpage --dest-process-name /usr/local/bin/python \
--name=process_relation_server_write_rtt_time_percentile|yq e 'to_entries | with(.[] ; .value=(.value | to_entries))' -
--dest-service-name productpage.default --dest-instance-name productpage --dest-process-name /usr/local/bin/python
expected: expected/metrics-has-value-label.yml
- query: |
swctl --display yaml --base-url=http://${service_skywalking_ui_host}:${service_skywalking_ui_80}/graphql metrics multiple-linear \
swctl --display yaml --base-url=http://${service_skywalking_ui_host}:${service_skywalking_ui_80}/graphql metrics exec --expression=process_relation_server_write_exe_time_percentile \
--service-name productpage.default --instance-name productpage --process-name envoy \
--dest-service-name productpage.default --dest-instance-name productpage --dest-process-name /usr/local/bin/python \
--name=process_relation_server_write_exe_time_percentile|yq e 'to_entries | with(.[] ; .value=(.value | to_entries))' -
--dest-service-name productpage.default --dest-instance-name productpage --dest-process-name /usr/local/bin/python
expected: expected/metrics-has-value-label.yml
- query: |
swctl --display yaml --base-url=http://${service_skywalking_ui_host}:${service_skywalking_ui_80}/graphql metrics multiple-linear \
swctl --display yaml --base-url=http://${service_skywalking_ui_host}:${service_skywalking_ui_80}/graphql metrics exec --expression=process_relation_server_write_exe_time_percentile \
--service-name productpage.default --instance-name productpage --process-name envoy \
--dest-service-name productpage.default --dest-instance-name productpage --dest-process-name /usr/local/bin/python \
--name=process_relation_server_write_exe_time_percentile|yq e 'to_entries | with(.[] ; .value=(.value | to_entries))' -
--dest-service-name productpage.default --dest-instance-name productpage --dest-process-name /usr/local/bin/python
expected: expected/metrics-has-value-label.yml
# HTTP1 analyzer
Expand All @@ -200,10 +194,9 @@ verify:
--name process_relation_http1_response_package_size|yq e 'to_entries' -
expected: expected/metrics-has-value.yml
- query: |
swctl --display yaml --base-url=http://${service_skywalking_ui_host}:${service_skywalking_ui_80}/graphql metrics multiple-linear \
swctl --display yaml --base-url=http://${service_skywalking_ui_host}:${service_skywalking_ui_80}/graphql metrics exec --expression=process_relation_http1_request_package_size_percentile \
--service-name productpage.default --instance-name productpage --process-name envoy \
--dest-service-name productpage.default --dest-instance-name productpage --dest-process-name /usr/local/bin/python \
--name process_relation_http1_request_package_size_percentile|yq e 'to_entries | with(.[] ; .value=(.value | to_entries))' -
--dest-service-name productpage.default --dest-instance-name productpage --dest-process-name /usr/local/bin/python
expected: expected/metrics-has-value-label.yml
- query: |
swctl --display yaml --base-url=http://${service_skywalking_ui_host}:${service_skywalking_ui_80}/graphql metrics linear \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,23 @@
# See the License for the specific language governing permissions and
# limitations under the License.

{{- contains . }}
- key: {{ notEmpty .key }}
value:
{{- contains .value }}
- key: {{ notEmpty .key }}
value:
value: {{ ge .value.value 1 }}
isemptyvalue: false
{{- end }}
{{- end }}
type: TIME_SERIES_VALUES
results:
{{- contains .results }}
- metric:
labels:
{{- contains .metric.labels }}
- key: {{ .key }}
value: {{ .value }}
{{- end}}
values:
{{- contains .values }}
- id: {{ notEmpty .id }}
value: {{ .value }}
traceid: null
- id: {{ notEmpty .id }}
value: null
traceid: null
{{- end}}
{{- end}}
error: null
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,23 @@
# See the License for the specific language governing permissions and
# limitations under the License.

{{- contains . }}
- key: {{ notEmpty .key }}
value:
{{- contains .value }}
- key: {{ notEmpty .key }}
value:
value: {{ ge .value.value 1 }}
isemptyvalue: false
{{- end }}
{{- end }}
type: TIME_SERIES_VALUES
results:
{{- contains .results }}
- metric:
labels:
{{- contains .metric.labels }}
- key: {{ .key }}
value: {{ .value }}
{{- end}}
values:
{{- contains .values }}
- id: {{ notEmpty .id }}
value: {{ .value }}
traceid: null
- id: {{ notEmpty .id }}
value: null
traceid: null
{{- end}}
{{- end}}
error: null
10 changes: 4 additions & 6 deletions test/e2e/cases/profiling/task/network/http1-metrics-cases.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,16 +34,14 @@ cases:
--name process_relation_http1_response_package_size|yq e 'to_entries' -
expected: expected/metrics-has-value.yml
- query: |
swctl --display yaml --base-url=http://${service_skywalking_ui_host}:${service_skywalking_ui_80}/graphql metrics multiple-linear \
swctl --display yaml --base-url=http://${service_skywalking_ui_host}:${service_skywalking_ui_80}/graphql metrics exec --expression=process_relation_http1_request_package_size_percentile \
--service-name service --instance-name test --process-name service \
--dest-service-name service --dest-instance-name test --dest-process-name UNKNOWN_REMOTE \
--name process_relation_http1_request_package_size_percentile|yq e 'to_entries | with(.[] ; .value=(.value | to_entries))' -
--dest-service-name service --dest-instance-name test --dest-process-name UNKNOWN_REMOTE
expected: expected/metrics-has-value-label.yml
- query: |
swctl --display yaml --base-url=http://${service_skywalking_ui_host}:${service_skywalking_ui_80}/graphql metrics multiple-linear \
swctl --display yaml --base-url=http://${service_skywalking_ui_host}:${service_skywalking_ui_80}/graphql metrics exec --expression=process_relation_http1_response_package_size_percentile \
--service-name service --instance-name test --process-name service \
--dest-service-name service --dest-instance-name test --dest-process-name UNKNOWN_REMOTE \
--name process_relation_http1_response_package_size_percentile|yq e 'to_entries | with(.[] ; .value=(.value | to_entries))' -
--dest-service-name service --dest-instance-name test --dest-process-name UNKNOWN_REMOTE
expected: expected/metrics-has-value-label.yml
- query: |
swctl --display yaml --base-url=http://${service_skywalking_ui_host}:${service_skywalking_ui_80}/graphql metrics linear \
Expand Down

0 comments on commit 537ef54

Please sign in to comment.