Skip to content

Revert "aws_sqs: enforce 256 KB message and batch size limits (#4048)… #46253

Revert "aws_sqs: enforce 256 KB message and batch size limits (#4048)…

Revert "aws_sqs: enforce 256 KB message and batch size limits (#4048)… #46253

Workflow file for this run

name: Test
on:
push:
branches:
- main
pull_request:
jobs:
test:
if: ${{ github.repository == 'redpanda-data/connect' || github.event_name != 'schedule' }}
runs-on: ubuntu-latest
env:
CGO_ENABLED: 0
steps:
- name: Checkout code
uses: actions/checkout@v6
- name: Install Go
uses: actions/setup-go@v6
with:
go-version-file: 'go.mod'
- name: Install dependencies for x_benthos_extra
run: |
sudo apt update -y
sudo apt install -y --no-install-recommends libzmq3-dev
- name: Install Task
uses: ./.github/actions/setup-task
- name: Free disk space
run: |
sudo rm -rf /usr/share/dotnet
sudo rm -rf /usr/local/lib/android
sudo rm -rf /opt/ghc
sudo rm -rf /usr/local/.ghcup
sudo rm -rf /usr/share/swift
sudo rm -rf /usr/local/share/powershell
sudo docker image prune --all --force
- name: Deps
run: task deps && git diff HEAD -- go.mod go.sum && git diff-index HEAD --exit-code
- name: Docs
run: CGO_ENABLED=1 TAGS=x_benthos_extra task docs && test -z "$(git ls-files --others --modified --exclude-standard)" || { >&2 echo "Stale docs detected. This can be fixed with 'task docs'."; exit 1; }
- name: Test
run: task test
golangci-lint:
if: ${{ github.repository == 'redpanda-data/connect' || github.event_name != 'schedule' }}
runs-on: ubuntu-latest
env:
CGO_ENABLED: 0
steps:
- name: Checkout code
uses: actions/checkout@v6
- name: Install Go
uses: actions/setup-go@v6
with:
go-version-file: 'go.mod'
- name: Set version env variables
run: |
cat .versions >> $GITHUB_ENV
- name: Lint
uses: golangci/golangci-lint-action@v9
with:
version: "v${{env.GOLANGCI_LINT_VERSION}}"
args: "--timeout=30m cmd/... internal/... public/..."
skip-cache: true
skip-save-cache: true
# Runs integration tests for any internal/impl/* packages changed in this PR.
#
# Trigger: add the 'run-integration-tests' label to the PR.
# The label is checked at job start — if added after the workflow triggered,
# re-run the workflow (or push a new commit) to pick it up.
#
# Package detection: diffs HEAD against the PR base branch and extracts
# unique affected internal/impl/* package directories. Tests run sequentially.
integration-test:
if: |
github.event_name == 'pull_request' &&
contains(github.event.pull_request.labels.*.name, 'run-integration-tests')
environment: integration-tests
runs-on: ubuntu-latest-32
env:
CGO_ENABLED: 0
steps:
- name: Checkout code
uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Install Go
uses: actions/setup-go@v6
with:
go-version-file: "go.mod"
- name: Install Task
uses: ./.github/actions/setup-task
- name: Pull Latest Redpanda Image
run: task docker:pull-redpanda
- name: Run Integration Tests
run: |
mapfile -t pkgs < <(
git diff --name-only "$(git merge-base HEAD origin/${{ github.base_ref }})"...HEAD \
| { grep '^internal/impl/' || true; } \
| sed 's|/[^/]*$||' \
| sort -u
)
failed=0
for pkg in "${pkgs[@]}"; do
task test:integration-package PKG="./$pkg/..." || failed=1
done
exit $failed
# 30m total: normally a single package is changed per PR, so 15m per-package
# timeout plus overhead fits comfortably. Keeps CI fast-failing instead of
# hanging for hours when Docker networking is degraded.
timeout-minutes: 30
test-push-to-cloudsmith:
if: ${{ github.repository == 'redpanda-data/connect' || github.event_name != 'schedule' }}
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v6
- name: Mock cloudsmith cli
run: |
echo '#!/bin/bash' >cloudsmith
echo "echo \$@" >>cloudsmith
chmod +x cloudsmith
mv cloudsmith /usr/local/bin/
- name: Test GA
env:
CLOUDSMITH_API_KEY: thisisatest
run: |
test $(./resources/scripts/push_pkg_to_cloudsmith.sh artifact.deb 0.0.0 \
| grep "push deb redpanda/redpanda/" | wc -l) -eq 1
test $(./resources/scripts/push_pkg_to_cloudsmith.sh artifact.deb v0.0.0 \
| grep "push deb redpanda/redpanda/" | wc -l) -eq 1
- name: Test RC
env:
CLOUDSMITH_API_KEY: thisisatest
run: |
test $(./resources/scripts/push_pkg_to_cloudsmith.sh artifact.deb 0.0.0-rc1 \
| grep "push deb redpanda/redpanda-unstable/" | wc -l) -eq 1
test $(./resources/scripts/push_pkg_to_cloudsmith.sh artifact.deb v0.0.0-rc1 \
| grep "push deb redpanda/redpanda-unstable/" | wc -l) -eq 1