Skip to content

Commit e341811

Browse files
committed
Merge branch 'master' into powerumc/odbc-source
# Conflicts: # scripts/integration/Dockerfile
2 parents af3fd51 + 22cb8c5 commit e341811

File tree

191 files changed

+1701
-773
lines changed

Some content is hidden

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

191 files changed

+1701
-773
lines changed

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ This should help the reviewers give feedback faster and with higher quality. -->
1919
- [ ] No
2020

2121
## Does this PR include user facing changes?
22+
<!-- If this PR alters Vector behavior in any way, for example, it adds a new config field or changes internal metrics it is considered a user facing change.
23+
Changes to CI, website, playground and similar are generally not considered user facing -->
2224

2325
- [ ] Yes. Please add a changelog fragment based on our [guidelines](https://github.com/vectordotdev/vector/blob/master/changelog.d/README.md).
2426
- [ ] No. A maintainer will apply the `no-changelog` label to this PR.

.github/actions/setup/action.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,11 +90,19 @@ runs:
9090
"${{ inputs.wasm-pack }}"; do
9191
if [[ "$val" == "true" ]]; then
9292
rust="true"
93+
break
9394
fi
9495
done
9596
9697
echo "NEEDS_RUST=$rust" >> "$GITHUB_ENV"
9798
99+
if [[ "$rust" == "true" ]]; then
100+
echo "RUST_BACKTRACE=full" >> "$GITHUB_ENV"
101+
# Set nice CI colors
102+
echo "CARGO_TERM_COLOR=always" >> "$GITHUB_ENV"
103+
fi
104+
105+
98106
- name: Enable rust matcher
99107
if: ${{ env.NEEDS_RUST == 'true' }}
100108
run: echo "::add-matcher::.github/matchers/rust.json"

.github/actions/spelling/allow.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -554,3 +554,4 @@ zst
554554
zstandard
555555
ZTE
556556
Zync
557+
sighup

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

Lines changed: 26 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ on:
3434

3535
permissions:
3636
statuses: write
37+
packages: write
3738

3839
env:
3940
AXIOM_TOKEN: ${{ secrets.AXIOM_TOKEN }}
@@ -80,8 +81,17 @@ jobs:
8081
token: ${{ secrets.GITHUB_TOKEN }}
8182
status: pending
8283

83-
integration-tests:
84+
build-test-runner:
8485
needs: prep-pr
86+
uses: ./.github/workflows/build-test-runner.yml
87+
with:
88+
commit_sha: ${{ github.event.review.commit_id }}
89+
checkout_ref: ${{ github.event.review.commit_id }}
90+
91+
integration-tests:
92+
needs:
93+
- prep-pr
94+
- build-test-runner
8595
runs-on: ubuntu-24.04
8696
timeout-minutes: 90
8797
strategy:
@@ -99,9 +109,13 @@ jobs:
99109
submodules: "recursive"
100110
ref: ${{ github.event.review.commit_id }}
101111

102-
- run: bash scripts/environment/prepare.sh --modules=datadog-ci
112+
- name: Pull test runner image
113+
uses: ./.github/actions/pull-test-runner
114+
with:
115+
github_token: ${{ secrets.GITHUB_TOKEN }}
116+
commit_sha: ${{ github.event.review.commit_id }}
103117

104-
- run: docker image prune -af ; docker container prune -f
118+
- run: bash scripts/environment/prepare.sh --modules=datadog-ci
105119

106120
- name: Integration Tests - ${{ matrix.service }}
107121
if: ${{ startsWith(github.event.review.body, '/ci-run-integration-all')
@@ -114,7 +128,9 @@ jobs:
114128
command: bash scripts/run-integration-test.sh int ${{ matrix.service }}
115129

116130
e2e-tests:
117-
needs: prep-pr
131+
needs:
132+
- prep-pr
133+
- build-test-runner
118134
runs-on: ubuntu-24.04-8core
119135
timeout-minutes: 30
120136
steps:
@@ -123,9 +139,14 @@ jobs:
123139
submodules: "recursive"
124140
ref: ${{ github.event.review.commit_id }}
125141

142+
- name: Pull test runner image
143+
uses: ./.github/actions/pull-test-runner
144+
with:
145+
github_token: ${{ secrets.GITHUB_TOKEN }}
146+
commit_sha: ${{ github.event.review.commit_id }}
147+
126148
- run: bash scripts/environment/prepare.sh --modules=datadog-ci
127149

128-
- run: docker image prune -af ; docker container prune -f
129150
- name: e2e-datadog-logs
130151
if: ${{ startsWith(github.event.review.body, '/ci-run-e2e-datadog-logs')
131152
|| startsWith(github.event.review.body, '/ci-run-e2e-all')

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

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,6 @@ env:
3838
VERBOSE: true
3939
CI: true
4040
PROFILE: debug
41-
# observing issues fetching boringssl via HTTPS in the OSX build, seeing if this helps
42-
# can be removed when we switch back to the upstream openssl-sys crate
43-
CARGO_NET_GIT_FETCH_WITH_CLI: true
4441

4542
# The below concurrency group settings would let us cancel in progress runs that were triggered with the
4643
# same comment on a given PR, which could save on time consuming runs.
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# Cleanup GHCR Images
2+
#
3+
# This workflow cleans up old images from GitHub Container Registry
4+
# to prevent unlimited storage growth. It runs weekly and removes:
5+
# 1. Untagged images from all packages (intermediate build artifacts)
6+
# 2. Old test-runner versions (keeps 50 most recent, deletes up to 50 oldest)
7+
8+
name: Cleanup Untagged GHCR Images
9+
10+
on:
11+
schedule:
12+
# Run weekly on Sundays at 2 AM UTC
13+
- cron: '0 2 * * 0'
14+
workflow_dispatch:
15+
16+
jobs:
17+
cleanup:
18+
runs-on: ubuntu-latest
19+
permissions:
20+
packages: write
21+
contents: read
22+
steps:
23+
- name: Delete untagged vector images
24+
uses: actions/delete-package-versions@e5bc658cc4c965c472efe991f8beea3981499c55 # v5.0.0
25+
with:
26+
package-name: vector
27+
package-type: container
28+
min-versions-to-keep: 0
29+
delete-only-untagged-versions: true
30+
continue-on-error: true
31+
32+
- name: Delete old vector-test-runner images
33+
uses: actions/delete-package-versions@e5bc658cc4c965c472efe991f8beea3981499c55 # v5.0.0
34+
with:
35+
package-name: test-runner
36+
package-type: container
37+
min-versions-to-keep: 5
38+
num-old-versions-to-delete: 50

.github/workflows/environment.yml

Lines changed: 34 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,18 @@ name: Environment Suite
33
on:
44
workflow_call:
55
workflow_dispatch:
6+
inputs:
7+
push:
8+
description: "Push image when manually triggered"
9+
type: boolean
10+
default: false
611
schedule:
712
- cron: '0 6 * * 1' # Every Monday at 06:00 UTC
813

914
env:
1015
VERBOSE: true
1116
CI: true
17+
SHOULD_PUBLISH: ${{ (github.event_name != 'workflow_dispatch' && github.ref == 'refs/heads/master') || (github.event_name == 'workflow_dispatch' && github.event.inputs.push == 'true') }}
1218

1319
permissions:
1420
statuses: write
@@ -43,7 +49,7 @@ jobs:
4349
uses: docker/setup-buildx-action@e468171a9de216ec08956ac3ada2f0791b6bd435 # v3.11.1
4450
- name: Login to DockerHub
4551
uses: docker/login-action@5e57cd118135c172c3672efd75eb46360885c0ef # v3.6.0
46-
if: github.ref == 'refs/heads/master'
52+
if: env.SHOULD_PUBLISH == 'true'
4753
with:
4854
username: ${{ secrets.CI_DOCKER_USERNAME }}
4955
password: ${{ secrets.CI_DOCKER_PASSWORD }}
@@ -60,12 +66,37 @@ jobs:
6066
org.opencontainers.image.source=https://github.com/vectordotdev/vector/tree/master/scripts/environment/Dockerfile
6167
org.opencontainers.image.title=Vector development environment
6268
org.opencontainers.image.url=https://github.com/vectordotdev/vector
63-
- name: Build and push
69+
70+
- name: Free disk space
71+
shell: bash
72+
run: sudo -E bash scripts/ci-free-disk-space.sh
73+
74+
- name: Build image (no push)
75+
uses: docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83 # v6.18.0
76+
with:
77+
context: .
78+
file: ./scripts/environment/Dockerfile
79+
load: true
80+
tags: ${{ steps.meta.outputs.tags }}
81+
labels: ${{ steps.meta.outputs.labels }}
82+
83+
- name: Test built image
84+
run: |
85+
IMAGE_TAG=$(echo "${{ steps.meta.outputs.tags }}" | head -n1)
86+
echo "Running build test inside container: ${IMAGE_TAG}"
87+
docker run --rm \
88+
-v "${GITHUB_WORKSPACE}:/src" \
89+
-w /src \
90+
"${IMAGE_TAG}" \
91+
cargo run --bin vector -- --version
92+
93+
- name: Push image
94+
if: env.SHOULD_PUBLISH == 'true'
6495
uses: docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83 # v6.18.0
6596
with:
6697
context: .
6798
file: ./scripts/environment/Dockerfile
68-
push: ${{ github.ref == 'refs/heads/master' }}
99+
push: true
69100
tags: ${{ steps.meta.outputs.tags }}
70101
labels: ${{ steps.meta.outputs.labels }}
71102

.github/workflows/integration.yml

Lines changed: 34 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@ concurrency:
1717
group: ${{ github.workflow }}-${{ github.event.number || github.event.merge_group.head_sha }}
1818
cancel-in-progress: true
1919

20+
permissions:
21+
packages: write
22+
contents: read
23+
2024
env:
2125
CONTAINER_TOOL: "docker"
2226
DD_ENV: "ci"
@@ -29,9 +33,6 @@ env:
2933
VERBOSE: true
3034
CI: true
3135
PROFILE: debug
32-
# observing issues fetching boringssl via HTTPS in the OSX build, seeing if this helps
33-
# can be removed when we switch back to the upstream openssl-sys crate
34-
CARGO_NET_GIT_FETCH_WITH_CLI: true
3536

3637
jobs:
3738
changes:
@@ -43,10 +44,26 @@ jobs:
4344
e2e_tests: true
4445
secrets: inherit
4546

47+
build-test-runner:
48+
needs: changes
49+
if: |
50+
${{
51+
github.event_name == 'workflow_dispatch' ||
52+
(github.event_name == 'merge_group' &&
53+
(needs.changes.outputs.dependencies == 'true' ||
54+
needs.changes.outputs.integration-yml == 'true' ||
55+
needs.changes.outputs.int-tests-any == 'true' ||
56+
needs.changes.outputs.e2e-tests-any == 'true'))
57+
}}
58+
uses: ./.github/workflows/build-test-runner.yml
59+
with:
60+
commit_sha: ${{ github.sha }}
61+
4662
integration-tests:
4763
runs-on: ubuntu-24.04-8core
4864
needs:
4965
- changes
66+
- build-test-runner
5067

5168
if: ${{ !failure() && !cancelled() && (github.event_name == 'merge_group' || github.event_name == 'workflow_dispatch') }}
5269
strategy:
@@ -72,6 +89,12 @@ jobs:
7289
with:
7390
name: int_tests_changes
7491

92+
- name: Pull test runner image
93+
uses: ./.github/actions/pull-test-runner
94+
with:
95+
github_token: ${{ secrets.GITHUB_TOKEN }}
96+
commit_sha: ${{ github.sha }}
97+
7598
- name: Run Integration Tests for ${{ matrix.service }}
7699
uses: nick-fields/retry@ce71cc2ab81d554ebbe88c79ab5975992d79ba08 # v3.0.2
77100
with:
@@ -109,6 +132,7 @@ jobs:
109132
runs-on: ubuntu-24.04-8core
110133
needs:
111134
- changes
135+
- build-test-runner
112136
if: ${{ !failure() && !cancelled() && (github.event_name == 'merge_group' || github.event_name == 'workflow_dispatch') }}
113137
strategy:
114138
matrix:
@@ -126,6 +150,12 @@ jobs:
126150
with:
127151
name: e2e_tests_changes
128152

153+
- name: Pull test runner image
154+
uses: ./.github/actions/pull-test-runner
155+
with:
156+
github_token: ${{ secrets.GITHUB_TOKEN }}
157+
commit_sha: ${{ github.sha }}
158+
129159
- name: Run E2E Tests for ${{ matrix.service }}
130160
uses: nick-fields/retry@ce71cc2ab81d554ebbe88c79ab5975992d79ba08 # v3.0.2
131161
with:
@@ -163,6 +193,7 @@ jobs:
163193
runs-on: ubuntu-24.04
164194
if: always()
165195
needs:
196+
- build-test-runner
166197
- integration-tests
167198
- e2e-tests
168199
steps:

.github/workflows/master_merge_queue.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,6 @@ env:
3636
VERBOSE: true
3737
CI: true
3838
PROFILE: debug
39-
# observing issues fetching boringssl via HTTPS in the OSX build, seeing if this helps
40-
# can be removed when we switch back to the upstream openssl-sys crate
41-
CARGO_NET_GIT_FETCH_WITH_CLI: true
4239

4340
jobs:
4441
# This is the entry job which is required for all the actual tests in this workflow.

.github/workflows/msrv.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,6 @@ env:
1313
RUST_BACKTRACE: full
1414
CI: true
1515
PROFILE: debug
16-
# observing issues fetching boringssl via HTTPS in the OSX build, seeing if this helps
17-
# can be removed when we switch back to the upstream openssl-sys crate
18-
CARGO_NET_GIT_FETCH_WITH_CLI: true
1916

2017
jobs:
2118
check-msrv:

0 commit comments

Comments
 (0)