Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
7e7f65c
feat: preliminary podman tests
aldy505 Nov 13, 2025
994b555
fix: use start_service_and_wait_ready for setup s3 nodestore
aldy505 Nov 16, 2025
3891f1d
fix: add 'arm64' into supported docker arch
aldy505 Nov 16, 2025
1a9ca7a
Merge remote-tracking branch 'origin/master' into aldy505/podman-tests
aldy505 Nov 16, 2025
98e0533
chore: put note on container engine output info
aldy505 Nov 16, 2025
7db0d7e
debug: check ulimits value
aldy505 Nov 16, 2025
a2f6744
fix: increase ulimit for podman during bootstrap-snuba
aldy505 Nov 16, 2025
1c82856
fix: use host's ulimit
aldy505 Nov 16, 2025
c4d807b
fix: use --podman-run-args
aldy505 Nov 16, 2025
4856c52
fix: try using single quotes
aldy505 Nov 16, 2025
f7c47bd
fix: don't use equal sign
aldy505 Nov 16, 2025
1fc99c2
fix: it should be before 'run'
aldy505 Nov 16, 2025
db2e44a
fix: continue to set ulimit on GHA
aldy505 Nov 16, 2025
4346415
I give up for today
aldy505 Nov 16, 2025
2f979ae
Merge branch 'master' into aldy505/podman-tests
aldy505 Aug 23, 2026
ec7fe9f
ci: bump to ubuntu-26.04 to use podman-compose v1.5.0 and podman v5.7.0
aldy505 Aug 23, 2026
c8870b0
fix: remove sudden linebreak
aldy505 Aug 23, 2026
ba75c75
fix: wrong comand for apt
aldy505 Aug 23, 2026
dea82a6
ci: increase ulimits
aldy505 Aug 23, 2026
513fda3
chore: figure out github actions
aldy505 Aug 23, 2026
f738faf
fix: always use userns flag
aldy505 Aug 23, 2026
6a83f50
fix: set --userns=keep-id only for specific items
aldy505 Aug 23, 2026
2660d65
fix: use PODMAN_USERNS variable instead of flag
aldy505 Aug 23, 2026
6e2a80a
chore: check host ulimits
aldy505 Aug 23, 2026
a5607e0
chore: adjust crun config
aldy505 Aug 23, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 9 additions & 14 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ jobs:
timeout-minutes: 30
strategy:
matrix:
os: [ubuntu-24.04, ubuntu-24.04-arm]
name: ${{ matrix.os == 'ubuntu-24.04-arm' && 'unit tests (arm64)' || 'unit tests' }}
os: [ubuntu-26.04, ubuntu-26.04-arm]
name: ${{ matrix.os == 'ubuntu-26.04-arm' && 'unit tests (arm64)' || 'unit tests' }}
steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
Expand All @@ -47,7 +47,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-24.04, ubuntu-26.04-arm]
os: [ubuntu-26.04, ubuntu-26.04-arm]
container_engine: ['docker'] # TODO: add 'podman' into the list
compose_profiles: ['feature-complete']
name: ${{ format('integration test{0}{1}{2}', matrix.os == 'ubuntu-26.04-arm' && ' (arm64)' || '', matrix.container_engine == 'podman' && ' (podman)' || '', matrix.compose_profiles == 'errors-only' && ' (errors-only)' || '') }}
Expand All @@ -63,10 +63,7 @@ jobs:
if: matrix.container_engine == 'podman'
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends podman
# TODO: Replace below with podman-compose
# We need this commit to be able to work: https://github.com/containers/podman-compose/commit/8206cc3ea277eee6c2e87d4cd66eba8eae3d44eb
pip3 install --user https://github.com/containers/podman-compose/archive/main.tar.gz
sudo apt-get install -y --no-install-recommends podman podman-compose
echo "PODMAN_COMPOSE_PROVIDER=podman-compose" >> $GITHUB_ENV
echo "PODMAN_COMPOSE_WARNING_LOGS=false" >> $GITHUB_ENV

Expand All @@ -83,10 +80,10 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-24.04, ubuntu-24.04-arm]
container_engine: ['docker'] # TODO: add 'podman' into the list
os: [ubuntu-26.04, ubuntu-26.04-arm]
container_engine: ['docker', 'podman']
compose_profiles: ['errors-only']
name: ${{ format('integration test{0}{1}{2}', matrix.os == 'ubuntu-24.04-arm' && ' (arm64)' || '', matrix.container_engine == 'podman' && ' (podman)' || '', matrix.compose_profiles == 'errors-only' && ' (errors-only)' || '') }}
name: ${{ format('integration test{0}{1}{2}', matrix.os == 'ubuntu-26.04-arm' && ' (arm64)' || '', matrix.container_engine == 'podman' && ' (podman)' || '', matrix.compose_profiles == 'errors-only' && ' (errors-only)' || '') }}
env:
REPORT_SELF_HOSTED_ISSUES: 0
SELF_HOSTED_TESTING_DSN: ${{ vars.SELF_HOSTED_TESTING_DSN }}
Expand All @@ -99,15 +96,13 @@ jobs:
if: matrix.container_engine == 'podman'
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends podman
# TODO: Replace below with podman-compose
# We need this commit to be able to work: https://github.com/containers/podman-compose/commit/8206cc3ea277eee6c2e87d4cd66eba8eae3d44eb
pip3 install --user https://github.com/containers/podman-compose/archive/main.tar.gz
sudo apt-get install -y --no-install-recommends podman podman-compose
echo "PODMAN_COMPOSE_PROVIDER=podman-compose" >> $GITHUB_ENV
echo "PODMAN_COMPOSE_WARNING_LOGS=false" >> $GITHUB_ENV

- name: Use action from local checkout
uses: './'
with:
compose_profiles: ${{ matrix.compose_profiles }}
container_engine: ${{ matrix.container_engine }}
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
68 changes: 61 additions & 7 deletions action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ inputs:
compose_profiles:
required: false
description: "Docker Compose profile to use. Defaults to feature-complete."
container_engine:
required: false
default: docker
no_restore_volume_cache:
required: false
description: "Whether to restore Docker volumes cache after the test run. Defaults to false."
Expand Down Expand Up @@ -89,6 +92,8 @@ runs:

- name: Setup dev environment
shell: bash
env:
CONTAINER_ENGINE: ${{ inputs.container_engine }}
run: |
cd ${{ github.action_path }}

Expand All @@ -105,7 +110,28 @@ runs:
fi
fi

if [ "$CONTAINER_ENGINE" = "podman" ]; then
# See https://github.com/containers/podman-compose/issues/166
echo "PODMAN_USERNS=keep-id" >> $GITHUB_ENV
fi

- name: Configure crun for rootless ulimits
shell: bash
run: |
mkdir -p ~/.config/containers
cat > ~/.config/containers/containers.conf << 'EOF'
[libpod]
runtime = "crun"

[engine]
default_ulimits = {
nofile = ["262144", "262144"],
nproc = ["4096", "4096"]
}
EOF

- name: Compute Docker Volume Cache Keys
if: ${{ inputs.container_engine == 'docker' }}
id: cache_key
shell: bash
run: |
Expand All @@ -119,7 +145,7 @@ runs:
echo "ARCH=$(uname -m)" >> $GITHUB_OUTPUT

- name: Restore Sentry Volume Cache
if: ${{ inputs.no_restore_volume_cache != 'true' }}
if: ${{ inputs.no_restore_volume_cache != 'true' && inputs.container_engine == 'docker' }}
id: restore_cache_sentry
uses: BYK/docker-volume-cache-action/restore@0efa5cf5178c9906cb46ed8d1a357df8fd6b1a06
with:
Expand All @@ -130,7 +156,7 @@ runs:
sentry-postgres

- name: Restore Snuba Volume Cache
if: ${{ inputs.no_restore_volume_cache != 'true' }}
if: ${{ inputs.no_restore_volume_cache != 'true' && inputs.container_engine == 'docker' }}
id: restore_cache_snuba
uses: BYK/docker-volume-cache-action/restore@0efa5cf5178c9906cb46ed8d1a357df8fd6b1a06
with:
Expand All @@ -141,7 +167,7 @@ runs:
sentry-clickhouse

- name: Restore Kafka Volume Cache
if: ${{ inputs.no_restore_volume_cache != 'true' }}
if: ${{ inputs.no_restore_volume_cache != 'true' && inputs.container_engine == 'docker' }}
id: restore_cache_kafka
uses: BYK/docker-volume-cache-action/restore@0efa5cf5178c9906cb46ed8d1a357df8fd6b1a06
with:
Expand All @@ -160,39 +186,49 @@ runs:
# changed. Heats up your head a bit but if you think about it, it makes sense.
SKIP_SENTRY_MIGRATIONS: ${{ steps.restore_cache_sentry.outputs.cache-hit == 'true' && '1' || '' }}
SKIP_SNUBA_MIGRATIONS: ${{ steps.restore_cache_snuba.outputs.cache-hit == 'true' && '1' || '' }}
CONTAINER_ENGINE: ${{ inputs.container_engine }}
DEBUG: ${{ env.ACTIONS_STEP_DEBUG == 'true' }}
shell: bash
run: |
cd ${{ github.action_path }}
# Add some customizations to test that path
cat <<EOT >> sentry/enhance-image.sh
#!/bin/bash
touch /created-by-enhance-image
echo 'debconf debconf/frontend select noninteractive' | debconf-set-selections
apt-get update
apt-get install -y gcc libsasl2-dev python-dev-is-python3 libldap2-dev libssl-dev
apt-get install --yes --no-install-recommends gcc libsasl2-dev python-dev-is-python3 libldap2-dev libssl-dev
EOT
chmod 755 sentry/enhance-image.sh
echo "python-ldap" > sentry/requirements.txt

./install.sh --no-report-self-hosted-issues --skip-commit-check

- name: Save Sentry Volume Cache
if: steps.restore_cache_sentry.outputs.cache-hit != 'true' && inputs.no_restore_volume_cache != 'true'
if: steps.restore_cache_sentry.outputs.cache-hit != 'true' && inputs.no_restore_volume_cache != 'true' && inputs.container_engine == 'docker'
uses: BYK/docker-volume-cache-action/save@0efa5cf5178c9906cb46ed8d1a357df8fd6b1a06
with:
key: ${{ steps.restore_cache_sentry.outputs.cache-primary-key }}
volumes: |
sentry-postgres

- name: Save Sentry Podman Volume Cache
if: ${{ steps.restore_cache_sentry.outputs.cache-hit != 'true' && inputs.container_engine == 'podman' }}
uses: actions/cache/save@5a3ec84eff668545956fd18022155c47e93e2684
with:
key: ${{ steps.restore_cache_sentry.outputs.cache-primary-key }}-podman
path: ${{ runner.temp }}/sentry-postgres.tar

- name: Save Snuba Volume Cache
if: steps.restore_cache_snuba.outputs.cache-hit != 'true' && inputs.no_restore_volume_cache != 'true'
if: steps.restore_cache_snuba.outputs.cache-hit != 'true' && inputs.no_restore_volume_cache != 'true' && inputs.container_engine == 'docker'
uses: BYK/docker-volume-cache-action/save@0efa5cf5178c9906cb46ed8d1a357df8fd6b1a06
with:
key: ${{ steps.restore_cache_snuba.outputs.cache-primary-key }}
volumes: |
sentry-clickhouse

- name: Save Kafka Volume Cache
if: steps.restore_cache_kafka.outputs.cache-hit != 'true' && inputs.no_restore_volume_cache != 'true'
if: steps.restore_cache_kafka.outputs.cache-hit != 'true' && inputs.no_restore_volume_cache != 'true' && inputs.container_engine == 'docker'
uses: BYK/docker-volume-cache-action/save@0efa5cf5178c9906cb46ed8d1a357df8fd6b1a06
with:
key: ${{ steps.restore_cache_kafka.outputs.cache-primary-key }}
Expand Down Expand Up @@ -238,7 +274,10 @@ runs:

- name: Integration Test
shell: bash
if: ${{ inputs.container_engine == 'docker' }}
env:
CONTAINER_ENGINE: ${{ inputs.container_engine }}
CONTAINER_ENGINE_PODMAN: ${{ inputs.container_engine == 'podman' && '1' || '0' }}
COMPOSE_PROFILES: ${{ inputs.compose_profiles }}
SKIP_BACKUP_RESTORE_TEST: ${{ inputs.skip_backup_restore_test }}
run: |
Expand All @@ -251,6 +290,21 @@ runs:
cd ${{ github.action_path }}
pytest -x --cov --junitxml=junit.xml _integration-test/

- name: Integration Test with podman
if: ${{ inputs.container_engine == 'podman' }}
env:
CONTAINER_ENGINE: ${{ inputs.container_engine }}
CONTAINER_ENGINE_PODMAN: ${{ inputs.container_engine == 'podman' && '1' || '0' }}
COMPOSE_PROFILES: ${{ inputs.compose_profiles }}
shell: bash
run: |
set -x
for volume in sentry-postgres sentry-clickhouse sentry-kafka; do
podman volume export -o "${RUNNER_TEMP}/volumes/${volume}.tar" "$volume"
done
cd ${{ github.action_path }}
pytest -s -v -x --cov --junitxml=junit.xml _integration-test/

- name: Upload coverage to Codecov
if: inputs.CODECOV_TOKEN
continue-on-error: true
Expand Down
3 changes: 2 additions & 1 deletion install/detect-platform.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ fi
export DOCKER_ARCH="$DOCKER_ARCH_OUTPUT"
if [[ "$DOCKER_ARCH" = "x86_64" || "$DOCKER_ARCH" = "amd64" ]]; then
export DOCKER_PLATFORM="linux/amd64"
elif [[ "$DOCKER_ARCH" = "aarch64" ]]; then
# NOTE(aldy505): Docker outputs `aarch64`, but Podman outputs `arm64`.
elif [[ "$DOCKER_ARCH" = "aarch64" || "$DOCKER_ARCH" = "arm64" ]]; then
export DOCKER_PLATFORM="linux/arm64"
else
echo "FAIL: Unsupported docker architecture $DOCKER_ARCH."
Expand Down
Loading