mirror of
https://github.com/floci-io/floci.git
synced 2026-11-26 15:21:05 -05:00
chore(ci): check the amd64 native image after each Nightly, not on every pull request (#8959)
* chore(ci): check the amd64 native image after each Nightly, not on every pull request compatibility.yml built the amd64 native image on every pull request (7 to 9 minutes in the last five green runs) to run one 2-minute suite, sdk-test-python, whose Firehose compression delivery test needs the x86_64 snappy JNI library. Pull requests now build and test arm64 only. compat-partitions.yml, which already runs after each Nightly against the published floci/floci:nightly image, gains an amd64 sdk-test-python job in the commercial partition, so the amd64 half of the multi-arch image is still checked once a day, against the image users pull. Signed-off-by: Hector Ventura <hectorvent@gmail.com> * chore(ci): keep the amd64 job's test results, and skip it on a single-region dispatch Signed-off-by: Hector Ventura <hectorvent@gmail.com> --------- Signed-off-by: Hector Ventura <hectorvent@gmail.com>
This commit is contained in:
1 parent
99a13cf067
commit
3bf5e2a5f9
2 files changed
+123
-16
No files matched your search
@@ -166,3 +166,116 @@ jobs:
|
||||
- name: Dump floci logs
|
||||
if: failure() || cancelled()
|
||||
run: docker logs --tail 300 floci
|
||||
|
||||
# The amd64 half of the published image, which compatibility.yml no longer builds per pull request:
|
||||
# the native image is where an arch-specific resource can go missing (snappy-java's JNI library is
|
||||
# registered per platform), so the x86_64 nightly image runs sdk-test-python, whose Firehose
|
||||
# compression delivery test needs that library, in the commercial partition on an amd64 runner.
|
||||
sdk-test-python-amd64:
|
||||
name: sdk-test-python / amd64
|
||||
# A dispatch that names a region is about that partition alone, so it skips this job.
|
||||
if: >-
|
||||
!github.event.repository.fork
|
||||
&& ((github.event_name == 'workflow_dispatch' && !inputs.region)
|
||||
|| github.event.workflow_run.conclusion == 'success')
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 20
|
||||
env:
|
||||
IMAGE: ${{ inputs.image || 'floci/floci:nightly' }}
|
||||
|
||||
steps:
|
||||
- name: Pull the image and read the commit it was built from
|
||||
id: image
|
||||
run: |
|
||||
docker pull --platform linux/amd64 "$IMAGE"
|
||||
revision=$(docker inspect -f '{{ index .Config.Labels "org.opencontainers.image.revision" }}' "$IMAGE")
|
||||
if [ -z "$revision" ] || [ "$revision" = "<no value>" ]; then
|
||||
echo "::error::$IMAGE has no org.opencontainers.image.revision label to match the tests to"
|
||||
exit 1
|
||||
fi
|
||||
echo "revision=$revision" >> "$GITHUB_OUTPUT"
|
||||
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
with:
|
||||
ref: ${{ steps.image.outputs.revision }}
|
||||
sparse-checkout: |
|
||||
compatibility-tests
|
||||
|
||||
- name: Create Docker network
|
||||
run: docker network create compat-net
|
||||
|
||||
- name: Start floci
|
||||
run: |
|
||||
DOCKER_GID=$(stat -c '%g' /var/run/docker.sock)
|
||||
docker run -d --name floci --network compat-net \
|
||||
-p 4566:4566 \
|
||||
-v /var/run/docker.sock:/var/run/docker.sock \
|
||||
--group-add "$DOCKER_GID" \
|
||||
-e FLOCI_BASE_URL=http://floci:4566 \
|
||||
-e FLOCI_SERVICES_DOCKER_NETWORK=compat-net \
|
||||
-e FLOCI_HOSTNAME=floci \
|
||||
-e FLOCI_SERVICES_IOT_MQTT_ENABLED=true \
|
||||
-e FLOCI_SERVICES_LAMBDA_HOT_RELOAD_ENABLED=true \
|
||||
-e FLOCI_TLS_ENABLED=true \
|
||||
-e FLOCI_SERVICES_EC2_MOCK=true \
|
||||
-e FLOCI_SERVICES_REDSHIFT_ENDPOINT_HOST=floci \
|
||||
-e FLOCI_SERVICES_RDS_ENDPOINT_HOST=floci \
|
||||
-e FLOCI_SERVICES_SSOOIDC_LOCAL_PRINCIPAL_ID=11111111-2222-3333-4444-555555555555 \
|
||||
"$IMAGE"
|
||||
|
||||
- name: Wait for floci to be healthy
|
||||
run: |
|
||||
health=starting
|
||||
for _ in $(seq 1 60); do
|
||||
health=$(docker inspect -f '{{.State.Health.Status}}' floci)
|
||||
if [ "$health" = healthy ]; then
|
||||
exit 0
|
||||
fi
|
||||
if [ "$health" = unhealthy ]; then
|
||||
break
|
||||
fi
|
||||
sleep 1
|
||||
done
|
||||
echo "::error::floci did not report healthy (last status: $health)"
|
||||
docker logs --tail 50 floci
|
||||
exit 1
|
||||
|
||||
- uses: docker/setup-buildx-action@f87e5991a6d7451dcb8d9637bfbc97413f497069 # v4.4.1
|
||||
|
||||
- name: Build test image
|
||||
uses: docker/build-push-action@c3c9e263c25d99ce0380d002d59b67737d91b0dc # v7.4.0
|
||||
with:
|
||||
context: compatibility-tests/sdk-test-python
|
||||
load: true
|
||||
tags: compat-sdk-test-python
|
||||
cache-from: type=gha,scope=sdk-test-python
|
||||
|
||||
- name: Run tests
|
||||
run: |
|
||||
mkdir -p test-results
|
||||
FLOCI_IP=$(docker inspect -f '{{(index .NetworkSettings.Networks "compat-net").IPAddress}}' floci)
|
||||
docker run --rm --network compat-net \
|
||||
--dns "${FLOCI_IP}" \
|
||||
-e FLOCI_ENDPOINT=http://floci:4566 \
|
||||
-e FLOCI_S3_VHOST_ENDPOINT=http://floci:4566 \
|
||||
-v "$(pwd)/test-results:/results" \
|
||||
compat-sdk-test-python
|
||||
|
||||
- name: Generate test summary
|
||||
if: always()
|
||||
uses: test-summary/action@37b508cfee6d4d080eedd00b5bb240a6a784a6a5 # v2
|
||||
with:
|
||||
paths: test-results/*.xml
|
||||
|
||||
- name: Upload test results
|
||||
if: always()
|
||||
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
|
||||
with:
|
||||
name: compat-amd64-results
|
||||
path: test-results/
|
||||
if-no-files-found: warn
|
||||
|
||||
- name: Dump floci logs
|
||||
if: failure() || cancelled()
|
||||
run: docker logs --tail 300 floci
|
||||
@@ -170,17 +170,17 @@ jobs:
|
||||
github.event.pull_request.state != 'closed' &&
|
||||
github.event.action != 'edited'
|
||||
)
|
||||
# Both published architectures. The native image is the only place an
|
||||
# arch-specific resource can go missing (snappy-java's JNI library is
|
||||
# registered per platform), and one arch cannot prove the other.
|
||||
# arm64 only. The native image is the only place an arch-specific resource can go missing
|
||||
# (snappy-java's JNI library is registered per platform), and one arch cannot prove the other,
|
||||
# but an amd64 build here cost 7 to 9 minutes of every run for one 2-minute suite. The amd64
|
||||
# image is proven instead by compat-partitions.yml's amd64 job, after each Nightly, against the
|
||||
# published multi-arch nightly image.
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- arch: arm64
|
||||
runner: ubuntu-24.04-arm
|
||||
- arch: amd64
|
||||
runner: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
|
||||
@@ -299,14 +299,11 @@ jobs:
|
||||
needs: build-native
|
||||
runs-on: ${{ matrix.runner }}
|
||||
timeout-minutes: 20
|
||||
# The suites run against the arm64 image only. What they check is
|
||||
# arch-neutral, and running all eight on both arches (16 jobs per PR) left
|
||||
# them queued for the shared runner pools for longer than they take to run.
|
||||
# The amd64 image is still built above so both published arches are proven
|
||||
# to link and package, and one amd64 suite stays: sdk-test-python carries
|
||||
# the Firehose compression delivery test that proves the x86_64 snappy JNI
|
||||
# library survived the native build (the resource that can go missing per
|
||||
# platform, see the build-native comment).
|
||||
# The suites run against the arm64 image only. What they check is arch-neutral, and running all
|
||||
# eight on both arches (16 jobs per PR) left them queued for the shared runner pools for longer
|
||||
# than they take to run. The x86_64 snappy JNI library (the resource that can go missing per
|
||||
# platform, see the build-native comment) is checked after each Nightly by compat-partitions.yml's
|
||||
# amd64 sdk-test-python job, which carries the Firehose compression delivery test.
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
@@ -324,9 +321,6 @@ jobs:
|
||||
include:
|
||||
- arch: arm64
|
||||
runner: ubuntu-24.04-arm
|
||||
- arch: amd64
|
||||
test: sdk-test-python
|
||||
runner: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Download native floci image
|
||||
|
||||
Reference in new issue
Block a user