-
Notifications
You must be signed in to change notification settings - Fork 2k
CRE-4396: workflows caching soak-test (CI) #22529
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
e205285
move AssertNodeLogs to t_helpers, use docker logs streamer; add wf ca…
Tofel 1913eab
use newer CTF
Tofel 721adf1
debug
Tofel 9c9cf1e
clean up + lints
Tofel 13d5528
separate topology for caching test, save also cpu/mem metrics
Tofel a6d87f3
bump CTF
Tofel 4657bc8
cre-4396: soak test scenario adjustments; extra metrics; config and l…
mchain0 535629e
clean up CI part
Tofel 3eee1bf
move startTime to when all workflows are deployed + check if any cont…
Tofel 00e0b77
cre-4396: more metrics; adjusted MaxLoaded; more eviction pressure;
mchain0 56ccaf6
cre-4396: more metrics; adjusted params
mchain0 1c2e364
Merge branch 'develop' into cache_test_ci
Tofel 91df8fd
cre-4396: skew metrics improvement with an extension merged into deve…
mchain0 9621828
Merge branch 'develop' into cache_test_ci
mchain0 b37fadc
cre-4396: added diskmonitor metrics
mchain0 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,161 @@ | ||
| name: CRE Workflow Caching Test | ||
|
|
||
| on: | ||
| workflow_dispatch: | ||
| inputs: | ||
| ecr_name: | ||
| description: "ECR repository name (default: chainlink)" | ||
| required: false | ||
| type: string | ||
| default: "chainlink" | ||
| chainlink_image_tag: | ||
| description: "Chainlink image tag to use" | ||
| required: true | ||
| type: string | ||
| workflow_call: | ||
| inputs: | ||
| ecr_name: | ||
| required: false | ||
| type: string | ||
| default: "chainlink" | ||
| chainlink_image_tag: | ||
| required: true | ||
| type: string | ||
|
|
||
| jobs: | ||
| caching: | ||
| name: CRE Workflow Caching Test | ||
| environment: | ||
| name: integration | ||
| deployment: false | ||
| runs-on: runs-on=${{ github.run_id | ||
| }}/cpu=32/ram=128/family=m6id+m6idn/spot=false/image=ubuntu24-full-x64/extras=s3-cache | ||
| timeout-minutes: 270 # 4h30m — test timeout is 4h20m | ||
| permissions: | ||
| contents: read | ||
| id-token: write | ||
|
|
||
| steps: | ||
| - name: Enable S3 Cache for Self-Hosted Runners | ||
| uses: runs-on/action@742bf56072eb4845a0f94b3394673e4903c90ff0 # v2.1.0 | ||
| with: | ||
| metrics: cpu,network,memory,disk,io | ||
|
|
||
| - name: Checkout | ||
| uses: actions/checkout@v6 | ||
| with: | ||
| ref: ${{ github.sha }} | ||
| persist-credentials: false | ||
|
|
||
| - name: Set up Go | ||
| id: setup-go | ||
| uses: actions/setup-go@v6 | ||
| with: | ||
| go-version-file: system-tests/tests/go.mod | ||
| cache: true | ||
|
|
||
| - name: Configure AWS Credentials | ||
| uses: aws-actions/configure-aws-credentials@010d0da01d0b5a38af31e9c3470dbfdabdecca3a # v4.0.1 | ||
| with: | ||
| aws-region: ${{ secrets.QA_AWS_REGION }} | ||
| role-to-assume: ${{ secrets.AWS_CTF_READ_ACCESS_ROLE_ARN }} | ||
| role-duration-seconds: 3600 | ||
| mask-aws-account-id: true | ||
|
|
||
| - name: Login to Amazon ECR | ||
| id: login-ecr | ||
| uses: aws-actions/amazon-ecr-login@062b18b96a7aff071d4dc91bc00c4c1a7945b076 # v2.0.1 | ||
| with: | ||
| registries: ${{ format('{0},{1}', secrets.QA_AWS_ACCOUNT_NUMBER, | ||
| secrets.AWS_ACCOUNT_ID_PROD) }} | ||
| env: | ||
| AWS_REGION: ${{ secrets.QA_AWS_REGION }} | ||
|
|
||
| - name: Start observability stack | ||
| shell: bash | ||
| working-directory: core/scripts/cre/environment | ||
| env: | ||
| OBS_MAX_ATTEMPTS: "3" | ||
| OBS_RETRY_DELAY_SECONDS: "15" | ||
| run: | | ||
| set -u | ||
| attempt=1 | ||
| while [[ "$attempt" -le "$OBS_MAX_ATTEMPTS" ]]; do | ||
| echo "::group::Starting observability stack (attempt ${attempt}/${OBS_MAX_ATTEMPTS}, required by caching test)" | ||
| if go run . obs up -f; then | ||
| echo "::endgroup::" | ||
| exit 0 | ||
| fi | ||
| echo "::endgroup::" | ||
| if [[ "$attempt" -lt "$OBS_MAX_ATTEMPTS" ]]; then | ||
| go run . obs down || true | ||
| sleep "$OBS_RETRY_DELAY_SECONDS" | ||
| fi | ||
| attempt=$((attempt + 1)) | ||
| done | ||
| exit 1 | ||
|
|
||
| - name: Start local CRE | ||
| uses: ./.github/actions/start-local-cre-environment | ||
| with: | ||
| jd-image: | ||
| "${{ secrets.AWS_ACCOUNT_ID_PROD }}.dkr.ecr.${{ secrets.QA_AWS_REGION | ||
| }}.amazonaws.com/job-distributor:0.22.1" | ||
| # TODO - remove nightly image fallback after testing | ||
| chainlink-image: "${{ secrets.QA_AWS_ACCOUNT_NUMBER }}.dkr.ecr.${{ | ||
| secrets.QA_AWS_REGION }}.amazonaws.com/${{ inputs.ecr_name || | ||
| 'chainlink' }}:${{ inputs.chainlink_image_tag }}" | ||
| ctf-configs: configs/workflow-gateway-don-cache-soak-test.toml | ||
| chip-router-image: "${{ secrets.QA_AWS_ACCOUNT_NUMBER | ||
| }}.dkr.ecr.${{secrets.QA_AWS_REGION | ||
| }}.amazonaws.com/local-cre-chip-router:v1.0.1" | ||
| retry-count: "3" | ||
| retry-delay-seconds: "15" | ||
| cleanup-on-error: "false" | ||
| working-directory: core/scripts/cre/environment | ||
|
|
||
| - name: Install gotestsum | ||
| shell: bash | ||
| run: go install gotest.tools/gotestsum@v1.12.3 | ||
|
|
||
| - name: Run CRE Workflow Caching Test | ||
| id: run-caching | ||
| shell: bash | ||
| working-directory: system-tests/tests | ||
| env: | ||
| CTF_CHIP_INGRESS_IMAGE: | ||
| "${{ secrets.AWS_ACCOUNT_ID_PROD }}.dkr.ecr.${{ | ||
| secrets.QA_AWS_REGION | ||
| }}.amazonaws.com/atlas-chip-ingress:da84cb72d3a160e02896247d46ab4b9\ | ||
| 806ebee2f" | ||
| CTF_CHIP_CONFIG_IMAGE: "${{ secrets.AWS_ACCOUNT_ID_PROD }}.dkr.ecr.${{ | ||
| secrets.QA_AWS_REGION | ||
| }}.amazonaws.com/atlas-chip-config:7b4e9ee68fd1c737dd3480b5a3ced018\ | ||
| 8f29b969" | ||
| CRE_SOAK_DURATION: "4h" | ||
| run: | | ||
| gotestsum \ | ||
| --jsonfile=/tmp/gotest.log \ | ||
| --junitfile=/tmp/junit-report.xml \ | ||
| --format=github-actions \ | ||
| -- \ | ||
| -v -run "^Test_V2_CRE_CacheSoak$" \ | ||
| -timeout 4h20m \ | ||
| -count=1 \ | ||
| github.com/smartcontractkit/chainlink/system-tests/tests/soak/cre | ||
|
|
||
| - name: Upload metrics | ||
| if: always() | ||
| uses: actions/upload-artifact@v7 | ||
| with: | ||
| name: metrics | ||
| path: system-tests/tests/soak/cre/metrics | ||
| retention-days: 7 | ||
|
|
||
| - name: Upload Docker logs | ||
| if: failure() | ||
| uses: actions/upload-artifact@v7 | ||
| with: | ||
| name: caching-docker-logs | ||
| path: system-tests/tests/soak/cre/logs | ||
| retention-days: 7 | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
86 changes: 86 additions & 0 deletions
86
core/scripts/cre/environment/configs/workflow-gateway-don-cache-soak-test.toml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,86 @@ | ||
| [chip_router] | ||
| image = "local-cre-chip-router:v1.0.1" | ||
|
|
||
| [[blockchains]] | ||
| type = "anvil" | ||
| chain_id = "1337" | ||
| container_name = "anvil-1337" | ||
| docker_cmd_params = ["-b", "0.5", "--mixed-mining"] | ||
|
|
||
| [[blockchains]] | ||
| type = "anvil" | ||
| chain_id = "2337" | ||
| container_name = "anvil-2337" | ||
| port = "8546" | ||
| docker_cmd_params = ["-b", "0.5", "--mixed-mining"] | ||
|
|
||
| [jd] | ||
| csa_encryption_key = "d1093c0060d50a3c89c189b2e485da5a3ce57f3dcb38ab7e2c0d5f0bb2314a44" | ||
| image = "job-distributor:0.22.1" | ||
|
|
||
| [fake] | ||
| port = 8171 | ||
|
|
||
| [fake_http] | ||
| port = 8666 | ||
|
|
||
| [infra] | ||
| type = "docker" | ||
|
|
||
| [[nodesets]] | ||
| nodes = 4 | ||
| name = "workflow" | ||
| don_types = ["workflow"] | ||
| override_mode = "all" | ||
| http_port_range_start = 10100 | ||
|
|
||
| env_vars = { CL_EVM_CMD = "" } | ||
| capabilities = ["vault", "cron", "http-action", "http-trigger", "consensus", "don-time", "evm-1337", "evm-2337"] | ||
| registry_based_launch_allowlist = ["cron-trigger@1.0.0"] | ||
|
|
||
| [nodesets.db] | ||
| image = "postgres:12.0" | ||
| port = 13000 | ||
|
|
||
| [[nodesets.node_specs]] | ||
| roles = ["plugin"] | ||
| [nodesets.node_specs.node] | ||
| docker_ctx = "../../../.." | ||
| docker_file = "core/chainlink.Dockerfile" | ||
| docker_build_args = { "CL_IS_PROD_BUILD" = "false" } | ||
| user_config_overrides = """ | ||
| [Capabilities.WorkflowRegistry.ModuleCache] | ||
| Enabled = true | ||
| # Sized for ~50% of 128GiB host at cap; per loaded slot ~= WASMBinarySizeLimit + WASMMemoryLimit (100MiB each by default). | ||
| MaxLoaded = 100 | ||
| IdleEviction = true | ||
| # Long enough that 3m fast cron stays hot and 8m slow cron idles out between runs. | ||
| IdleTimeout = '5m' | ||
|
|
||
| [Workflows.Limits] | ||
| Global = 5000 | ||
| PerOwner = 5000 | ||
| """ | ||
|
|
||
| [[nodesets]] | ||
| nodes = 1 | ||
| name = "bootstrap-gateway" | ||
| don_types = ["bootstrap", "gateway"] | ||
| override_mode = "each" | ||
| http_port_range_start = 10300 | ||
|
|
||
| env_vars = { CL_EVM_CMD = "" } | ||
| supported_evm_chains = [1337, 2337] | ||
|
|
||
| [nodesets.db] | ||
| image = "postgres:12.0" | ||
| port = 13200 | ||
|
|
||
| [[nodesets.node_specs]] | ||
| roles = ["bootstrap", "gateway"] | ||
| [nodesets.node_specs.node] | ||
| docker_ctx = "../../../.." | ||
| docker_file = "core/chainlink.Dockerfile" | ||
| docker_build_args = { "CL_IS_PROD_BUILD" = "false" } | ||
| custom_ports = ["5002:5002","15002:15002"] | ||
| user_config_overrides = "" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -23,3 +23,4 @@ logs/ | |
|
|
||
| *.yaml | ||
| env_artifact/ | ||
| metrics/ | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.