Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
295c8ea
docs: add crd define doc
Apr 27, 2023
8a14c7d
metrics format
Apr 27, 2023
e3e0b39
Merge pull request #335 from spidernet-io/doc
weizhoublue Apr 27, 2023
ba3afc2
Merge pull request #336 from spidernet-io/pr/metric_fmt
weizhoublue Apr 27, 2023
7a6df2b
Bump github.com/pyroscope-io/client from 0.6.0 to 0.7.0
dependabot[bot] May 1, 2023
49369d4
Bump gopkg.in/natefinch/lumberjack.v2 from 2.0.0 to 2.2.1
dependabot[bot] May 1, 2023
7db90e0
Update lint-yaml.yaml
weizhoublue May 9, 2023
2a9e82a
Merge pull request #345 from spidernet-io/weizhoublue-patch-1
weizhoublue May 9, 2023
0fcac67
Merge pull request #341 from spidernet-io/dependabot/go_modules/gopkg…
weizhoublue May 9, 2023
1ebb893
Merge pull request #339 from spidernet-io/dependabot/go_modules/githu…
weizhoublue May 9, 2023
f1d6476
Update roadmap.md
weizhoublue May 11, 2023
ab53193
Merge pull request #347 from spidernet-io/weizhoublue-patch-1
weizhoublue May 11, 2023
bee3fd6
Update roadmap.md
weizhoublue May 14, 2023
d934910
Update README.md
weizhoublue May 19, 2023
e2d1ac7
Bump codecov/codecov-action from 3.1.3 to 3.1.4
dependabot[bot] May 22, 2023
3e67213
Bump helm/kind-action from 1.5.0 to 1.7.0
dependabot[bot] May 22, 2023
5fecec6
Bump github.com/onsi/ginkgo/v2 from 2.9.2 to 2.9.5
dependabot[bot] May 22, 2023
950b52d
optimize HTTP client performance
May 11, 2023
039f458
Merge pull request #346 from spidernet-io/http_client_hey
weizhoublue May 23, 2023
dd36a3c
Merge pull request #356 from spidernet-io/dependabot/go_modules/githu…
weizhoublue May 23, 2023
0c8693b
Merge pull request #354 from spidernet-io/dependabot/github_actions/h…
weizhoublue May 23, 2023
0a82158
Merge pull request #353 from spidernet-io/dependabot/github_actions/c…
weizhoublue May 23, 2023
e8c354c
optimize DNS client performance
May 23, 2023
6e4f63d
split http crd
May 24, 2023
e7b0563
Merge pull request #357 from spidernet-io/dns_client
weizhoublue May 24, 2023
173e733
Merge pull request #359 from spidernet-io/split_http_crd
weizhoublue May 25, 2023
ec26b85
readme
weizhoublue May 26, 2023
33bb2f1
Merge pull request #361 from spidernet-io/pr/welan/doc
weizhoublue May 26, 2023
9413b21
e2e for multiple k8s
weizhoublue May 26, 2023
4ea3f54
Merge pull request #362 from spidernet-io/pr/welan/doc
weizhoublue May 26, 2023
bdbe76c
plugin report struct
Icarus9913 May 23, 2023
0330a13
let pluginManager use plugin report struct
Icarus9913 May 27, 2023
043c202
add apiserver
Icarus9913 May 28, 2023
325c5fd
fix: k8s ci
weizhoublue May 29, 2023
f08f7b8
Merge pull request #370 from spidernet-io/pr/welan/doc
weizhoublue May 29, 2023
e754f11
ci
weizhoublue May 29, 2023
aece927
Merge pull request #371 from spidernet-io/pr/welan/doc
weizhoublue May 29, 2023
79eed69
Create close-issue.yaml
weizhoublue May 29, 2023
2db3855
Update close-issue.yaml
weizhoublue May 29, 2023
124b22d
improve retrun object
Icarus9913 May 29, 2023
2daf687
Bump actions/setup-python from 4.6.0 to 4.6.1
dependabot[bot] May 29, 2023
01b0fc2
Bump github.com/spf13/cobra from 1.6.1 to 1.7.0
dependabot[bot] May 29, 2023
d4ce48a
move apiserver binary to spiderdoctor controller
Icarus9913 May 29, 2023
4ab763f
Merge pull request #358 from Icarus9913/feat/wk/report-struct
weizhoublue May 29, 2023
1b251cc
Merge pull request #374 from spidernet-io/dependabot/go_modules/githu…
weizhoublue May 29, 2023
c653362
Merge pull request #372 from spidernet-io/dependabot/github_actions/a…
weizhoublue May 29, 2023
070ed49
Update call-e2e.yaml
weizhoublue May 30, 2023
b983853
Update changelog.sh
weizhoublue May 30, 2023
6802708
update version to v0.4.0-rc1
May 30, 2023
40957c5
Merge pull request #376 from spidernet-io/update-version
weizhoublue May 30, 2023
8be9ca0
Update changelog.sh
weizhoublue May 30, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
15 changes: 7 additions & 8 deletions .github/workflows/auto-cherry-pick.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,27 +26,26 @@ jobs:
- name: cherry pick
env:
GITHUB_TOKEN: ${{ secrets.WELAN_PAT}}
JSON: ${{ toJSON(github) }}
run: |
set -x
DATA_FILE="/tmp/`date +%Y%m%d%H%M%S%N`"
echo '${{ toJSON(github) }}' > ${DATA_FILE}
echo "============ print var ======== "
grep -Eio "Merge pull request #[0-9]+ " < ${DATA_FILE}
PR_NUMBER=` cat ${DATA_FILE} | grep -Eio "Merge pull request #[0-9]+ " | grep -Eo "[0-9]+" | uniq `
grep -Eio "Merge pull request #[0-9]+ " <<< "${JSON}"
PR_NUMBER=` grep -Eio "Merge pull request #[0-9]+ " <<< "${JSON}" | grep -Eo "[0-9]+" | uniq `
[ -n "${PR_NUMBER}" ] || { echo "no PR number, ignore" ; }
PR_URL="https://github.com/${{ github.repository }}/pull/${PR_NUMBER}"
ACTION_URL="${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
grep '"username":' < ${DATA_FILE}
PR_AUTHOR=` cat ${DATA_FILE} | grep '"username":' | awk -F'"' '{print $4}' | sort | uniq | grep -v "web-flow" | head -1 | tr -d '\n' `
grep '"username":' <<< "${JSON}"
PR_AUTHOR=` grep '"username":' <<< "${JSON}" | awk -F'"' '{print $4}' | sort | uniq | grep -v "web-flow" | head -1 | tr -d '\n' `
[ -n "${PR_AUTHOR}" ] || { echo "no PR_AUTHOR, ignore" ; }
gh pr view ${PR_NUMBER}
PR_LABEL=` gh pr view ${PR_NUMBER} | grep -i "^labels:" | tr ',' ' ' | tr -s ' ' | sed 's/labels://g' `
[ -n "${PR_LABEL}" ] || { echo "no PR_LABEL, ignore" ; }
PR_TITLE=`gh pr view ${PR_NUMBER} | sed -n '1 p' `
[ -n "${PR_TITLE}" ] || { echo "error, no PR_TITLE " ; exit 1 ; }
#
cat ${DATA_FILE} | grep -Ei "https://github.com/.*/commit"
PR_COMMITS=` cat ${DATA_FILE} | grep -Ei "https://github.com/.*/commit" | awk -F'"' '{print $4}' | uniq -c | awk '{ if ($1 == 1 ) print $2}' | awk -F'/' '{print $NF}' | tr '\n' ' ' `
grep -Ei "https://github.com/.*/commit" <<< "${JSON}"
PR_COMMITS=` grep -Ei "https://github.com/.*/commit" <<< "${JSON}" | awk -F'"' '{print $4}' | uniq -c | awk '{ if ($1 == 1 ) print $2}' | awk -F'/' '{print $NF}' | tr '\n' ' ' `
[ -n "${PR_COMMITS}" ] || { echo "no PR_COMMITS, ignore" ; }
#
echo "number: ${PR_NUMBER}"
Expand Down
68 changes: 65 additions & 3 deletions .github/workflows/auto-nightly-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,77 @@ on:
workflow_dispatch:

jobs:
call-ci:
call_ci_latest:
uses: ./.github/workflows/auto-pr-ci.yaml
secrets: inherit
with:
ipfamily: all

call_ci_v1_22:
# it races to upload images and artifacts when all jobs running , so just call_ci_latest build image
needs: [call_ci_latest]
uses: ./.github/workflows/auto-pr-ci.yaml
secrets: inherit
with:
kindNodeImage: kindest/node:v1.22.17
ipfamily: dual
justE2E: 'true'

call_ci_v1_23:
# it races to upload images and artifacts when all jobs running , so just call_ci_latest build image
needs: [call_ci_latest]
uses: ./.github/workflows/auto-pr-ci.yaml
secrets: inherit
with:
kindNodeImage: kindest/node:v1.23.17
ipfamily: dual
justE2E: 'true'

call_ci_v1_24:
# it races to upload images and artifacts when all jobs running , so just call_ci_latest build image
needs: [call_ci_latest]
uses: ./.github/workflows/auto-pr-ci.yaml
secrets: inherit
with:
kindNodeImage: kindest/node:v1.24.13
ipfamily: dual
justE2E: 'true'

call_ci_v1_25:
# it races to upload images and artifacts when all jobs running , so just call_ci_latest build image
needs: [call_ci_latest]
uses: ./.github/workflows/auto-pr-ci.yaml
secrets: inherit
with:
kindNodeImage: kindest/node:v1.25.9
ipfamily: dual
justE2E: 'true'

call_ci_v1_26:
# it races to upload images and artifacts when all jobs running , so just call_ci_latest build image
needs: [call_ci_latest]
uses: ./.github/workflows/auto-pr-ci.yaml
secrets: inherit
with:
kindNodeImage: kindest/node:v1.26.4
ipfamily: dual
justE2E: 'true'

call_ci_v1_27:
# it races to upload images and artifacts when all jobs running , so just call_ci_latest build image
needs: [call_ci_latest]
uses: ./.github/workflows/auto-pr-ci.yaml
secrets: inherit
with:
kindNodeImage: kindest/node:v1.27.1
ipfamily: dual
justE2E: 'true'

creat_issue:
runs-on: ubuntu-latest
needs: [call-ci]
needs: [call_ci_latest, call_ci_v1_22, call_ci_v1_23, call_ci_v1_24, call_ci_v1_25, call_ci_v1_26, call_ci_v1_27]
# https://docs.github.com/en/actions/learn-github-actions/contexts#jobs-context
if: ${{ always() && needs.call-ci.result == 'failure' }}
if: ${{ always() && ( needs.call_ci_latest.result == 'failure' || needs.call_ci_v1_22.result == 'failure' || needs.call_ci_v1_23.result == 'failure' || needs.call_ci_v1_24.result == 'failure' || needs.call_ci_v1_25.result == 'failure' || needs.call_ci_v1_26.result == 'failure' || needs.call_ci_v1_27.result == 'failure' ) }}
steps:
- name: echo
run: |
Expand Down
69 changes: 59 additions & 10 deletions .github/workflows/auto-pr-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,18 @@ name: Auto PR CI
permissions: write-all
on:
workflow_call:
inputs:
kindNodeImage:
required: false
type: string
ipfamily:
required: false
type: string
default: 'all'
justE2E:
required: false
type: string
default: 'false'
pull_request_target:
types:
- opened
Expand Down Expand Up @@ -31,6 +43,9 @@ on:
- ipv6
- dual
- all
kindNodeImage:
description: 'kind node image tag'
required: false

jobs:
prepare:
Expand All @@ -43,6 +58,8 @@ jobs:
ipfamily_ipv4only_e2e: ${{ env.RUN_E2E_IPV4_ONLY }}
ipfamily_ipv6only_e2e: ${{ env.RUN_E2E_IPV6_ONLY }}
ipfamily_dual_e2e: ${{ env.RUN_E2E_DUAL_STACK }}
kindNodeImage: ${{ env.RUN_kindNodeImage }}
JustE2E: ${{ env.RUN_JustE2E }}
steps:
- name: Check Code Changes
uses: dorny/[email protected]
Expand All @@ -69,12 +86,17 @@ jobs:
id: get_ref
run: |
echo "event ${{ github.event_name }} "
echo "RUN_kindNodeImage=" >> $GITHUB_ENV
echo "RUN_JustE2E=false" >> $GITHUB_ENV
if ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.ipfamily != '' }}; then
echo "call by self workflow_dispatch"
echo "RUN_TAG=${{ github.event.inputs.ref }}" >> $GITHUB_ENV
echo "RUN_E2E_LABEL=${{ github.event.inputs.e2e_labels }}" >> $GITHUB_ENV
echo "RUN_E2E_ENABLED=true" >> $GITHUB_ENV
echo "RUN_UNITEST_ENABLED=true" >> $GITHUB_ENV
if ${{ github.event.inputs.kindNodeImage != '' }}; then
echo "RUN_kindNodeImage=${{ github.event.inputs.kindNodeImage }}" >> $GITHUB_ENV
fi
if ${{ github.event.inputs.ipfamily == 'ipv4' }}; then
echo "RUN_E2E_IPV4_ONLY=true" >> $GITHUB_ENV
echo "RUN_E2E_IPV6_ONLY=false" >> $GITHUB_ENV
Expand Down Expand Up @@ -131,9 +153,33 @@ jobs:
echo "RUN_E2E_LABEL=" >> $GITHUB_ENV
echo "RUN_E2E_ENABLED=true" >> $GITHUB_ENV
echo "RUN_UNITEST_ENABLED=true" >> $GITHUB_ENV
echo "RUN_E2E_IPV4_ONLY=true" >> $GITHUB_ENV
echo "RUN_E2E_IPV6_ONLY=true" >> $GITHUB_ENV
echo "RUN_E2E_DUAL_STACK=true" >> $GITHUB_ENV
if ${{ inputs.kindNodeImage != '' }}; then
echo "RUN_kindNodeImage=${{ inputs.kindNodeImage }}" >> $GITHUB_ENV
fi
if ${{ inputs.justE2E == 'true' }}; then
echo "RUN_JustE2E=true" >> $GITHUB_ENV
fi
if ${{ inputs.ipfamily == 'ipv4' }}; then
echo "RUN_E2E_IPV4_ONLY=true" >> $GITHUB_ENV
echo "RUN_E2E_IPV6_ONLY=false" >> $GITHUB_ENV
echo "RUN_E2E_DUAL_STACK=false" >> $GITHUB_ENV
elif ${{ inputs.ipfamily == 'ipv6' }}; then
echo "RUN_E2E_IPV4_ONLY=false" >> $GITHUB_ENV
echo "RUN_E2E_IPV6_ONLY=true" >> $GITHUB_ENV
echo "RUN_E2E_DUAL_STACK=false" >> $GITHUB_ENV
elif ${{ inputs.ipfamily == 'dual' }}; then
echo "RUN_E2E_IPV4_ONLY=false" >> $GITHUB_ENV
echo "RUN_E2E_IPV6_ONLY=false" >> $GITHUB_ENV
echo "RUN_E2E_DUAL_STACK=true" >> $GITHUB_ENV
elif ${{ inputs.ipfamily == 'all' }}; then
echo "RUN_E2E_IPV4_ONLY=true" >> $GITHUB_ENV
echo "RUN_E2E_IPV6_ONLY=true" >> $GITHUB_ENV
echo "RUN_E2E_DUAL_STACK=true" >> $GITHUB_ENV
else
echo "RUN_E2E_IPV4_ONLY=true" >> $GITHUB_ENV
echo "RUN_E2E_IPV6_ONLY=true" >> $GITHUB_ENV
echo "RUN_E2E_DUAL_STACK=true" >> $GITHUB_ENV
fi
fi

# some event, the tag is not sha, so checkout it and get sha
Expand All @@ -151,7 +197,7 @@ jobs:

call_unitest:
needs: prepare
if: ${{ needs.prepare.outputs.unitest_enabled == 'true' }}
if: ${{ needs.prepare.outputs.unitest_enabled == 'true' && needs.prepare.outputs.JustE2E == 'false' }}
# forbid to specify version for local workflow, GITHUB_REF Same as the caller workflow
uses: ./.github/workflows/lint-golang.yaml
with:
Expand All @@ -160,7 +206,7 @@ jobs:

call_build_ci_image:
needs: prepare
if: ${{ needs.prepare.outputs.e2e_enabled == 'true' }}
if: ${{ needs.prepare.outputs.e2e_enabled == 'true' && needs.prepare.outputs.JustE2E == 'false' }}
# get image:${{ needs.prepare.outputs.ref }} and image-ci:${{ needs.prepare.outputs.ref }}
uses: ./.github/workflows/build-image-ci.yaml
with:
Expand All @@ -169,7 +215,7 @@ jobs:

lint_chart_against_release_image:
needs: prepare
if: ${{ needs.prepare.outputs.e2e_enabled == 'true' }}
if: ${{ needs.prepare.outputs.e2e_enabled == 'true' && needs.prepare.outputs.JustE2E == 'false' }}
# forbid to specify version for local workflow, GITHUB_REF Same as the caller workflow
uses: ./.github/workflows/call-lint-chart.yaml
with:
Expand All @@ -178,37 +224,40 @@ jobs:

e2e_dual:
needs: [call_build_ci_image, prepare]
if: ${{ needs.prepare.outputs.e2e_enabled == 'true' && needs.prepare.outputs.ipfamily_dual_e2e == 'true' }}
if: ${{ always() && needs.prepare.outputs.e2e_enabled == 'true' && needs.prepare.outputs.ipfamily_dual_e2e == 'true' }}
uses: ./.github/workflows/call-e2e.yaml
with:
ref: ${{ needs.prepare.outputs.ref }}
ipfamily: dual
e2e_labels: ${{ needs.prepare.outputs.e2e_labels }}
kind_node_image: ${{ needs.prepare.outputs.kindNodeImage }}
secrets: inherit

e2e_ipv4:
needs: [call_build_ci_image, prepare]
if: ${{ needs.prepare.outputs.e2e_enabled == 'true' && needs.prepare.outputs.ipfamily_ipv4only_e2e == 'true' }}
if: ${{ always() && needs.prepare.outputs.e2e_enabled == 'true' && needs.prepare.outputs.ipfamily_ipv4only_e2e == 'true' }}
uses: ./.github/workflows/call-e2e.yaml
with:
ref: ${{ needs.prepare.outputs.ref }}
ipfamily: ipv4
e2e_labels: ${{ needs.prepare.outputs.e2e_labels }}
kind_node_image: ${{ needs.prepare.outputs.kindNodeImage }}
secrets: inherit


e2e_ipv6:
needs: [call_build_ci_image, prepare]
if: ${{ needs.prepare.outputs.e2e_enabled == 'true' && needs.prepare.outputs.ipfamily_ipv6only_e2e == 'true' }}
if: ${{ always() && needs.prepare.outputs.e2e_enabled == 'true' && needs.prepare.outputs.ipfamily_ipv6only_e2e == 'true' }}
uses: ./.github/workflows/call-e2e.yaml
with:
ref: ${{ needs.prepare.outputs.ref }}
ipfamily: ipv6
e2e_labels: ${{ needs.prepare.outputs.e2e_labels }}
kind_node_image: ${{ needs.prepare.outputs.kindNodeImage }}
secrets: inherit

trivy_scan:
needs: [call_build_ci_image, prepare]
if: ${{ needs.prepare.outputs.JustE2E == 'false' }}
uses: ./.github/workflows/call-trivy.yaml
with:
ref: ${{ needs.prepare.outputs.ref }}
Expand Down
23 changes: 17 additions & 6 deletions .github/workflows/call-e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ on:
e2e_labels:
required: false
type: string

kind_node_image:
required: false
type: string

jobs:
e2e_against_commit:
Expand All @@ -49,7 +51,15 @@ jobs:
TMP=` date +%m%d%H%M%S `
E2E_CLUSTER_NAME="project${TMP}"
echo "RUN_KIND_CLUSTER_NAME=${E2E_CLUSTER_NAME}" >> $GITHUB_ENV

if ${{ inputs.kind_node_image != '' }} ; then
TMP=${{ inputs.kind_node_image }}
VAR=${TMP##*:}
VAR=${VAR//./_}
echo "RUN_VAR=${VAR}" >> $GITHUB_ENV
else
echo "RUN_VAR=latest" >> $GITHUB_ENV
fi

- name: Checkout Code
uses: actions/checkout@v3
with:
Expand All @@ -64,7 +74,7 @@ jobs:

# https://github.com/helm/kind-action
- name: Install Kind Bin
uses: helm/kind-action@v1.5.0
uses: helm/kind-action@v1.7.0
with:
install_only: true

Expand Down Expand Up @@ -107,7 +117,8 @@ jobs:
make e2e_init -e E2E_KIND_CLUSTER_NAME=${{ env.RUN_KIND_CLUSTER_NAME }} \
-e PROJECT_IMAGE_VERSION=${{ inputs.ref }} \
-e E2E_IP_FAMILY=${{ inputs.ipfamily }} \
-e PYROSCOPE_LOCAL_PORT=''
-e PYROSCOPE_LOCAL_PORT='' \
-e E2E_KIND_NODE_IMAGE=${{ inputs.kind_node_image }}

- name: Run e2e Test
continue-on-error: true
Expand Down Expand Up @@ -136,15 +147,15 @@ jobs:
- name: Upload e2e cluster log
uses: actions/[email protected]
with:
name: ${{ inputs.ipfamily }}-debuglog.txt
name: ${{ inputs.ipfamily }}-debuglog-${{ env.RUN_VAR }}.txt
path: ${{ env.E2E_LOG_PATH }}
retention-days: 30

- name: Upload e2e ginkgo report
if: ${{ env.RUN_UPLOAD_LOG == 'true' }}
uses: actions/[email protected]
with:
name: ${{ inputs.ipfamily }}-e2ereport.json
name: ${{ inputs.ipfamily }}-e2ereport-${{ env.RUN_VAR }}.json
path: ${{ env.E2E_GINKGO_REPORT_PATH }}
retention-days: 30

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/call-lint-chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ jobs:
# https://github.com/actions/setup-python
- name: Set up Python
if: ${{ env.RUN_JUST_LINT_CHART == 'false' }}
uses: actions/[email protected].0
uses: actions/[email protected].1
with:
python-version: 3.8
architecture: x64
Expand Down Expand Up @@ -96,7 +96,7 @@ jobs:
# https://github.com/helm/kind-action
- name: Create Kind cluster
if: ${{ env.RUN_CHANGED == 'true' && env.RUN_JUST_LINT_CHART == 'false' }}
uses: helm/kind-action@v1.5.0
uses: helm/kind-action@v1.7.0
with:
wait: 120s
#kubectl_version: ${{ env.K8S_VERSION }}
Expand Down
Loading
Loading