mirror of
https://github.com/floci-io/floci.git
synced 2026-11-23 06:00:46 -05:00
Bumps the actions-minor-patch group with 3 updates: [actions/upload-artifact](https://github.com/actions/upload-artifact), [actions/download-artifact](https://github.com/actions/download-artifact) and [actions/setup-node](https://github.com/actions/setup-node). Updates `actions/upload-artifact` from 7.0.1 to 7.0.2 - [Release notes](https://github.com/actions/upload-artifact/releases) - [Commits](https://github.com/actions/upload-artifact/compare/043fb46d1a93c77aae656e7c1c64a875d1fc6a0a...cf430e030ddbb5b0abf93d22962f4752f3646cd9) Updates `actions/download-artifact` from 8.0.1 to 8.0.2 - [Release notes](https://github.com/actions/download-artifact/releases) - [Commits](https://github.com/actions/download-artifact/compare/3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c...9000827ccba6bdab643e8b6fd33ac0654aef8333) Updates `actions/setup-node` from 7.0.0 to 7.1.0 - [Release notes](https://github.com/actions/setup-node/releases) - [Commits](https://github.com/actions/setup-node/compare/820762786026740c76f36085b0efc47a31fe5020...949feb2413d6458794dcd2491c4babbbce0c15c1) --- updated-dependencies: - dependency-name: actions/upload-artifact dependency-version: 7.0.2 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: actions-minor-patch - dependency-name: actions/download-artifact dependency-version: 8.0.2 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: actions-minor-patch - dependency-name: actions/setup-node dependency-version: 7.1.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: actions-minor-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
168 lines
6.6 KiB
YAML
168 lines
6.6 KiB
YAML
name: Partition Compatibility
|
|
|
|
# The Java SDK suite against a Floci deployed in a non-commercial partition, so
|
|
# the SDK's own partition logic (arn:aws-cn: ARNs, China signing scopes, the
|
|
# LocationConstraint S3 CreateBucket sends) has to round-trip end to end. One leg
|
|
# per partition family: China, GovCloud and EUSC. Part of #4272.
|
|
#
|
|
# Runs after each Nightly against the image it just published, not per PR: it
|
|
# is three more ~15 minute native suites, and the per-PR legs already queue for
|
|
# the shared runner pools (see compatibility.yml). Known failures live in
|
|
# .github/ci/compat-partition-allowlist-<region>.txt (a region without one has
|
|
# none); a failure missing from it, or an entry that no longer fails, fails the
|
|
# run, so the list only shrinks.
|
|
|
|
on:
|
|
workflow_run:
|
|
workflows: [Nightly]
|
|
types: [completed]
|
|
workflow_dispatch:
|
|
inputs:
|
|
image:
|
|
description: Floci image to test
|
|
default: floci/floci:nightly
|
|
region:
|
|
description: Run this one region only (any region Floci serves); blank runs every nightly leg
|
|
default: ''
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
sdk-test-java:
|
|
name: sdk-test-java / ${{ matrix.region }}
|
|
if: >-
|
|
!github.event.repository.fork
|
|
&& (github.event_name == 'workflow_dispatch' || github.event.workflow_run.conclusion == 'success')
|
|
runs-on: ubuntu-24.04-arm
|
|
timeout-minutes: 30
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
# One region per partition family that takes its own code path: China (IAM signs
|
|
# cn-north-1), GovCloud (IAM signs us-gov-west-1, no CloudFront) and EUSC (no global
|
|
# endpoints at all). A dispatch that names a region runs that region alone.
|
|
region: ${{ fromJSON(inputs.region && format('["{0}"]', inputs.region) || '["cn-north-1", "us-gov-west-1", "eusc-de-east-1"]') }}
|
|
env:
|
|
IMAGE: ${{ inputs.image || 'floci/floci:nightly' }}
|
|
REGION: ${{ matrix.region }}
|
|
|
|
steps:
|
|
# The tag is mutable, so the suite and allowlist are checked out at the commit this exact
|
|
# image was built from (its OCI revision label, which Nightly sets), never a guessed one.
|
|
- name: Pull the image and read the commit it was built from
|
|
id: image
|
|
run: |
|
|
docker pull "$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
|
|
.github/ci
|
|
|
|
- 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_DEFAULT_REGION="$REGION" \
|
|
-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-java
|
|
load: true
|
|
tags: compat-sdk-test-java
|
|
cache-from: type=gha,scope=sdk-test-java
|
|
|
|
# The suite's exit status is not the verdict here: the allowlist check below is.
|
|
- name: Run tests
|
|
id: tests
|
|
continue-on-error: true
|
|
run: |
|
|
mkdir -p test-results /tmp/floci-hot-reload
|
|
FLOCI_IP=$(docker inspect -f '{{(index .NetworkSettings.Networks "compat-net").IPAddress}}' floci)
|
|
docker run --rm --network compat-net \
|
|
--dns "${FLOCI_IP}" \
|
|
-e AWS_REGION="$REGION" \
|
|
-e FLOCI_ENDPOINT=http://floci:4566 \
|
|
-e FLOCI_S3_VHOST_ENDPOINT=http://floci:4566 \
|
|
-e HOT_RELOAD_BASE_DIR=/tmp/floci-hot-reload \
|
|
-v /tmp/floci-hot-reload:/tmp/floci-hot-reload \
|
|
-v "$(pwd)/test-results:/results" \
|
|
compat-sdk-test-java
|
|
|
|
# Maven exits non-zero for the allowlisted failures too, so its status cannot tell a
|
|
# finished run from an aborted one; the checker requires a report for every test class.
|
|
- name: Compare failures with the allowlist
|
|
run: >-
|
|
python3 .github/ci/compat-allowlist-check.py test-results
|
|
".github/ci/compat-partition-allowlist-$REGION.txt"
|
|
--test-sources compatibility-tests/sdk-test-java/src/test/java
|
|
|
|
- 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-partition-results-${{ env.REGION }}
|
|
path: test-results/
|
|
if-no-files-found: warn
|
|
|
|
- name: Dump floci logs
|
|
if: failure() || cancelled()
|
|
run: docker logs --tail 300 floci
|