Skip to content

Commit 2fb780d

Browse files
committed
Merge origin/develop into cre/PLEX-2476-v2-core
Resolve go.mod conflicts, pin chainlink-evm/solana/framework for PLEX-2476, sync plugout refs, align FinalizedStateUnavailable with chainlink-evm defaults, and regenerate CONFIG.md.
2 parents f461f22 + 67f9a4b commit 2fb780d

1,196 files changed

Lines changed: 52868 additions & 69686 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
File renamed without changes.

.changeset/soft-needles-pick.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
"chainlink": minor
3+
---
4+
5+
Removed support for Legacy Gas Station jobs. The functionality was already removed before, this change removes
6+
the database tables and code related to it.
7+
8+
#breaking_change #db_update #removed

.github/CODEOWNERS

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626
/core/capabilities/ccip/ccipton/ @smartcontractkit/bix-build
2727

2828
# To be deprecated in Chainlink V3
29-
/core/services/fluxmonitorv2/ @smartcontractkit/foundations @smartcontractkit/core
3029
/core/services/job/ @smartcontractkit/foundations @smartcontractkit/core
3130
/core/services/keystore/ @smartcontractkit/foundations
3231
/core/services/ocr*/ @smartcontractkit/foundations @smartcontractkit/core
@@ -94,7 +93,8 @@
9493
/.github/CODEOWNERS @smartcontractkit/core @smartcontractkit/foundations
9594
/.github/workflows/build-publish.yml @smartcontractkit/devex-cicd
9695
/.github/workflows/devenv* @smartcontractkit/devex-tooling @smartcontractkit/devex-cicd @smartcontractkit/core
97-
/tools/plugout/ @smartcontractkit/devex-cicd
96+
/tools/plugout/ @smartcontractkit/devex-cicd @smartcontractkit/core
97+
/tools/test/ @smartcontractkit/devex-cicd @smartcontractkit/devex-tooling @smartcontractkit/core
9898

9999
/core/chainlink.Dockerfile @smartcontractkit/devex-cicd @smartcontractkit/foundations @smartcontractkit/core
100100

.github/actionlint.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,9 @@ paths:
66
# ignore unknown runner labels, as we have fully custom runners
77
- 'label ".*" is unknown. available labels are .*'
88
# https://www.shellcheck.net/wiki/SC2129
9-
- '.*SC2129:style:1:1:.*'
9+
- '.*SC2129:style:.*'
10+
# https://www.shellcheck.net/wiki/SC2002
11+
- '.*SC2002:style:.*'
12+
# ignore if: false, as it's a common pattern to temporarily disable a job or step
13+
- 'constant expression "false" in condition.*'
1014

.github/actions/golangci-lint/action.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,9 @@ runs:
5959
# XXX: Don't use `.` default working directory here due to issues with the golangci-lint-action.
6060
run: |
6161
if [ "${{ inputs.go-directory }}" == "." ]; then
62-
echo "golangci-lint-working-directory=" >> $GITHUB_OUTPUT
62+
echo "golangci-lint-working-directory=" >> "${GITHUB_OUTPUT}"
6363
else
64-
echo "golangci-lint-working-directory=${{ inputs.go-directory }}/" >> $GITHUB_OUTPUT
64+
echo "golangci-lint-working-directory=${{ inputs.go-directory }}/" >> "${GITHUB_OUTPUT}"
6565
fi
6666
6767
- name: Golangci-lint
@@ -104,7 +104,7 @@ runs:
104104
echo "Directory name is valid for the artifact suffix: '$suffix'"
105105
fi
106106
107-
echo "suffix=${suffix}" >> $GITHUB_OUTPUT
107+
echo "suffix=${suffix}" >> "${GITHUB_OUTPUT}"
108108
109109
- name: Store Golangci-lint report artifact
110110
if: always()
Lines changed: 36 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,44 @@
11
# Notify Slack Jobs Result
22

3-
Sends a Slack message to a specified channel detailing the results of one to many GHA job results using a regex. The job results will be grouped by the `github_job_name_regex` and displayed underneath the `message_title`, with the regex matching group displayed as an individual result. This is primarily designed for when you have test groups running in a matrix, and would like condensed reporting on their status by group. It's often accompanied by posting a Slack message before to start a thread, then attaching all the results to that thread like we do in the reporting section of the [live-testnet-test.yml workflow](../../workflows/live-testnet-tests.yml). Check out the example below, where we post an initial summary message, then use this action to thread together specific results:
3+
Composite action that posts a short Slack message for **one** job’s conclusion: a header (job name + status emoji), the raw status, and a link to the workflow run. Optionally replies in an existing thread (`slack_thread_ts`).
44

5-
```yaml
6-
message_title: Optimism Goerli
7-
github_job_name_regex: ^Optimism Goerli (?<cap>.*?) Tests$ # Note that the regex MUST have a capturing group named "cap"
8-
```
9-
10-
![example](image.png)
5+
Use it from a **follow-up job** that `needs` the job you care about and runs with `if: always()` so failures still notify.
116

127
## Inputs
138

9+
| Input | Required | Description |
10+
|-------|----------|-------------|
11+
| `status` | Yes | Conclusion string, e.g. `success`, `failure`, `cancelled`, `skipped`. Often `needs.<job_id>.result`. |
12+
| `job_name` | Yes | Label shown in the Slack header. |
13+
| `run_url` | Yes | URL to the workflow run. E.g. `format('{0}/{1}/actions/runs/{2}', github.server_url, github.repository, github.run_id)`. |
14+
| `slack_thread_ts` | No | If set, the message is posted in that thread; if empty, it posts to the channel. |
15+
| `slack_bot_token` | Yes | Bot token with `chat:write` (and channel access). |
16+
| `slack_channel_id` | Yes | Channel ID for `chat.postMessage`. |
17+
18+
Status is mapped to emoji: success ✅, failure ❌, cancelled ⚠️, skipped ⏭️, unknown ❔.
19+
20+
## Example
21+
1422
```yaml
15-
inputs:
16-
github_token:
17-
description: "The GitHub token to use for authentication (usually ${{ github.token }})"
18-
required: true
19-
github_repository:
20-
description: "The GitHub owner/repository to use for authentication (usually ${{ github.repository }}))"
21-
required: true
22-
workflow_run_id:
23-
description: "The workflow run ID to get the results from (usually ${{ github.run_id }})"
24-
required: true
25-
github_job_name_regex:
26-
description: "The regex to use to match 1..many job name(s) to collect results from. Should include a capture group named 'cap' for the part of the job name you want to display in the Slack message (e.g. ^Client Compatability Test (?<cap>.*?)$)"
27-
required: true
28-
message_title:
29-
description: "The title of the Slack message"
30-
required: true
31-
slack_channel_id:
32-
description: "The Slack channel ID to post the message to"
33-
required: true
34-
slack_thread_ts:
35-
description: "The Slack thread timestamp to post the message to, handy for keeping multiple related results in a single thread"
36-
required: false
23+
jobs:
24+
tests:
25+
runs-on: ubuntu-latest
26+
steps:
27+
- run: ./run-tests.sh
28+
29+
notify:
30+
runs-on: ubuntu-latest
31+
needs: [tests]
32+
if: always()
33+
steps:
34+
- uses: ./.github/actions/notify-slack-jobs-result
35+
with:
36+
status: ${{ needs.tests.result }}
37+
job_name: "Smoke tests"
38+
run_url: ${{ format('{0}/{1}/actions/runs/{2}', github.server_url, github.repository, github.run_id) }}
39+
slack_thread_ts: ${{ inputs.slack_thread_ts }} # optional
40+
slack_bot_token: ${{ secrets.SLACK_BOT_TOKEN }}
41+
slack_channel_id: ${{ secrets.SLACK_CHANNEL_ID }}
3742
```
43+
44+
Implementation detail: the action builds a Block Kit payload with `jq` and sends it via [`slackapi/slack-github-action`](https://github.com/slackapi/slack-github-action) (`chat.postMessage`).
Lines changed: 71 additions & 104 deletions
Original file line numberDiff line numberDiff line change
@@ -1,126 +1,93 @@
11
name: Notify Slack Jobs Result
2-
description: Will send a notification in Slack for the result of a GitHub action run, typically for test results
2+
description: Posts a compact Slack notification for a workflow job result
3+
(status, job name, link to run, slack_channel_id and slack_bot_token).
34
inputs:
4-
github_token:
5-
description: "The GitHub token to use for authentication (usually github.token)"
5+
status:
6+
description: "Job conclusion, e.g. success, failure, cancelled, skipped
7+
(typically needs.<job>.result)"
68
required: true
7-
github_repository:
8-
description: "The GitHub owner/repository to use for authentication (usually github.repository))"
9+
job_name:
10+
description: "Display name for the job in the message"
911
required: true
10-
workflow_run_id:
11-
description: "The workflow run ID to get the results from (usually github.run_id)"
12-
required: true
13-
github_job_name_regex:
14-
description: "The regex to use to match 1..many job name(s) to collect results from. Should include a capture group named 'cap' for the part of the job name you want to display in the Slack message (e.g. ^Client Compatability Test (?<cap>.*?)$)"
15-
required: true
16-
message_title:
17-
description: "The title of the Slack message"
12+
run_url:
13+
description: "URL to the workflow run (e.g.
14+
format('https://github.com/{0}/actions/runs/{1}', github.repository,
15+
github.run_id))"
1816
required: true
17+
slack_thread_ts:
18+
description: "Optional Slack thread timestamp to reply in a thread"
19+
required: false
20+
default: ""
1921
slack_channel_id:
20-
description: "The Slack channel ID to post the message to"
22+
description: "Slack channel ID to post to"
2123
required: true
2224
slack_bot_token:
23-
description: "The Slack bot token to use for authentication which needs permission and an installed app in the channel"
25+
description: "Slack bot token to use for posting"
2426
required: true
25-
slack_thread_ts:
26-
description: "The Slack thread timestamp to post the message to, handy for keeping multiple related results in a single thread"
27-
required: false
28-
base64_parsed_results:
29-
description: "Base64 encoded parsed results to use"
30-
required: false
3127

3228
runs:
3329
using: composite
3430
steps:
35-
- name: Get Results
31+
- name: Build Slack payload
32+
id: slack-payload
3633
shell: bash
37-
id: test-results
34+
env:
35+
STATUS: ${{ inputs.status }}
36+
JOB_NAME: ${{ inputs.job_name }}
37+
RUN_URL: ${{ inputs.run_url }}
38+
THREAD_TS: ${{ inputs.slack_thread_ts }}
39+
SLACK_CHANNEL_ID: ${{ inputs.slack_channel_id }}
3840
run: |
39-
if [ -n "${{ inputs.base64_parsed_results }}" ]; then
40-
echo "Using base64 parsed results"
41-
PARSED_RESULTS=$(echo "${{ inputs.base64_parsed_results }}" | base64 -d)
42-
else
43-
go install github.com/smartcontractkit/chainlink-testing-framework/tools/workflowresultparser@v1.0.0
44-
PATH=$PATH:$(go env GOPATH)/bin
45-
export PATH
46-
47-
workflowresultparser -workflowRunID ${{ inputs.workflow_run_id }} -githubToken ${{ inputs.github_token }} -githubRepo "${{ inputs.github_repository }}" -jobNameRegex "${{ inputs.github_job_name_regex }}" -outputFile=output.json
48-
49-
if [ ! -f output.json ]; then
50-
PARSED_RESULTS='""'
51-
else
52-
PARSED_RESULTS=$(cat output.json | jq -c "select(has(\"results\")) | .results[]")
53-
fi
54-
55-
fi
56-
57-
echo "Parsed Results:"
58-
echo $PARSED_RESULTS
59-
60-
ALL_SUCCESS=true
61-
62-
if [ "$PARSED_RESULTS" != '""' ]; then
63-
echo "Checking for failures"
64-
echo "$PARSED_RESULTS" | jq -s | jq -r '.[] | select(.conclusion != ":white_check_mark:")'
65-
for row in $(echo "$PARSED_RESULTS" | jq -s | jq -r '.[] | select(.conclusion != ":white_check_mark:")'); do
66-
ALL_SUCCESS=false
67-
break
68-
done
69-
echo "Success: $ALL_SUCCESS"
70-
71-
echo all_success=$ALL_SUCCESS >> $GITHUB_OUTPUT
72-
73-
FORMATTED_RESULTS=$(echo $PARSED_RESULTS | jq -s '[.[]
74-
| {
75-
conclusion: .conclusion,
76-
cap: .cap,
77-
html_url: .html_url
78-
}
79-
]
80-
| map("{\"type\": \"section\", \"text\": {\"type\": \"mrkdwn\", \"text\": \"<\(.html_url)|\(.cap)>: \(.conclusion)\"}}")
81-
| join(",")')
82-
else
83-
echo "Nothing to post, no results found"
84-
exit 0
85-
fi
86-
87-
echo "Formatted Results:"
88-
echo $FORMATTED_RESULTS
41+
set -euo pipefail
8942
90-
# Cleans out backslashes and quotes from jq
91-
CLEAN_RESULTS=$(echo "$FORMATTED_RESULTS" | sed 's/\\\"/"/g' | sed 's/^"//;s/"$//')
43+
case "${STATUS}" in
44+
success) EMOJI="✅" ;;
45+
failure) EMOJI="❌" ;;
46+
cancelled) EMOJI="⚠️" ;;
47+
skipped) EMOJI="⏭️" ;;
48+
*) EMOJI="❔" ;;
49+
esac
9250
93-
echo "Clean Results"
94-
echo $CLEAN_RESULTS
51+
PAYLOAD_FILE="${RUNNER_TEMP:-/tmp}/notify-slack-jobs-result.json"
9552
96-
echo results=$CLEAN_RESULTS >> $GITHUB_OUTPUT
97-
- name: Post Results
98-
uses: slackapi/slack-github-action@6c661ce58804a1a20f6dc5fbee7f0381b469e001 # v1.25.0
99-
if: steps.test-results.outputs.results != ''
100-
env:
101-
SLACK_BOT_TOKEN: ${{ inputs.slack_bot_token }}
102-
with:
103-
channel-id: ${{ inputs.slack_channel_id }}
104-
payload: |
105-
{
106-
"thread_ts": "${{ inputs.slack_thread_ts }}",
107-
"attachments": [
53+
jq -n \
54+
--arg channel "${SLACK_CHANNEL_ID}" \
55+
--arg job "$JOB_NAME" \
56+
--arg emoji "$EMOJI" \
57+
--arg status "$STATUS" \
58+
--arg url "$RUN_URL" \
59+
--arg thread "$THREAD_TS" \
60+
--arg text "${JOB_NAME} — ${STATUS}" \
61+
'{
62+
channel: $channel,
63+
text: $text,
64+
blocks: [
65+
{
66+
type: "header",
67+
text: {
68+
type: "plain_text",
69+
text: ($job + " " + $emoji),
70+
emoji: true
71+
}
72+
},
10873
{
109-
"color": "${{ steps.test-results.outputs.all_success == 'true' && '#2E7D32' || '#C62828' }}",
110-
"blocks": [
111-
{
112-
"type": "header",
113-
"text": {
114-
"type": "plain_text",
115-
"text": "${{ inputs.message_title }} ${{ steps.test-results.outputs.all_success == 'true' && ':white_check_mark:' || ':x:'}}",
116-
"emoji": true
117-
}
118-
},
119-
{
120-
"type": "divider"
121-
},
122-
${{ steps.test-results.outputs.results }}
123-
]
74+
type: "section",
75+
text: {
76+
type: "mrkdwn",
77+
text: ("Status: `" + $status + "`\n<" + $url + "|View workflow run>")
78+
}
12479
}
12580
]
12681
}
82+
| if $thread != "" then .thread_ts = $thread else . end' \
83+
> "$PAYLOAD_FILE"
84+
85+
echo "file=$PAYLOAD_FILE" >> "$GITHUB_OUTPUT"
86+
87+
- name: Post to Slack
88+
uses: slackapi/slack-github-action@485a9d42d3a73031f12ec201c457e2162c45d02d # v2.0.0
89+
with:
90+
errors: "true"
91+
method: chat.postMessage
92+
token: ${{ inputs.slack_bot_token }}
93+
payload-file-path: ${{ steps.slack-payload.outputs.file }}

.github/actions/setup-go/action.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -59,13 +59,13 @@ runs:
5959
shell: bash
6060
id: go-cache-dir
6161
run: |
62-
echo "gomodcache=$(go env GOMODCACHE)" >> $GITHUB_OUTPUT
63-
echo "gobuildcache=$(go env GOCACHE)" >> $GITHUB_OUTPUT
62+
echo "gomodcache=$(go env GOMODCACHE)" >> "${GITHUB_OUTPUT}"
63+
echo "gobuildcache=$(go env GOCACHE)" >> "${GITHUB_OUTPUT}"
6464
6565
- name: Set go module path
6666
id: go-module-path
6767
shell: bash
68-
run: echo "path=./${{ inputs.go-module-file }}" >> $GITHUB_OUTPUT
68+
run: echo "path=./${{ inputs.go-module-file }}" >> "${GITHUB_OUTPUT}"
6969

7070
# By default, restore the cache only.
7171
# If multiple jobs call actions/cache, then only one will get priority to create upon a cache miss.
@@ -144,7 +144,7 @@ runs:
144144
KEY_PREFIX="${RUNNER_OS}-gobuild-${CACHE_VERSION}"
145145
146146
PRIMARY_KEY="${KEY_PREFIX}-${CURRENT_BRANCH}-${SHORT_SHA}"
147-
echo "primary-key=${PRIMARY_KEY}" >> $GITHUB_OUTPUT
147+
echo "primary-key=${PRIMARY_KEY}" >> "${GITHUB_OUTPUT}"
148148
149149
if [ "$CURRENT_BRANCH" = "$DEFAULT_BRANCH" ]; then
150150
exit 0
@@ -153,8 +153,8 @@ runs:
153153
SECONDARY_KEY="${KEY_PREFIX}-${CURRENT_BRANCH}-"
154154
DEVELOP_KEY="${RUNNER_OS}-gobuild-${CACHE_VERSION}-${DEFAULT_BRANCH}-"
155155
156-
echo "secondary-key=${SECONDARY_KEY}" >> $GITHUB_OUTPUT
157-
echo "develop-key=${DEVELOP_KEY}" >> $GITHUB_OUTPUT
156+
echo "secondary-key=${SECONDARY_KEY}" >> "${GITHUB_OUTPUT}"
157+
echo "develop-key=${DEVELOP_KEY}" >> "${GITHUB_OUTPUT}"
158158
159159
# 3. Restore the build cache
160160
# ---

.github/actions/setup-solana/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,4 @@ runs:
2424

2525
- name: Export solana path to env
2626
shell: bash
27-
run: echo "PATH=$HOME/.local/share/solana/install/active_release/bin:$PATH" >> $GITHUB_ENV
27+
run: echo "PATH=$HOME/.local/share/solana/install/active_release/bin:$PATH" >> "${GITHUB_ENV}"

0 commit comments

Comments
 (0)