Skip to content

Commit

Permalink
Merge branch 'develop' into fix/renamefObserve_rmn
Browse files Browse the repository at this point in the history
  • Loading branch information
jhweintraub committed Dec 13, 2024
2 parents ffc8ce9 + ea2d4f7 commit e9cf869
Show file tree
Hide file tree
Showing 62 changed files with 2,357 additions and 534 deletions.
18 changes: 10 additions & 8 deletions .github/e2e-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,7 @@ runner-test-matrix:
test_cmd: cd integration-tests/chaos && DETACH_RUNNER=false go test -test.run "^TestOCRChaos$" -v -test.parallel=10 -timeout 60m -count=1 -json
test_env_vars:
TEST_SUITE: chaos
CHAINLINK_USER_TEAM: Foundations

# END: OCR tests

Expand Down Expand Up @@ -624,6 +625,7 @@ runner-test-matrix:
pyroscope_env: ci-automation-on-demand-chaos
test_env_vars:
TEST_SUITE: chaos
CHAINLINK_USER_TEAM: Automation

- id: benchmark/automation_test.go:TestAutomationBenchmark
path: integration-tests/benchmark/automation_test.go
Expand Down Expand Up @@ -966,7 +968,7 @@ runner-test-matrix:
- id: smoke/ccip/ccip_rmn_test.go:^TestRMN_TwoMessagesOnTwoLanesIncludingBatching$
path: integration-tests/smoke/ccip/ccip_rmn_test.go
test_env_type: docker
runs_on: ubuntu-latest
runs_on: ubuntu20.04-8cores-32GB
triggers:
- PR E2E Core Tests
- Nightly E2E Tests
Expand All @@ -982,7 +984,7 @@ runner-test-matrix:
- id: smoke/ccip/ccip_rmn_test.go:^TestRMN_MultipleMessagesOnOneLaneNoWaitForExec$
path: integration-tests/smoke/ccip/ccip_rmn_test.go
test_env_type: docker
runs_on: ubuntu-latest
runs_on: ubuntu20.04-8cores-32GB
triggers:
- PR E2E Core Tests
- Nightly E2E Tests
Expand All @@ -998,7 +1000,7 @@ runner-test-matrix:
- id: smoke/ccip/ccip_rmn_test.go:^TestRMN_NotEnoughObservers$
path: integration-tests/smoke/ccip/ccip_rmn_test.go
test_env_type: docker
runs_on: ubuntu-latest
runs_on: ubuntu20.04-8cores-32GB
triggers:
- PR E2E Core Tests
- Nightly E2E Tests
Expand All @@ -1014,7 +1016,7 @@ runner-test-matrix:
- id: smoke/ccip/ccip_rmn_test.go:^TestRMN_DifferentSigners$
path: integration-tests/smoke/ccip/ccip_rmn_test.go
test_env_type: docker
runs_on: ubuntu-latest
runs_on: ubuntu20.04-8cores-32GB
triggers:
- PR E2E Core Tests
- Nightly E2E Tests
Expand All @@ -1030,7 +1032,7 @@ runner-test-matrix:
- id: smoke/ccip/ccip_rmn_test.go:^TestRMN_NotEnoughSigners$
path: integration-tests/smoke/ccip/ccip_rmn_test.go
test_env_type: docker
runs_on: ubuntu-latest
runs_on: ubuntu20.04-8cores-32GB
triggers:
- PR E2E Core Tests
- Nightly E2E Tests
Expand All @@ -1046,7 +1048,7 @@ runner-test-matrix:
- id: smoke/ccip/ccip_rmn_test.go:^TestRMN_DifferentRmnNodesForDifferentChains$
path: integration-tests/smoke/ccip/ccip_rmn_test.go
test_env_type: docker
runs_on: ubuntu-latest
runs_on: ubuntu20.04-8cores-32GB
triggers:
- PR E2E Core Tests
- Nightly E2E Tests
Expand All @@ -1062,7 +1064,7 @@ runner-test-matrix:
- id: smoke/ccip/ccip_rmn_test.go:^TestRMN_TwoMessagesOneSourceChainCursed$
path: integration-tests/smoke/ccip/ccip_rmn_test.go
test_env_type: docker
runs_on: ubuntu-latest
runs_on: ubuntu20.04-8cores-32GB
triggers:
- PR E2E Core Tests
- Nightly E2E Tests
Expand All @@ -1078,7 +1080,7 @@ runner-test-matrix:
- id: smoke/ccip/ccip_rmn_test.go:^TestRMN_GlobalCurseTwoMessagesOnTwoLanes$
path: integration-tests/smoke/ccip/ccip_rmn_test.go
test_env_type: docker
runs_on: ubuntu-latest
runs_on: ubuntu20.04-8cores-32GB
triggers:
- PR E2E Core Tests
- Nightly E2E Tests
Expand Down
7 changes: 3 additions & 4 deletions .github/workflows/flakeguard-on-demand.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,13 @@ on:
description: 'The path to the project to run the flaky test detection.'
default: '.'
baseRef:
required: true
required: false
type: string
description: 'The base reference or branch to compare changes for detecting flaky tests.'
default: 'origin/develop'
description: 'The base reference or branch to compare changes for detecting flaky tests. Set only when running diffs between branches. E.g. (develop)'
headRef:
required: false
type: string
description: 'The head reference or branch to compare changes for detecting flaky tests. Default is the current branch.'
description: 'The head reference or branch to compare changes for detecting flaky tests. Default is the current branch. E.g. (develop)'
runAllTests:
required: false
type: boolean
Expand Down
53 changes: 39 additions & 14 deletions .github/workflows/flakeguard.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ on:
baseRef:
required: false
type: string
description: 'The base reference or branch to compare changes for detecting flaky tests.'
description: 'The base reference or branch to compare changes for detecting flaky tests. Set only when running diffs between branches. E.g. (develop)'
headRef:
required: false
type: string
description: 'The head reference or branch to compare changes for detecting flaky tests. Default is the current branch.'
description: 'The head reference or branch to compare changes for detecting flaky tests. Default is the current branch. E.g. (develop)'
runAllTests:
required: false
type: boolean
Expand Down Expand Up @@ -56,6 +56,7 @@ on:
required: true

env:
GIT_BASE_REF: ${{ inputs.baseRef }}
GIT_HEAD_REF: ${{ inputs.headRef || github.ref }}
SKIPPED_TESTS: ${{ fromJSON(inputs.extraArgs)['skipped_tests'] || '' }} # Comma separated list of test names to skip running in the flaky detector. Related issue: TT-1823
DEFAULT_MAX_RUNNER_COUNT: ${{ fromJSON(inputs.extraArgs)['default_max_runner_count'] || '8' }} # The default maximum number of GitHub runners to use for parallel test execution.
Expand All @@ -80,29 +81,49 @@ jobs:
affected_test_packages: ${{ steps.get-tests.outputs.packages }}
git_head_sha: ${{ steps.get_commit_sha.outputs.git_head_sha }}
git_head_short_sha: ${{ steps.get_commit_sha.outputs.git_head_short_sha }}
git_base_sha: ${{ steps.get_commit_sha.outputs.git_base_sha }}
steps:
- name: Checkout repository
uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
with:
fetch-depth: 0
ref: ${{ env.GIT_HEAD_REF }}

- name: Get commit SHA
- name: Get SHA
id: get_commit_sha
run: |
# Resolve HEAD SHA
git_head_sha=$(git rev-parse HEAD)
git_head_short_sha=$(git rev-parse --short HEAD)
echo "git_head_sha=$git_head_sha" >> $GITHUB_OUTPUT
echo "git_head_short_sha=$git_head_short_sha" >> $GITHUB_OUTPUT
# Print HEAD SHAs to the console
echo "HEAD SHA: $git_head_sha"
echo "HEAD Short SHA: $git_head_short_sha"
# Conditionally resolve BASE SHA
if [ -n "${{ env.GIT_BASE_REF }}" ]; then
git fetch origin ${{ env.GIT_BASE_REF }} --quiet
git_base_sha=$(git rev-parse origin/${{ env.GIT_BASE_REF }})
echo "git_base_sha=$git_base_sha" >> $GITHUB_OUTPUT
# Print BASE SHA to the console
echo "BASE SHA: $git_base_sha"
else
echo "BASE SHA not provided."
echo "git_base_sha=" >> $GITHUB_OUTPUT
fi
- name: Set up Go 1.21.9
uses: actions/setup-go@v5.0.2
with:
cache: false

- name: Install flakeguard
shell: bash
run: go install github.com/smartcontractkit/chainlink-testing-framework/tools/flakeguard@404e04e1e2e2dd5a384b09bd05b8d80409b6609a # flakguard@0.1.0
run: go install github.com/smartcontractkit/chainlink-testing-framework/tools/flakeguard@fc2d7e38486853d2bed06e9074868087f5b55506 # flakguard@0.1.0

- name: Find new or updated test packages
if: ${{ inputs.runAllTests == false }}
Expand All @@ -115,7 +136,7 @@ jobs:
PATH=$PATH:$(go env GOPATH)/bin
export PATH
PACKAGES=$(flakeguard find --find-by-test-files-diff=${{ inputs.findByTestFilesDiff }} --find-by-affected-packages=${{ inputs.findByAffectedPackages }} --base-ref=origin/${{ inputs.baseRef }} --project-path=${{ inputs.projectPath }})
PACKAGES=$(flakeguard find --find-by-test-files-diff=${{ inputs.findByTestFilesDiff }} --find-by-affected-packages=${{ inputs.findByAffectedPackages }} --base-ref=origin/${{ env.GIT_BASE_REF }} --project-path=${{ inputs.projectPath }})
echo $PACKAGES
echo "packages=$PACKAGES" >> $GITHUB_OUTPUT
Expand All @@ -130,7 +151,7 @@ jobs:
PATH=$PATH:$(go env GOPATH)/bin
export PATH
TEST_FILES=$(flakeguard find --only-show-changed-test-files=true --base-ref=origin/${{ inputs.baseRef }} --project-path=${{ inputs.projectPath }})
TEST_FILES=$(flakeguard find --only-show-changed-test-files=true --base-ref=origin/${{ env.GIT_BASE_REF }} --project-path=${{ inputs.projectPath }})
echo $TEST_FILES
echo "test_files=$TEST_FILES" >> $GITHUB_OUTPUT
Expand Down Expand Up @@ -261,11 +282,11 @@ jobs:

- name: Install flakeguard
shell: bash
run: go install github.com/smartcontractkit/chainlink-testing-framework/tools/flakeguard@404e04e1e2e2dd5a384b09bd05b8d80409b6609a # flakguard@0.1.0
run: go install github.com/smartcontractkit/chainlink-testing-framework/tools/flakeguard@fc2d7e38486853d2bed06e9074868087f5b55506 # flakguard@0.1.0

- name: Run tests with flakeguard
shell: bash
run: flakeguard run --project-path=${{ inputs.projectPath }} --test-packages=${{ matrix.testPackages }} --run-count=${{ env.TEST_REPEAT_COUNT }} --max-pass-ratio=${{ inputs.maxPassRatio }} --race=${{ env.RUN_WITH_RACE }} --shuffle=${{ env.RUN_WITH_SHUFFLE }} --shuffle-seed=${{ env.SHUFFLE_SEED }} --skip-tests=${{ env.SKIPPED_TESTS }} --output-json=test-result.json
run: flakeguard run --project-path=${{ inputs.projectPath }} --test-packages=${{ matrix.testPackages }} --run-count=${{ env.TEST_REPEAT_COUNT }} --max-pass-ratio=${{ inputs.maxPassRatio }} --race=${{ env.RUN_WITH_RACE }} --shuffle=${{ env.RUN_WITH_SHUFFLE }} --shuffle-seed=${{ env.SHUFFLE_SEED }} --skip-tests=${{ env.SKIPPED_TESTS }} --output-json=test-result.json --omit-test-outputs-on-success=true
env:
CL_DATABASE_URL: ${{ env.DB_URL }}

Expand All @@ -281,7 +302,7 @@ jobs:
needs: [get-tests, run-tests]
if: always()
name: Report
runs-on: ubuntu-24.04-8cores-32GB-ARM # Use a runner with more resources to avoid OOM errors when aggregating test results.
runs-on: ubuntu-latest
outputs:
test_results: ${{ steps.results.outputs.results }}
steps:
Expand All @@ -308,7 +329,7 @@ jobs:

- name: Install flakeguard
shell: bash
run: go install github.com/smartcontractkit/chainlink-testing-framework/tools/flakeguard@404e04e1e2e2dd5a384b09bd05b8d80409b6609a # flakguard@0.1.0
run: go install github.com/smartcontractkit/chainlink-testing-framework/tools/flakeguard@fc2d7e38486853d2bed06e9074868087f5b55506 # flakguard@0.1.0

- name: Aggregate Flakeguard Results
id: results
Expand All @@ -329,7 +350,11 @@ jobs:
--output-path ./flakeguard-report \
--repo-path "${{ github.workspace }}" \
--codeowners-path "${{ github.workspace }}/.github/CODEOWNERS" \
--max-pass-ratio "${{ inputs.maxPassRatio }}"
--max-pass-ratio "${{ inputs.maxPassRatio }}" \
--repo-url "${{ inputs.repoUrl }}" \
--base-sha "${{ needs.get-tests.outputs.git_base_sha }}" \
--head-sha "${{ needs.get-tests.outputs.git_head_sha }}" \
--github-workflow-name "${{ github.workflow }}"

# Print out the summary file
echo -e "\nFlakeguard Summary:"
Expand Down Expand Up @@ -461,7 +486,7 @@ jobs:
"type": "section",
"text": {
"type": "mrkdwn",
"text": "${{ inputs.runAllTests == true && format('Ran all tests for `{0}` branch.', inputs.headRef) || format('Ran changed tests between `{0}` and `{1}` (`{2}`).', inputs.baseRef, needs.get-tests.outputs.git_head_short_sha, env.GIT_HEAD_REF) }}"
"text": "${{ inputs.runAllTests == true && format('Ran all tests for `{0}` branch.', env.GIT_HEAD_REF) || format('Ran changed tests between `{0}` and `{1}` (`{2}`).', env.GIT_BASE_REF, needs.get-tests.outputs.git_head_short_sha, env.GIT_HEAD_REF) }}"
}
},
{
Expand All @@ -481,7 +506,7 @@ jobs:
"type": "section",
"text": {
"type": "mrkdwn",
"text": "${{ format('<{0}/{1}/actions/runs/{2}|View Flaky Detector Details> | <{3}/compare/{4}...{5}#files_bucket|Compare Changes>{6}', github.server_url, github.repository, github.run_id, inputs.repoUrl, inputs.baseRef, needs.get-tests.outputs.git_head_sha, github.event_name == 'pull_request' && format(' | <{0}|View PR>', github.event.pull_request.html_url) || '') }}"
"text": "${{ format('<{0}/{1}/actions/runs/{2}|View Flaky Detector Details> | <{3}/compare/{4}...{5}#files_bucket|Compare Changes>{6}', github.server_url, github.repository, github.run_id, inputs.repoUrl, env.GIT_BASE_REF, needs.get-tests.outputs.git_head_sha, github.event_name == 'pull_request' && format(' | <{0}|View PR>', github.event.pull_request.html_url) || '') }}"
}
}
]
Expand Down Expand Up @@ -514,7 +539,7 @@ jobs:
"type": "section",
"text": {
"type": "mrkdwn",
"text": "${{ inputs.runAllTests == true && format('Ran all tests for `{0}` branch.', env.GIT_HEAD_REF) || format('Ran changed tests between `{0}` and `{1}` (`{2}`).', inputs.baseRef, needs.get-tests.outputs.git_head_short_sha, env.GIT_HEAD_REF) }}"
"text": "${{ inputs.runAllTests == true && format('Ran all tests for `{0}` branch.', env.GIT_HEAD_REF) || format('Ran changed tests between `{0}` and `{1}` (`{2}`).', env.GIT_BASE_REF, needs.get-tests.outputs.git_head_short_sha, env.GIT_HEAD_REF) }}"
}
},
{
Expand Down
47 changes: 43 additions & 4 deletions .github/workflows/integration-chaos-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,49 @@ on:
tags:
- "*"
workflow_dispatch:
inputs:
team:
description: Team to run the tests for (e.g. BIX, CCIP)
required: true
type: string

jobs:
run-e2e-tests-workflow-dispatch:
name: Run E2E Tests (Workflow Dispatch)
uses: smartcontractkit/.github/.github/workflows/run-e2e-tests.yml@0d4a2b2b009c87b5c366d0b97f7a8d7de2f60760
if: github.event_name == 'workflow_dispatch'
with:
test_path: .github/e2e-tests.yml
chainlink_version: ${{ github.sha }}
require_chainlink_image_versions_in_qa_ecr: ${{ github.sha }}
test_trigger: E2E Chaos Tests
test_log_level: debug
team: ${{ inputs.team }}
secrets:
QA_AWS_REGION: ${{ secrets.QA_AWS_REGION }}
QA_AWS_ROLE_TO_ASSUME: ${{ secrets.QA_AWS_ROLE_TO_ASSUME }}
QA_AWS_ACCOUNT_NUMBER: ${{ secrets.QA_AWS_ACCOUNT_NUMBER }}
PROD_AWS_ACCOUNT_NUMBER: ${{ secrets.AWS_ACCOUNT_ID_PROD }}
QA_PYROSCOPE_INSTANCE: ${{ secrets.QA_PYROSCOPE_INSTANCE }}
QA_PYROSCOPE_KEY: ${{ secrets.QA_PYROSCOPE_KEY }}
QA_KUBECONFIG: ${{ secrets.QA_KUBECONFIG }}
GRAFANA_INTERNAL_TENANT_ID: ${{ secrets.GRAFANA_INTERNAL_TENANT_ID }}
GRAFANA_INTERNAL_BASIC_AUTH: ${{ secrets.GRAFANA_INTERNAL_BASIC_AUTH }}
GRAFANA_INTERNAL_HOST: ${{ secrets.GRAFANA_INTERNAL_HOST }}
GRAFANA_INTERNAL_URL_SHORTENER_TOKEN: ${{ secrets.GRAFANA_INTERNAL_URL_SHORTENER_TOKEN }}
LOKI_TENANT_ID: ${{ secrets.LOKI_TENANT_ID }}
LOKI_URL: ${{ secrets.LOKI_URL }}
LOKI_BASIC_AUTH: ${{ secrets.LOKI_BASIC_AUTH }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
AWS_REGION: ${{ secrets.QA_AWS_REGION }}
AWS_OIDC_IAM_ROLE_VALIDATION_PROD_ARN: ${{ secrets.AWS_OIDC_IAM_ROLE_VALIDATION_PROD_ARN }}
AWS_API_GW_HOST_GRAFANA: ${{ secrets.AWS_API_GW_HOST_GRAFANA }}
SLACK_BOT_TOKEN: ${{ secrets.QA_SLACK_API_KEY }}

run-e2e-tests-workflow:
name: Run E2E Tests
uses: smartcontractkit/.github/.github/workflows/run-e2e-tests.yml@5412507526722a7b1c5d719fa686eed5a1bc4035 # ctf-run-tests@0.2.0
name: Run E2E Tests (Push and Sechedule)
uses: smartcontractkit/.github/.github/workflows/run-e2e-tests.yml@0d4a2b2b009c87b5c366d0b97f7a8d7de2f60760
if: github.event_name != 'workflow_dispatch'
with:
test_path: .github/e2e-tests.yml
chainlink_version: ${{ github.sha }}
Expand All @@ -32,8 +70,9 @@ jobs:
LOKI_TENANT_ID: ${{ secrets.LOKI_TENANT_ID }}
LOKI_URL: ${{ secrets.LOKI_URL }}
LOKI_BASIC_AUTH: ${{ secrets.LOKI_BASIC_AUTH }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
AWS_REGION: ${{ secrets.QA_AWS_REGION }}
AWS_OIDC_IAM_ROLE_VALIDATION_PROD_ARN: ${{ secrets.AWS_OIDC_IAM_ROLE_VALIDATION_PROD_ARN }}
AWS_API_GW_HOST_GRAFANA: ${{ secrets.AWS_API_GW_HOST_GRAFANA }}
AWS_API_GW_HOST_GRAFANA: ${{ secrets.AWS_API_GW_HOST_GRAFANA }}
SLACK_BOT_TOKEN: ${{ secrets.QA_SLACK_API_KEY }}

7 changes: 1 addition & 6 deletions core/capabilities/compute/compute.go
Original file line number Diff line number Diff line change
Expand Up @@ -318,18 +318,13 @@ func (c *Compute) createFetcher() func(ctx context.Context, req *wasmpb.FetchReq
headersReq[k] = v.String()
}

payloadBytes, err := json.Marshal(ghcapabilities.Request{
resp, err := c.outgoingConnectorHandler.HandleSingleNodeRequest(ctx, messageID, ghcapabilities.Request{
URL: req.Url,
Method: req.Method,
Headers: headersReq,
Body: req.Body,
TimeoutMs: req.TimeoutMs,
})
if err != nil {
return nil, fmt.Errorf("failed to marshal fetch request: %w", err)
}

resp, err := c.outgoingConnectorHandler.HandleSingleNodeRequest(ctx, messageID, payloadBytes)
if err != nil {
return nil, err
}
Expand Down
Loading

0 comments on commit e9cf869

Please sign in to comment.