Skip to content

Commit 7397c12

Browse files
authored
Merge pull request #20 from comet-ml/CRThaze/DND-1417/multi-backend-functional-leg
[DND-1417] Add multi-backend functional test leg (s3 + azureblob + filesystem, non-blocking)
2 parents e1d3e8d + ae2b1b7 commit 7397c12

3 files changed

Lines changed: 89 additions & 7 deletions

File tree

.github/workflows/functional-test.yaml

Lines changed: 29 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,16 @@ name: Functional Test (kind)
1616
# fixes the endpoint property (jclouds.azureblob.endpoint
1717
# -> jclouds.endpoint); the failing round-trip is the
1818
# functional test demonstrably catching that regression.
19+
# multi-backend -> s3 (MinIO) + azureblob (Azurite) + filesystem (PVC)
20+
# in ONE release, round-tripping one bucket per backend
21+
# (smoke-s3-*/smoke-az-*/smoke-fs-*). NON-BLOCKING:
22+
# cannot pass on current main — blocked by DND-1442 and
23+
# DND-1416, plus two multi-backend chart gaps (secret.yaml
24+
# emits only the first enabled backend's jclouds.credential
25+
# into the shared secret.properties, and there is no
26+
# per-backend bucket-locator to route buckets between
27+
# backends on the shared endpoint). See the notes in
28+
# ci/functional/values/multi-backend.yaml.
1929
# Each soft_fail leg auto-goes-green once its bug is fixed.
2030
# gcs/b2/openstack-swift/rackspace are render-only (covered by lint-render + helm-diff):
2131
# gcs has no jclouds.endpoint override in the chart, and the others have no
@@ -57,6 +67,11 @@ jobs:
5767
values: ci/functional/values/azureblob.yaml
5868
mock: ci/functional/mocks/azurite.yaml
5969
soft_fail: true
70+
- backend: multi-backend
71+
values: ci/functional/values/multi-backend.yaml
72+
mock: ci/functional/mocks/minio.yaml ci/functional/mocks/azurite.yaml
73+
buckets: smoke-s3 smoke-az smoke-fs
74+
soft_fail: true
6075
env:
6176
NAMESPACE: s3proxy-test
6277
RELEASE: s3proxy
@@ -75,11 +90,16 @@ jobs:
7590
- name: Create namespace
7691
run: kubectl create namespace "${NAMESPACE}"
7792

78-
- name: Deploy mock backend (${{ matrix.backend }})
93+
- name: Deploy mock backends (${{ matrix.backend }})
7994
if: matrix.mock
95+
# matrix.mock is a space-separated list of manifests (multi-backend
96+
# scenarios deploy several mocks).
8097
run: |
81-
kubectl apply -n "${NAMESPACE}" -f "${{ matrix.mock }}"
82-
kubectl -n "${NAMESPACE}" rollout status deploy --timeout=180s
98+
for mock in ${{ matrix.mock }}
99+
do
100+
kubectl apply -n "${NAMESPACE}" -f "${mock}"
101+
done
102+
kubectl -n "${NAMESPACE}" wait --for=condition=Available deploy --all --timeout=180s
83103
84104
- name: Install s3proxy
85105
run: |
@@ -89,9 +109,14 @@ jobs:
89109
--wait --timeout 5m
90110
91111
- name: Smoke test (S3 round-trip)
112+
# matrix.buckets is a space-separated list of bucket prefixes — one
113+
# round-trip per prefix (multi-backend scenarios use one per backend).
92114
run: |
93115
chmod +x ci/functional/smoke-test.sh
94-
ci/functional/smoke-test.sh "${RELEASE}" "${NAMESPACE}" 9000 test-access-key test-secret-key
116+
for prefix in ${{ matrix.buckets || 'smoke' }}
117+
do
118+
ci/functional/smoke-test.sh "${RELEASE}" "${NAMESPACE}" 9000 test-access-key test-secret-key "${prefix}"
119+
done
95120
96121
- name: Diagnostics on failure
97122
if: failure()

ci/functional/smoke-test.sh

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,11 @@
44
# delete. Uses the AWS CLI over a kubectl port-forward, authenticating with the
55
# s3proxy client credentials (config.auth.identity / config.auth.secret).
66
#
7-
# Usage: smoke-test.sh RELEASE NAMESPACE PORT IDENTITY SECRET
7+
# Usage: smoke-test.sh RELEASE NAMESPACE PORT IDENTITY SECRET [BUCKET_PREFIX]
8+
#
9+
# BUCKET_PREFIX (default "smoke") names the test bucket; multi-backend scenarios
10+
# call this script once per backend with a distinct prefix so each round-trip
11+
# targets a bucket routed to that backend.
812
#
913
# Exit non-zero on any failure (a broken backend wiring makes the round-trip fail).
1014
set -euo pipefail
@@ -14,9 +18,10 @@ NAMESPACE="${2:?namespace required}"
1418
PORT="${3:-9000}"
1519
IDENTITY="${4:?s3proxy client identity required}"
1620
SECRET="${5:?s3proxy client secret required}"
21+
BUCKET_PREFIX="${6:-smoke}"
1722

1823
LOCAL_PORT=9900
19-
BUCKET="smoke-$(date +%s)"
24+
BUCKET="${BUCKET_PREFIX}-$(date +%s)"
2025
ENDPOINT="http://127.0.0.1:${LOCAL_PORT}"
2126
SRC="$(mktemp)"
2227
DL="$(mktemp)"
@@ -90,4 +95,4 @@ echo "==> Cleaning up"
9095
"${AWS[@]}" s3 rm "s3://${BUCKET}/smoke.txt"
9196
"${AWS[@]}" s3api delete-bucket --bucket "$BUCKET" || true
9297

93-
echo "✅ Smoke test passed for release '${RELEASE}'"
98+
echo "✅ Smoke test passed for release '${RELEASE}' (bucket ${BUCKET})"
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
# Functional-test values: THREE backends enabled in one release — s3 (MinIO
2+
# mock), azureblob (Azurite mock) and filesystem (PVC) — to exercise the chart's
3+
# multi-backend wiring end-to-end. The workflow round-trips one bucket per
4+
# backend (smoke-s3-*/smoke-az-*/smoke-fs-*).
5+
#
6+
# NOTE: expected to FAIL against current main — runs NON-BLOCKING (soft_fail)
7+
# until the chart can actually serve multiple backends:
8+
# * DND-1442: filesystem emits no jclouds.identity/jclouds.credential, so
9+
# s3proxy refuses to start at all.
10+
# * DND-1416: azureblob emits jclouds.azureblob.endpoint instead of
11+
# jclouds.endpoint, so the Azurite mock endpoint is ignored.
12+
# * secret.yaml's if/else-if emits only the FIRST enabled backend's
13+
# jclouds.credential (s3 here), and the merge initContainer appends that
14+
# same secret.properties to EVERY backend's properties file — azureblob
15+
# ends up with MinIO's credential.
16+
# * All backend properties files share one s3proxy.endpoint, and the chart
17+
# renders the same (global) bucket-locator list into each of them, so there
18+
# is no way to route a bucket to a specific backend yet. Needs per-backend
19+
# s3proxy.bucket-locator support (e.g. config.backends.<name>.bucketLocators
20+
# emitting s3proxy.bucket-locator.N per properties file).
21+
config:
22+
auth:
23+
type: aws-v4
24+
identity: test-access-key
25+
secret: test-secret-key
26+
backends:
27+
filesystem:
28+
enabled: true
29+
nio2: true
30+
basedir: /data/s3proxy
31+
s3:
32+
enabled: true
33+
aws: false
34+
region: us-east-1
35+
endpoint: http://minio:9000
36+
accessKeyID: minioadmin
37+
secretAccessKey:
38+
value: minioadmin
39+
azureblob:
40+
enabled: true
41+
provider: azureblob
42+
account: devstoreaccount1
43+
endpoint: http://azurite:10000/devstoreaccount1
44+
key:
45+
value: Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==
46+
persistence:
47+
enabled: true
48+
size: 1Gi
49+
resources:
50+
requests:
51+
cpu: 100m
52+
memory: 256Mi

0 commit comments

Comments
 (0)