Skip to content

Commit 3308520

Browse files
authored
Merge branch 'master' into master
2 parents 62564da + 2da8b24 commit 3308520

File tree

165 files changed

+1393
-846
lines changed

Some content is hidden

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

165 files changed

+1393
-846
lines changed

.github/actions/setup/action.yml

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,10 @@ inputs:
2424
required: false
2525
default: false
2626
description: "Install cue."
27+
libsasl2:
28+
required: false
29+
default: false
30+
description: "Install libsasl2." # Required to fully build Vector
2731

2832
# prepare.sh - rust
2933
rust: # rustup module
@@ -155,7 +159,7 @@ runs:
155159
${{ runner.os }}-cargo-
156160
157161
- name: Install mold
158-
if: ${{ inputs.mold == 'true' || env.VDEV_NEEDS_COMPILE == 'true' }}
162+
if: ${{ runner.os == 'Linux' && env.DISABLE_MOLD != 'true' && (inputs.mold == 'true' || env.VDEV_NEEDS_COMPILE == 'true') }}
159163
shell: bash
160164
run: |
161165
echo "Installing mold"
@@ -206,7 +210,11 @@ runs:
206210
shell: bash
207211
run: |
208212
echo "Installing protoc"
209-
sudo bash ./scripts/environment/install-protoc.sh
213+
if [[ "${{ runner.os }}" == "macOS" ]]; then
214+
sudo bash ./scripts/environment/install-protoc.sh /usr/local/bin
215+
else
216+
sudo bash ./scripts/environment/install-protoc.sh
217+
fi
210218
211219
- name: Install cue
212220
if: ${{ inputs.cue == 'true' }}
@@ -223,6 +231,11 @@ runs:
223231
sudo cp "${TEMP}/cue" /usr/bin/cue
224232
rm -rf "$TEMP"
225233
234+
- name: Install libsasl2
235+
if: ${{ inputs.libsasl2 == 'true' }}
236+
shell: bash
237+
run: sudo apt-get update && sudo apt-get install -y libsasl2-dev
238+
226239
- name: Install vdev
227240
if: ${{ inputs.vdev == 'true' }}
228241
uses: ./.github/actions/install-vdev

.github/workflows/changelog.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ on:
1616
merge_group:
1717
types: [checks_requested]
1818

19+
permissions:
20+
contents: read
21+
1922
jobs:
2023
validate-changelog:
2124
permissions:

.github/workflows/ci-review-trigger.yml

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ on:
2929
types: [submitted]
3030

3131
permissions:
32-
statuses: write
32+
contents: read
3333

3434
env:
3535
DD_ENV: "ci"
@@ -85,16 +85,18 @@ jobs:
8585
run: exit 1
8686

8787
cli:
88-
needs: validate
8988
if: startsWith(github.event.review.body, '/ci-run-all') || contains(github.event.review.body, '/ci-run-cli')
9089
uses: ./.github/workflows/cli.yml
90+
with:
91+
ref: ${{ github.event.review.commit_id }}
9192
secrets: inherit
9293

9394
make-test-behavior:
9495
needs: validate
9596
if: startsWith(github.event.review.body, '/ci-run-all') || contains(github.event.review.body, '/ci-run-test-behavior')
9697
uses: ./.github/workflows/test-make-command.yml
9798
with:
99+
ref: ${{ github.event.review.commit_id }}
98100
command: test-behavior
99101
job_name: make test-behavior
100102
secrets: inherit
@@ -104,6 +106,7 @@ jobs:
104106
if: startsWith(github.event.review.body, '/ci-run-all') || contains(github.event.review.body, '/ci-run-check-examples')
105107
uses: ./.github/workflows/test-make-command.yml
106108
with:
109+
ref: ${{ github.event.review.commit_id }}
107110
command: check-examples
108111
job_name: make check-examples
109112
secrets: inherit
@@ -113,6 +116,7 @@ jobs:
113116
if: startsWith(github.event.review.body, '/ci-run-all') || contains(github.event.review.body, '/ci-run-test-docs')
114117
uses: ./.github/workflows/test-make-command.yml
115118
with:
119+
ref: ${{ github.event.review.commit_id }}
116120
command: test-docs
117121
job_name: make test-docs
118122
secrets: inherit
@@ -121,40 +125,54 @@ jobs:
121125
needs: validate
122126
if: startsWith(github.event.review.body, '/ci-run-all') || contains(github.event.review.body, '/ci-run-deny')
123127
uses: ./.github/workflows/deny.yml
128+
with:
129+
ref: ${{ github.event.review.commit_id }}
124130
secrets: inherit
125131

126132
component-features:
127133
needs: validate
128134
if: startsWith(github.event.review.body, '/ci-run-all') || contains(github.event.review.body, '/ci-run-component-features')
129135
uses: ./.github/workflows/component_features.yml
136+
with:
137+
ref: ${{ github.event.review.commit_id }}
130138
secrets: inherit
131139

132140
cross:
133141
needs: validate
134142
if: startsWith(github.event.review.body, '/ci-run-all') || contains(github.event.review.body, '/ci-run-cross')
135143
uses: ./.github/workflows/cross.yml
144+
with:
145+
ref: ${{ github.event.review.commit_id }}
136146
secrets: inherit
137147

138148
unit-mac:
139149
needs: validate
140150
if: startsWith(github.event.review.body, '/ci-run-all') || contains(github.event.review.body, '/ci-run-unit-mac')
141151
uses: ./.github/workflows/unit_mac.yml
152+
with:
153+
ref: ${{ github.event.review.commit_id }}
142154
secrets: inherit
143155

144156
unit-windows:
145157
needs: validate
146158
if: startsWith(github.event.review.body, '/ci-run-all') || contains(github.event.review.body, '/ci-run-unit-windows')
147159
uses: ./.github/workflows/unit_windows.yml
160+
with:
161+
ref: ${{ github.event.review.commit_id }}
148162
secrets: inherit
149163

150164
environment:
151165
needs: validate
152166
if: startsWith(github.event.review.body, '/ci-run-all') || contains(github.event.review.body, '/ci-run-environment')
153167
uses: ./.github/workflows/environment.yml
168+
with:
169+
ref: ${{ github.event.review.commit_id }}
154170
secrets: inherit
155171

156172
k8s:
157173
needs: validate
158174
if: startsWith(github.event.review.body, '/ci-run-all') || contains(github.event.review.body, '/ci-run-k8s')
159175
uses: ./.github/workflows/k8s_e2e.yml
176+
with:
177+
ref: ${{ github.event.review.commit_id }}
160178
secrets: inherit

.github/workflows/cleanup-ghcr-images.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ on:
1313
- cron: '0 2 * * 0'
1414
workflow_dispatch:
1515

16+
permissions:
17+
contents: read
18+
1619
jobs:
1720
cleanup:
1821
runs-on: ubuntu-latest

.github/workflows/cli.yml

Lines changed: 13 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -2,61 +2,30 @@ name: CLI - Linux
22

33
on:
44
workflow_call:
5+
inputs:
6+
ref:
7+
description: 'Git ref to checkout'
8+
required: false
9+
type: string
510

611
permissions:
7-
statuses: write
12+
contents: read
813

914
jobs:
1015
test-cli:
1116
runs-on: ubuntu-24.04
1217
timeout-minutes: 30
13-
env:
14-
CARGO_INCREMENTAL: 0
1518
steps:
16-
- name: (PR review) Set latest commit status as pending
17-
if: ${{ github.event_name == 'pull_request_review' }}
18-
uses: myrotvorets/set-commit-status-action@3730c0a348a2ace3c110851bed53331bc6406e9f # v2.0.1
19+
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
1920
with:
20-
sha: ${{ github.event.review.commit_id }}
21-
token: ${{ secrets.GITHUB_TOKEN }}
22-
context: CLI - Linux
23-
status: pending
24-
25-
- name: (PR review) Checkout review SHA
26-
if: ${{ github.event_name == 'pull_request_review' }}
27-
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
28-
with:
29-
ref: ${{ github.event.review.commit_id }}
30-
31-
- name: Checkout branch
32-
if: ${{ github.event_name != 'pull_request_review' }}
33-
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
34-
35-
- name: Cache Cargo registry + index
36-
uses: actions/cache@9255dc7a253b0ccc959486e2bca901246202afeb # v5.0.1
21+
ref: ${{ inputs.ref }}
22+
- uses: ./.github/actions/setup
3723
with:
38-
path: |
39-
~/.cargo/bin/
40-
~/.cargo/registry/index/
41-
~/.cargo/registry/cache/
42-
~/.cargo/git/db/
43-
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
44-
restore-keys: |
45-
${{ runner.os }}-cargo-
46-
47-
- run: sudo -E bash scripts/environment/bootstrap-ubuntu-24.04.sh
48-
- run: bash scripts/environment/prepare.sh --modules=cargo-nextest,datadog-ci
49-
- run: echo "::add-matcher::.github/matchers/rust.json"
24+
rust: true
25+
cargo-nextest: true
26+
protoc: true
27+
datadog-ci: true
5028
- run: make test-cli
5129
- name: Upload test results
5230
run: scripts/upload-test-results.sh
5331
if: always()
54-
55-
- name: (PR review) Set latest commit status as ${{ job.status }}
56-
uses: myrotvorets/set-commit-status-action@3730c0a348a2ace3c110851bed53331bc6406e9f # v2.0.1
57-
if: always() && github.event_name == 'pull_request_review'
58-
with:
59-
sha: ${{ github.event.review.commit_id }}
60-
token: ${{ secrets.GITHUB_TOKEN }}
61-
context: CLI - Linux
62-
status: ${{ job.status }}

.github/workflows/component_features.yml

Lines changed: 19 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -11,49 +11,39 @@ name: Component Features - Linux
1111

1212
on:
1313
workflow_call:
14+
inputs:
15+
ref:
16+
description: 'Git ref to checkout'
17+
required: false
18+
type: string
1419
workflow_dispatch:
20+
inputs:
21+
ref:
22+
description: 'Git ref to checkout'
23+
required: false
24+
type: string
1525
schedule:
1626
- cron: '0 10 * * 1' # 10:00 UTC Monday (6 AM EST NYC)
1727

1828
permissions:
19-
statuses: write
29+
contents: read
2030

2131
jobs:
2232
check-component-features:
2333
# use free tier on schedule and 8 core to expedite results on demand invocation
2434
runs-on: ${{ github.event_name == 'schedule' && 'ubuntu-24.04' || 'ubuntu-24.04-8core' }}
2535
timeout-minutes: 180 # Usually takes 2h but this prevents it from hanging for an indefinite time
26-
if: github.event_name == 'pull_request_review' || github.event_name == 'workflow_dispatch' || github.event_name == 'schedule'
2736
steps:
28-
- name: (PR review) Set latest commit status as pending
29-
if: github.event_name == 'pull_request_review'
30-
uses: myrotvorets/set-commit-status-action@3730c0a348a2ace3c110851bed53331bc6406e9f # v2.0.1
31-
with:
32-
sha: ${{ github.event.review.commit_id }}
33-
token: ${{ secrets.GITHUB_TOKEN }}
34-
context: Component Features - Linux
35-
status: pending
36-
37-
- name: (PR review) Checkout PR branch
38-
if: github.event_name == 'pull_request_review'
37+
- name: Checkout branch
3938
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
4039
with:
41-
ref: ${{ github.event.review.commit_id }}
40+
ref: ${{ inputs.ref }}
4241

43-
- name: Checkout branch
44-
if: github.event_name != 'pull_request_review'
45-
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
42+
- uses: ./.github/actions/setup
43+
with:
44+
rust: true
45+
cargo-nextest: true
46+
protoc: true
47+
libsasl2: true
4648

47-
- run: sudo -E bash scripts/environment/bootstrap-ubuntu-24.04.sh
48-
- run: bash scripts/environment/prepare.sh --modules=rustup
49-
- run: echo "::add-matcher::.github/matchers/rust.json"
5049
- run: make check-component-features
51-
52-
- name: (PR review) Set latest commit status as ${{ job.status }}
53-
if: always() && github.event_name == 'pull_request_review'
54-
uses: myrotvorets/set-commit-status-action@3730c0a348a2ace3c110851bed53331bc6406e9f # v2.0.1
55-
with:
56-
sha: ${{ github.event.review.commit_id }}
57-
token: ${{ secrets.GITHUB_TOKEN }}
58-
context: Component Features - Linux
59-
status: ${{ job.status }}

.github/workflows/cross.yml

Lines changed: 8 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,14 @@ name: Cross
22

33
on:
44
workflow_call:
5+
inputs:
6+
ref:
7+
description: 'Git ref to checkout'
8+
required: false
9+
type: string
510

611
permissions:
7-
statuses: write
12+
contents: read
813

914
jobs:
1015
cross-linux:
@@ -25,24 +30,10 @@ jobs:
2530
- arm-unknown-linux-gnueabi
2631
- arm-unknown-linux-musleabi
2732
steps:
28-
- name: (PR review) Set latest commit status as pending
29-
if: ${{ github.event_name == 'pull_request_review' }}
30-
uses: myrotvorets/set-commit-status-action@3730c0a348a2ace3c110851bed53331bc6406e9f # v2.0.1
31-
with:
32-
sha: ${{ github.event.review.commit_id }}
33-
token: ${{ secrets.GITHUB_TOKEN }}
34-
context: Cross
35-
status: pending
36-
37-
- name: (PR review) Checkout PR branch
38-
if: ${{ github.event_name == 'pull_request_review' }}
39-
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
40-
with:
41-
ref: ${{ github.event.review.commit_id }}
42-
4333
- name: Checkout branch
44-
if: ${{ github.event_name != 'pull_request_review' }}
4534
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
35+
with:
36+
ref: ${{ inputs.ref }}
4637

4738
- uses: actions/cache@9255dc7a253b0ccc959486e2bca901246202afeb # v5.0.1
4839
name: Cache Cargo registry + index
@@ -68,27 +59,3 @@ jobs:
6859
with:
6960
name: "vector-debug-${{ matrix.target }}"
7061
path: "./target/${{ matrix.target }}/debug/vector"
71-
72-
- name: (PR review) Set latest commit status as failed
73-
uses: myrotvorets/set-commit-status-action@3730c0a348a2ace3c110851bed53331bc6406e9f # v2.0.1
74-
if: failure() && github.event_name == 'pull_request_review'
75-
with:
76-
sha: ${{ steps.comment-branch.outputs.head_sha }}
77-
token: ${{ secrets.GITHUB_TOKEN }}
78-
context: Cross
79-
status: 'failure'
80-
81-
update-pr-status:
82-
name: (PR review) Signal result to PR
83-
runs-on: ubuntu-24.04
84-
timeout-minutes: 5
85-
needs: cross-linux
86-
if: needs.cross-linux.result == 'success' && github.event_name == 'pull_request_review'
87-
steps:
88-
- name: (PR review) Submit PR result as success
89-
uses: myrotvorets/set-commit-status-action@3730c0a348a2ace3c110851bed53331bc6406e9f # v2.0.1
90-
with:
91-
sha: ${{ github.event.review.commit_id }}
92-
token: ${{ secrets.GITHUB_TOKEN }}
93-
context: Cross
94-
status: 'success'

0 commit comments

Comments
 (0)