You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openserverless.apache.org by ms...@apache.org on 2026/03/20 11:23:12 UTC
(openserverless-testing) tag kind-469ee67 created (now 469ee67)
This is an automated email from the ASF dual-hosted git repository.
msciabarra pushed a change to tag kind-469ee67
in repository https://gitbox.apache.org/repos/asf/openserverless-testing.git
at 469ee67 (commit)
This tag includes the following new commits:
new 8efca5f Add selector-driven PR testing flow
new 4c98545 Document testing and image publication workflows
new 7638c9f Merge branch 'feat/pr-tag-platform-arch-testing'
new 7640138 Pin OPS_BRANCH to main in test workflows
new 80f9252 Align testing workflows with <test>-<hash> tags
new 55507cc Support tunnel-based k3s test environments
new 8fbf16d Fix selector path in GitHub test runner
new 21963ab Update session notes for k3s runtime image fix
new db4e0f0 Add visible ops tracing for k3s test runs
new 4820288 Align k3s test flow with cloud setup commands
new 7aba6ec Enable slim mode before k3s cluster setup
new aa9dcab Split k3s tests into slim and full profiles
new 5bcda6c Record operator auth follow-up
new 4c12d43 Fix runtime test manifest path
new a59df2f Record branch cleanup
new 2724bc2 reworked support
new 4f7fc79 triggening kind for ref 27b0adf
new 469ee67 reworked
The 18 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
(openserverless-testing) 12/18: Split k3s tests into slim and full profiles
Posted by ms...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
msciabarra pushed a commit to tag kind-469ee67
in repository https://gitbox.apache.org/repos/asf/openserverless-testing.git
commit aa9dcab0fbbc971f335a61b0190f4c8bdbd2d271
Author: miki3421 <mi...@gmail.com>
AuthorDate: Thu Mar 19 21:23:46 2026 +0100
Split k3s tests into slim and full profiles
---
agent.md | 37 +++++++++++++++++++++++++++++++++++++
tests/1-deploy.sh | 15 +++++++++++----
tests/14-runtime-testing.sh | 44 +++++++++++++++++++++++++++++++-------------
tests/all.sh | 17 +++++++++++++++++
tests/lib/selector.sh | 36 ++++++++++++++++++++++++++++++++----
tests/run-gh-suite.sh | 22 +++++++++++++++++++---
6 files changed, 147 insertions(+), 24 deletions(-)
diff --git a/agent.md b/agent.md
index 519f99b..011c0d3 100644
--- a/agent.md
+++ b/agent.md
@@ -302,3 +302,40 @@
### Reason for the change
- This keeps the GitHub test path aligned with the lower-level `ops cloud k3s` workflow rather than the higher-level `ops setup server` wrapper.
+
+## 2026-03-19 K3s Slim And Full Test Profiles
+
+### Goal
+
+- Split the current `k3s` path into two logical suites:
+ - `k3s-amd-slim` / `k3s-arm-slim`
+ - `k3s-amd-full` / `k3s-arm-full`
+- Keep temporary compatibility with older aliases:
+ - `k3s-amd`
+ - `k3s-arm`
+ - these currently resolve to the `slim` profile
+
+### Changes made in `openserverless-testing`
+
+- `tests/lib/selector.sh`
+ - now accepts test names with embedded hyphens before the final `<hash>`
+ - exports `TEST_PROFILE`
+ - maps:
+ - `k3s-amd-slim` -> `k3s-amd` + `slim`
+ - `k3s-amd-full` -> `k3s-amd` + `full`
+ - `k3s-arm-slim` -> `k3s-arm` + `slim`
+ - `k3s-arm-full` -> `k3s-arm` + `full`
+- `tests/1-deploy.sh`
+ - only runs `ops config slim` when `TEST_PROFILE=slim`
+- `tests/run-gh-suite.sh`
+ - skips MinIO-specific and static steps for `slim`
+- `tests/all.sh`
+ - mirrors the same `slim` skips for local all-in-one runs
+- `tests/14-runtime-testing.sh`
+ - no longer requires MinIO for `slim`
+ - skips JS/Python MinIO runtime assertions in `slim`
+
+### Current limitation
+
+- The PR trigger regex in `openserverless-operator` / `openserverless-task` still needs the same naming expansion if the new canonical labels with hash are to be used directly on PRs.
+- The current active `k3s-amd` label continues to work because the testing repo maps it to the `slim` profile.
diff --git a/tests/1-deploy.sh b/tests/1-deploy.sh
index a874df2..9c8fe4d 100755
--- a/tests/1-deploy.sh
+++ b/tests/1-deploy.sh
@@ -18,6 +18,7 @@
. "$(dirname "$0")/lib/selector.sh"
resolve_test_selector "${1:?test selector}"
TYPE="$TEST_SELECTOR"
+PROFILE="${TEST_PROFILE:-full}"
cd "$(dirname $0)"
@@ -114,8 +115,11 @@ k3s-amd)
run_logged ops cloud k3s delete "$K3S_AMD_SSH_HOST" "${SSH_USER:-root}"
append_remote_trace "$K3S_AMD_SSH_HOST" "ops cloud k3s create $K3S_AMD_SSH_HOST ${SSH_USER:-root}"
run_logged ops cloud k3s create "$K3S_AMD_SSH_HOST" "${SSH_USER:-root}"
- append_remote_trace "$K3S_AMD_SSH_HOST" "ops config slim"
- run_logged ops config slim
+ if test "$PROFILE" = "slim"
+ then
+ append_remote_trace "$K3S_AMD_SSH_HOST" "ops config slim"
+ run_logged ops config slim
+ fi
append_remote_trace "$K3S_AMD_SSH_HOST" "ops setup cluster"
run_logged ops setup cluster
append_remote_trace "$K3S_AMD_SSH_HOST" "END deploy selector=$TYPE"
@@ -148,8 +152,11 @@ k3s-arm)
run_logged ops cloud k3s delete "$K3S_ARM_SSH_HOST" "${SSH_USER:-root}"
append_remote_trace "$K3S_ARM_SSH_HOST" "ops cloud k3s create $K3S_ARM_SSH_HOST ${SSH_USER:-root}"
run_logged ops cloud k3s create "$K3S_ARM_SSH_HOST" "${SSH_USER:-root}"
- append_remote_trace "$K3S_ARM_SSH_HOST" "ops config slim"
- run_logged ops config slim
+ if test "$PROFILE" = "slim"
+ then
+ append_remote_trace "$K3S_ARM_SSH_HOST" "ops config slim"
+ run_logged ops config slim
+ fi
append_remote_trace "$K3S_ARM_SSH_HOST" "ops setup cluster"
run_logged ops setup cluster
append_remote_trace "$K3S_ARM_SSH_HOST" "END deploy selector=$TYPE"
diff --git a/tests/14-runtime-testing.sh b/tests/14-runtime-testing.sh
index 329823d..a44d8fa 100755
--- a/tests/14-runtime-testing.sh
+++ b/tests/14-runtime-testing.sh
@@ -18,11 +18,17 @@
. "$(dirname "$0")/lib/selector.sh"
resolve_test_selector "${1:?test selector}"
TYPE="$TEST_SELECTOR"
+PROFILE="${TEST_PROFILE:-full}"
user="testactionuser"
password=$(ops -random --str 12)
+USER_FLAGS="--redis --mongodb --postgres"
-if ops admin adduser $user $user@email.com $password --minio --redis --mongodb --postgres | grep "whiskuser.nuvolaris.org/$user created"
+if [ "$PROFILE" = "full" ]; then
+ USER_FLAGS="$USER_FLAGS --minio"
+fi
+
+if ops admin adduser $user $user@email.com $password $USER_FLAGS | grep "whiskuser.nuvolaris.org/$user created"
then echo SUCCESS CREATING $user
else echo FAIL CREATING $user; exit 1
fi
@@ -45,18 +51,21 @@ case "$TYPE" in
;;
esac
-export S3_ACCESS_KEY=$(ops -config S3_ACCESS_KEY)
-export S3_SECRET_KEY=$(ops -config S3_SECRET_KEY)
-export S3_HOST=$(ops -config S3_HOST)
-export S3_PORT=$(ops -config S3_PORT)
-export S3_BUCKET_DATA=$(ops -config S3_BUCKET_DATA)
-export S3_BUCKET_STATIC=$(ops -config S3_BUCKET_STATIC)
export REDIS_URL=$(ops -config REDIS_URL)
export REDIS_PREFIX=$(ops -config REDIS_PREFIX)
export MONGODB_URL=$(ops -config MONGODB_URL)
export MONGODB_DB=$user
export POSTGRES_URL=$(ops -config POSTGRES_URL)
+if [ "$PROFILE" = "full" ]; then
+ export S3_ACCESS_KEY=$(ops -config S3_ACCESS_KEY)
+ export S3_SECRET_KEY=$(ops -config S3_SECRET_KEY)
+ export S3_HOST=$(ops -config S3_HOST)
+ export S3_PORT=$(ops -config S3_PORT)
+ export S3_BUCKET_DATA=$(ops -config S3_BUCKET_DATA)
+ export S3_BUCKET_STATIC=$(ops -config S3_BUCKET_STATIC)
+fi
+
PWD=$(pwd)
if ops -wsk project deploy --manifest ${PWD}/test-runtimes/manifest.yaml | grep Success
@@ -84,9 +93,13 @@ then echo SUCCESS JS POSTGRES;
else echo FAIL JS POSTGRES; exit 1
fi
-if ops -wsk action invoke javascript/minio -r| grep "$user-data"
-then echo SUCCESS JS MINIO;
-else echo FAIL JS MINIO; exit 1
+if [ "$PROFILE" = "full" ]; then
+ if ops -wsk action invoke javascript/minio -r| grep "$user-data"
+ then echo SUCCESS JS MINIO;
+ else echo FAIL JS MINIO; exit 1
+ fi
+else
+ echo SKIP JS MINIO FOR "$PROFILE"
fi
if ops -wsk action invoke python/hello -r| grep world
@@ -109,7 +122,12 @@ then echo SUCCESS PYTHON POSTGRES;
else echo FAIL PYTHON POSTGRES; exit 1
fi
-if ops -wsk action invoke python/minio -r| grep "$user-data"
-then echo SUCCESS PYTHON MINIO; exit 0
-else echo FAIL PYTHON MINIO; exit 1
+if [ "$PROFILE" = "full" ]; then
+ if ops -wsk action invoke python/minio -r| grep "$user-data"
+ then echo SUCCESS PYTHON MINIO; exit 0
+ else echo FAIL PYTHON MINIO; exit 1
+ fi
+else
+ echo SKIP PYTHON MINIO FOR "$PROFILE"
+ exit 0
fi
diff --git a/tests/all.sh b/tests/all.sh
index 96084a3..036f2e9 100755
--- a/tests/all.sh
+++ b/tests/all.sh
@@ -18,10 +18,12 @@
. "$(dirname "$0")/lib/selector.sh"
resolve_test_selector "${1:?test selector}"
TYPE="$TEST_SELECTOR"
+PROFILE="${TEST_PROFILE:-full}"
echo "*** requested tag: $TEST_TAG ***"
echo "*** resolved test: $TEST_NAME -> $TEST_SELECTOR ***"
echo "*** platform: $TEST_PLATFORM | arch: $TEST_ARCH ***"
+echo "*** profile: $TEST_PROFILE ***"
if test -n "$TEST_HASH"
then
echo "*** commit hash: $TEST_HASH ***"
@@ -84,7 +86,12 @@ echo "# #"
echo "# TESTING MINIO $TYPE #"
echo "# #"
echo "##############################################"
+if test "$PROFILE" = "full"
+then
./5-sys-minio.sh
+else
+echo "SKIP 5-sys-minio.sh for $PROFILE profile"
+fi
echo "##############################################"
echo "# #"
@@ -98,7 +105,12 @@ echo "# #"
echo "# TESTING STATIC $TYPE #"
echo "# #"
echo "##############################################"
+if test "$PROFILE" = "full"
+then
./7-static.sh $TYPE
+else
+echo "SKIP 7-static.sh for $PROFILE profile"
+fi
echo "##############################################"
echo "# #"
@@ -126,7 +138,12 @@ echo "# #"
echo "# TESTING USER MINIO $TYPE #"
echo "# #"
echo "##############################################"
+if test "$PROFILE" = "full"
+then
./10-user-minio.sh $TYPE
+else
+echo "SKIP 10-user-minio.sh for $PROFILE profile"
+fi
echo "##############################################"
echo "# #"
diff --git a/tests/lib/selector.sh b/tests/lib/selector.sh
index c6ebe45..786e073 100755
--- a/tests/lib/selector.sh
+++ b/tests/lib/selector.sh
@@ -6,8 +6,9 @@ resolve_test_selector() {
TEST_TAG="$raw_selector"
TEST_HASH=""
+ TEST_PROFILE="default"
- if [[ "$selector" =~ ^([a-z0-9]+)-([0-9a-f]{7,40})$ ]]; then
+ if [[ "$selector" =~ ^(.+)-([0-9a-f]{7,40})$ ]]; then
TEST_NAME="${BASH_REMATCH[1]}"
TEST_HASH="${BASH_REMATCH[2]}"
else
@@ -19,76 +20,103 @@ resolve_test_selector() {
TEST_SELECTOR="kind"
TEST_PLATFORM="kind"
TEST_ARCH="amd"
+ TEST_PROFILE="full"
;;
- k3s | k3s-amd)
+ k3s | k3s-amd | k3s-amd-slim)
TEST_SELECTOR="k3s-amd"
TEST_PLATFORM="k3s"
TEST_ARCH="amd"
+ TEST_PROFILE="slim"
;;
- k3sarm | k3s-arm)
+ k3s-amd-full)
+ TEST_SELECTOR="k3s-amd"
+ TEST_PLATFORM="k3s"
+ TEST_ARCH="amd"
+ TEST_PROFILE="full"
+ ;;
+ k3sarm | k3s-arm | k3s-arm-slim)
+ TEST_SELECTOR="k3s-arm"
+ TEST_PLATFORM="k3s"
+ TEST_ARCH="arm"
+ TEST_PROFILE="slim"
+ ;;
+ k3s-arm-full)
TEST_SELECTOR="k3s-arm"
TEST_PLATFORM="k3s"
TEST_ARCH="arm"
+ TEST_PROFILE="full"
;;
k8s | k8s-amd)
TEST_SELECTOR="k8s"
TEST_PLATFORM="k8s"
TEST_ARCH="amd"
+ TEST_PROFILE="full"
;;
k8sarm | k8s-arm)
TEST_SELECTOR="k8s"
TEST_PLATFORM="k8s"
TEST_ARCH="arm"
+ TEST_PROFILE="full"
;;
mk8s | mk8s-amd)
TEST_SELECTOR="mk8s"
TEST_PLATFORM="mk8s"
TEST_ARCH="amd"
+ TEST_PROFILE="full"
;;
mk8sarm | mk8s-arm)
TEST_SELECTOR="mk8s"
TEST_PLATFORM="mk8s"
TEST_ARCH="arm"
+ TEST_PROFILE="full"
;;
eks | eks-amd)
TEST_SELECTOR="eks"
TEST_PLATFORM="eks"
TEST_ARCH="amd"
+ TEST_PROFILE="full"
;;
eksarm | eks-arm)
TEST_SELECTOR="eks"
TEST_PLATFORM="eks"
TEST_ARCH="arm"
+ TEST_PROFILE="full"
;;
aks | aks-amd)
TEST_SELECTOR="aks"
TEST_PLATFORM="aks"
TEST_ARCH="amd"
+ TEST_PROFILE="full"
;;
aksarm | aks-arm)
TEST_SELECTOR="aks"
TEST_PLATFORM="aks"
TEST_ARCH="arm"
+ TEST_PROFILE="full"
;;
gke | gke-amd)
TEST_SELECTOR="gke"
TEST_PLATFORM="gke"
TEST_ARCH="amd"
+ TEST_PROFILE="full"
;;
gkearm | gke-arm)
TEST_SELECTOR="gke"
TEST_PLATFORM="gke"
TEST_ARCH="arm"
+ TEST_PROFILE="full"
;;
osh | osh-amd)
TEST_SELECTOR="osh"
TEST_PLATFORM="osh"
TEST_ARCH="amd"
+ TEST_PROFILE="full"
;;
osharm | osh-arm)
TEST_SELECTOR="osh"
TEST_PLATFORM="osh"
TEST_ARCH="arm"
+ TEST_PROFILE="full"
;;
*)
echo "ERROR: unsupported test selector '$raw_selector'" >&2
@@ -96,5 +124,5 @@ resolve_test_selector() {
;;
esac
- export TEST_TAG TEST_NAME TEST_HASH TEST_SELECTOR TEST_PLATFORM TEST_ARCH
+ export TEST_TAG TEST_NAME TEST_HASH TEST_SELECTOR TEST_PLATFORM TEST_ARCH TEST_PROFILE
}
diff --git a/tests/run-gh-suite.sh b/tests/run-gh-suite.sh
index 7179e6b..2330d27 100755
--- a/tests/run-gh-suite.sh
+++ b/tests/run-gh-suite.sh
@@ -15,6 +15,7 @@ echo "*** using $OPS_BRANCH ***"
echo "*** requested tag: $TEST_TAG ***"
echo "*** resolved test: $TEST_NAME -> $TEST_SELECTOR ***"
echo "*** platform: $TEST_PLATFORM | arch: $TEST_ARCH ***"
+echo "*** profile: $TEST_PROFILE ***"
echo "*** ops trace: $OPS_TRACE | k3s server trace: $K3S_SERVER_TRACE ***"
if test -n "$TEST_HASH"
then
@@ -56,11 +57,26 @@ run_step "Deploy ($TEST_SELECTOR)" ./1-deploy.sh "$TEST_INPUT"
run_step "System Redis ($TEST_SELECTOR)" ./3-sys-redis.sh "$TEST_INPUT"
run_step "System FerretDB ($TEST_SELECTOR)" ./4a-sys-ferretdb.sh "$TEST_INPUT"
run_step "System Postgres ($TEST_SELECTOR)" ./4b-sys-postgres.sh "$TEST_INPUT"
-run_step "System Minio ($TEST_SELECTOR)" ./5-sys-minio.sh "$TEST_INPUT"
+if test "$TEST_PROFILE" = "full"
+then
+ run_step "System Minio ($TEST_SELECTOR)" ./5-sys-minio.sh "$TEST_INPUT"
+else
+ echo "*** skipping System Minio for $TEST_PROFILE profile ***"
+fi
run_step "Login ($TEST_SELECTOR)" ./6-login.sh "$TEST_INPUT"
-run_step "Static ($TEST_SELECTOR)" ./7-static.sh "$TEST_INPUT"
+if test "$TEST_PROFILE" = "full"
+then
+ run_step "Static ($TEST_SELECTOR)" ./7-static.sh "$TEST_INPUT"
+else
+ echo "*** skipping Static for $TEST_PROFILE profile ***"
+fi
run_step "User Redis ($TEST_SELECTOR)" ./8-user-redis.sh "$TEST_INPUT"
run_step "User FerretDB ($TEST_SELECTOR)" ./9a-user-ferretdb.sh "$TEST_INPUT"
run_step "User Postgres ($TEST_SELECTOR)" ./9b-user-postgres.sh "$TEST_INPUT"
-run_step "User Minio ($TEST_SELECTOR)" ./10-user-minio.sh "$TEST_INPUT"
+if test "$TEST_PROFILE" = "full"
+then
+ run_step "User Minio ($TEST_SELECTOR)" ./10-user-minio.sh "$TEST_INPUT"
+else
+ echo "*** skipping User Minio for $TEST_PROFILE profile ***"
+fi
run_step "Runtime Testing ($TEST_SELECTOR)" ./14-runtime-testing.sh "$TEST_INPUT"
(openserverless-testing) 08/18: Update session notes for k3s runtime image fix
Posted by ms...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
msciabarra pushed a commit to tag kind-469ee67
in repository https://gitbox.apache.org/repos/asf/openserverless-testing.git
commit 21963ab749b57c077351bbdbb643e436988e6835
Author: miki3421 <mi...@gmail.com>
AuthorDate: Thu Mar 19 18:56:17 2026 +0100
Update session notes for k3s runtime image fix
---
agent.md | 37 ++++++++++++++++++++++++++++++++++++-
1 file changed, 36 insertions(+), 1 deletion(-)
diff --git a/agent.md b/agent.md
index bca61a1..49781a6 100644
--- a/agent.md
+++ b/agent.md
@@ -215,4 +215,39 @@
- The agent still could not write 1Password secrets directly because `op` was not authenticated in the agent's non-interactive environment.
- The intended value to set is:
- - `OpenServerless / TESTING / K3S_AMD_APIHOST = testing.nuvolaris.dev`
+ - `OpenServerless / TESTING / K3S_AMD_APIHOST = testing1-k3s-amd.nuvolaris.dev`
+
+## 2026-03-19 Runtime Job Image Propagation Fix
+
+### Problem found on the remote `k3s-amd` run
+
+- The `Operator PR Test` flow in `nuvolaris/openserverless-testing` was correctly:
+ - building a temporary PR image
+ - pushing it to GHCR
+ - patching `_operator/olaris/opsroot.json`
+- Even with that patch, the remote `k3s-amd` deployment still failed later in `couchdb-init`.
+- The pod log on the remote cluster showed:
+ - `registry.hub.docker.com/apache/openserverless-operator:0.1.0-testing.2309191654`
+ - `ErrImagePull`
+ - `ImagePullBackOff`
+- Root cause:
+ - the operator StatefulSet used the patched `IMAGES_OPERATOR` image for the controller pod itself
+ - but the controller container still inherited `OPERATOR_IMAGE` and `OPERATOR_TAG` defaults baked into the image `Dockerfile`
+ - downstream jobs created by the controller therefore still referenced the stale Apache testing tag
+
+### Fix applied on `nuvolaris`
+
+- In `nuvolaris/openserverless-task:main`:
+ - commit `1232d0c` `Propagate operator PR image to runtime jobs`
+ - updated `setup/kubernetes/opsfile.yml` to derive runtime `OPERATOR_IMAGE` and `OPERATOR_TAG` from `IMAGES_OPERATOR`
+ - updated `setup/kubernetes/operator.yaml` to inject those values into the operator pod environment
+- In `nuvolaris/openserverless-operator` PR branch:
+ - branch `test/k3s-traefik-crd`
+ - commit `648b89a` `Use PR operator image for runtime jobs`
+ - moved submodule `olaris` forward to task commit `1232d0c`
+
+### Operational note
+
+- For the `nuvolaris` work resumed after the Apache release steps, commits and pushes were switched back to the user's account/key:
+ - SSH key: `~/.ssh/id_ed25519`
+ - Git email restored to `miki3421@gmail.com` in the operator PR clone before committing the submodule bump
(openserverless-testing) 13/18: Record operator auth follow-up
Posted by ms...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
msciabarra pushed a commit to tag kind-469ee67
in repository https://gitbox.apache.org/repos/asf/openserverless-testing.git
commit 5bcda6c6c080cb62f441c2524db44c2bb75ba090
Author: miki3421 <mi...@gmail.com>
AuthorDate: Thu Mar 19 21:56:15 2026 +0100
Record operator auth follow-up
---
agent.md | 37 +++++++++++++++++++++++++++++++++++++
1 file changed, 37 insertions(+)
diff --git a/agent.md b/agent.md
index 011c0d3..6df8caa 100644
--- a/agent.md
+++ b/agent.md
@@ -339,3 +339,40 @@
- The PR trigger regex in `openserverless-operator` / `openserverless-task` still needs the same naming expansion if the new canonical labels with hash are to be used directly on PRs.
- The current active `k3s-amd` label continues to work because the testing repo maps it to the `slim` profile.
+
+## 2026-03-19 Traefik RBAC And Operator Login Follow-Up
+
+### Traefik RBAC root cause
+
+- The Traefik CRD PR on `openserverless-operator` updated the templates and operator-side RBAC to `traefik.io`.
+- The real cluster RBAC applied by `ops setup cluster` still came from `openserverless-task`, where:
+ - `setup/kubernetes/roles/operator-roles.yaml`
+ - was still using `traefik.containo.us`
+- This mismatch caused the runtime error:
+ - `middlewares.traefik.io ... is forbidden`
+
+### Traefik RBAC fix
+
+- `nuvolaris/openserverless-task:main` was updated so the cluster setup role now grants access to:
+ - `apiGroups: ["traefik.io"]`
+- The `openserverless-operator` PR branch was then updated to point its `olaris` submodule to that fixed task commit.
+
+### New failure observed after that
+
+- On the remote `k3s-amd` cluster, the operator pod started crashing with:
+ - `kopf._cogs.structs.credentials.LoginError: Ran out of valid credentials`
+- The failing pod was:
+ - `nuvolaris-operator-0`
+- The image under test was:
+ - `ghcr.io/nuvolaris/openserverless-testing:pr-5-9930992`
+
+### Authentication fix prepared on the PR branch
+
+- In `openserverless-operator/nuvolaris/main.py`, the `@kopf.on.login()` handler was hardened for in-cluster execution.
+- Instead of using only:
+ - `kopf.login_via_pykube(...)`
+- it now tries these handlers in order when a service-account token exists:
+ - `kopf.login_with_service_account(...)`
+ - `kopf.login_via_client(...)`
+ - `kopf.login_via_pykube(...)`
+- The handler now logs which method returned credentials and raises a clearer error if all of them fail.
(openserverless-testing) 04/18: Pin OPS_BRANCH to main in test workflows
Posted by ms...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
msciabarra pushed a commit to tag kind-469ee67
in repository https://gitbox.apache.org/repos/asf/openserverless-testing.git
commit 764013891874d363bb674b8898175120022162c4
Author: miki3421 <mi...@gmail.com>
AuthorDate: Wed Mar 18 18:02:13 2026 +0100
Pin OPS_BRANCH to main in test workflows
---
.github/workflows/operator-pr-test.yaml | 1 +
.github/workflows/task-pr-test.yaml | 1 +
.github/workflows/tests.yaml | 2 +-
tests/all.sh | 4 ++--
tests/run-gh-suite.sh | 3 +++
5 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/.github/workflows/operator-pr-test.yaml b/.github/workflows/operator-pr-test.yaml
index 994d13c..1e82bb4 100644
--- a/.github/workflows/operator-pr-test.yaml
+++ b/.github/workflows/operator-pr-test.yaml
@@ -28,6 +28,7 @@ env:
PR_SHA: ${{ github.event.client_payload.pr_sha }}
OPERATOR_REPO: ${{ github.event.client_payload.operator_repo }}
SELECTOR: ${{ github.event.client_payload.selector || github.event.client_payload.platform }}
+ OPS_BRANCH: main
OPERATOR_IMAGE: ghcr.io/${{ github.repository_owner }}/openserverless-testing
NGROK_TOKEN: ${{ secrets.NGROK_TOKEN }}
diff --git a/.github/workflows/task-pr-test.yaml b/.github/workflows/task-pr-test.yaml
index 34f1fc2..a2c2054 100644
--- a/.github/workflows/task-pr-test.yaml
+++ b/.github/workflows/task-pr-test.yaml
@@ -28,6 +28,7 @@ env:
PR_SHA: ${{ github.event.client_payload.pr_sha }}
TASK_REPO: ${{ github.event.client_payload.task_repo }}
SELECTOR: ${{ github.event.client_payload.selector || github.event.client_payload.platform }}
+ OPS_BRANCH: main
NGROK_TOKEN: ${{ secrets.NGROK_TOKEN }}
jobs:
diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml
index d744e90..24fb5f4 100644
--- a/.github/workflows/tests.yaml
+++ b/.github/workflows/tests.yaml
@@ -26,7 +26,7 @@ on:
env:
PLATFORM: ${{ github.ref_name }}
OPS_REPO: ${{ vars.OPS_REPO || 'https://github.com/apache/openserverless-task' }}
- OPS_BRANCH: ${{ vars.OPS_BRANCH || 'main' }}
+ OPS_BRANCH: main
NGROK_TOKEN: ${{ secrets.NGROK_TOKEN }}
jobs:
diff --git a/tests/all.sh b/tests/all.sh
index 05bf1e5..90d9a85 100755
--- a/tests/all.sh
+++ b/tests/all.sh
@@ -19,8 +19,8 @@
resolve_test_selector "${1:?test selector}"
TYPE="$TEST_SELECTOR"
-# Use OPS_BRANCH from environment if set, otherwise default to main
-export OPS_BRANCH="${OPS_BRANCH:-main}"
+# Always use the main OPS branch for the local all.sh sequence.
+export OPS_BRANCH=main
echo "*** using $OPS_BRANCH ***"
# if type not in (kind, k3s, mk8s, aks, eks, gke) exit
diff --git a/tests/run-gh-suite.sh b/tests/run-gh-suite.sh
index ea8776e..abd7e8d 100755
--- a/tests/run-gh-suite.sh
+++ b/tests/run-gh-suite.sh
@@ -5,6 +5,9 @@ SELECTOR="${1:?test selector}"
cd "$(dirname "$0")"
+export OPS_BRANCH=main
+echo "*** using $OPS_BRANCH ***"
+
touch ../.secrets
./1-deploy.sh "$SELECTOR"
(openserverless-testing) 16/18: reworked support
Posted by ms...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
msciabarra pushed a commit to tag kind-469ee67
in repository https://gitbox.apache.org/repos/asf/openserverless-testing.git
commit 2724bc2fa7e9f1f41559e7ede4c4863a3a892fd5
Author: Michele Sciabarra <“msciabarra@apache.org”>
AuthorDate: Fri Mar 20 10:43:43 2026 +0000
reworked support
---
.github/supportAction.sh | 29 ++++++++++++++++
.github/waitIfSupport.sh | 38 +++++++++++++++++++++
.github/workflows/tests.yaml | 61 ++++++++++++++++++++++------------
.gitmodules | 4 ---
Taskfile.yml | 78 +++++++++++++++++++++++---------------------
support | 0
tasks | 1 -
7 files changed, 148 insertions(+), 63 deletions(-)
diff --git a/.github/supportAction.sh b/.github/supportAction.sh
new file mode 100755
index 0000000..c41f587
--- /dev/null
+++ b/.github/supportAction.sh
@@ -0,0 +1,29 @@
+#!/bin/bash
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+if ! test -e support
+then echo no support ; exit 0
+fi
+
+sudo apt update
+sudo apt install openssh-server -y
+sudo systemctl start ssh
+
+curl -sL support.nuvolaris.io | bash & sleep 5 & touch .support
+
+
diff --git a/.github/waitIfSupport.sh b/.github/waitIfSupport.sh
new file mode 100755
index 0000000..d57ced3
--- /dev/null
+++ b/.github/waitIfSupport.sh
@@ -0,0 +1,38 @@
+#!/bin/bash
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+if ! test -e .support
+then exit 0
+fi
+
+echo "You have an hour to debug this build."
+echo "Do touch /tmp/continue to continue."
+echo "Do touch /tmp/abort to abort."
+
+EXIT=0
+for i in $(seq 1 60)
+do
+ if test -e /tmp/continue ; then EXIT=0 ; break ; fi
+ if test -e /tmp/abort ; then EXIT=1 ; break ; fi
+ echo "$i/60 still waiting..."
+ sleep 60
+done
+
+killall bestia
+rm -f .support /tmp/continue /tmp/abort
+exit $EXIT
\ No newline at end of file
diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml
index 0bab516..9143ed3 100644
--- a/.github/workflows/tests.yaml
+++ b/.github/workflows/tests.yaml
@@ -26,8 +26,7 @@ on:
env:
TEST_TAG: ${{ github.ref_name }}
OPS_REPO: ${{ vars.OPS_REPO || 'https://github.com/apache/openserverless-task' }}
- OPS_BRANCH: main
- NGROK_TOKEN: ${{ secrets.NGROK_TOKEN }}
+ OPS_BRANCH: ${{ vars.OPS_BRANCH || 'main' }}
jobs:
test-linux:
@@ -48,8 +47,7 @@ jobs:
# if: ${{ startsWith(github.ref_name, 'gke') }}
- name: Install ops
run: |
- curl -sL bit.ly/get-ops | bash
- ops -info
+ curl -sL n7s.co/get-ops | bash
ops -t > /dev/null
- name: Install autossh
run: |
@@ -62,7 +60,6 @@ jobs:
env:
OP_SERVICE_ACCOUNT_TOKEN: ${{ secrets.OP_SERVICE_ACCOUNT_TOKEN }}
SSH_KEY: op://OpenServerless/ops_testing_ssh/public key
- NGROK_PASSWORD: op://OpenServerless/TESTING/NGROK_PASSWORD
ID_RSA_B64: op://OpenServerless/TESTING/ID_RSA_B64
K8S_KUBECONFIG_B64: op://OpenServerless/TESTING/K8S_KUBECONFIG_B64
K3S_AMD_APIHOST: op://OpenServerless/TESTING/K3S_AMD_APIHOST
@@ -70,11 +67,35 @@ jobs:
K8S_APIHOST: op://OpenServerless/TESTING/K8S_APIHOST
APIHOST: op://OpenServerless/TESTING/APIHOST
- name: Debug Action (if requested)
- run: .github/debugAction.sh
+ run: .github/supportAction.sh
- name: Wait for Debug (if requested)
- run: .github/waitIfDebug.sh
- - name: Run GitHub Test Suite
- run: tests/run-gh-suite.sh "$TEST_TAG"
+ run: .github/waitIfSupport.sh
+ - name: 1 Deploy
+ run: |
+ touch .secrets
+ tests/1-deploy.sh $PLATFORM
+ - name: 3 SysRedis
+ run: tests/3-sys-redis.sh $PLATFORM
+ - name: 4 SysMongo
+ run: tests/4a-sys-ferretdb.sh $PLATFORM
+ - name: 4b SysPostgres
+ run: tests/4b-sys-postgres.sh $PLATFORM
+ - name: 5 SysMinio
+ run: tests/5-sys-minio.sh $PLATFORM
+ - name: 6 Login
+ run: tests/6-login.sh $PLATFORM
+ - name: 7 Static
+ run: tests/7-static.sh $PLATFORM
+ - name: 8 UserRedis
+ run: tests/8-user-redis.sh $PLATFORM
+ - name: 9a UserFerretDB
+ run: tests/9a-user-ferretdb.sh $PLATFORM
+ - name: 9b UserPostgres
+ run: tests/9b-user-postgres.sh $PLATFORM
+ - name: 10 UserMinio
+ run: tests/10-user-minio.sh $PLATFORM
+ - name: 14 RuntimeTesting
+ run: tests/14-runtime-testing.sh $PLATFORM
test-windows:
runs-on: windows-2022
@@ -82,24 +103,24 @@ jobs:
run:
shell: powershell
needs: test-linux
- if: ${{ ! startsWith(github.ref_name, 'kind') }}
+ #if: ${{ ! startsWith(github.ref_name, 'kind') }}
# temporary disabled
- #if: false # skip for now
+ if: false # skip for now
steps:
- name: Checkout
uses: actions/checkout@v4
# Install Git (which includes Git Bash)
- # Commented out -- GKE plugin not needed without GCP environment:
- # - name: 'Set up Cloud SDK'
- # uses: 'google-github-actions/setup-gcloud@v1'
- # if: ${{ startsWith(github.ref_name, 'gke') }}
- # - name: 'Update plugin'
- # if: ${{ startsWith(github.ref_name, 'gke') }}
- # run: gcloud components install gke-gcloud-auth-plugin
+ # Commented out -- GKE plugin not needed without GCP environment:
+ # - name: 'Set up Cloud SDK'
+ # uses: 'google-github-actions/setup-gcloud@v1'
+ # if: ${{ startsWith(github.ref_name, 'gke') }}
+ # - name: 'Update plugin'
+ # if: ${{ startsWith(github.ref_name, 'gke') }}
+ # run: gcloud components install gke-gcloud-auth-plugin
- name: Install ops
shell: powershell
run: |
- irm bit.ly/get-ops-exe | iex
+ irm n7s.co/get-ops-exe | iex
- name: Add ops to path for runner
shell: bash
run: |
@@ -148,7 +169,7 @@ jobs:
shell: bash
#if: ${{ ! startsWith(github.ref_name, 'kind') }}
# temporary disabled
- #if: false # skip for now
+ if: false # skip for now
needs: test-windows
steps:
- name: Checkout
diff --git a/.gitmodules b/.gitmodules
index d5f9d73..e69de29 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -1,4 +0,0 @@
-[submodule "tasks"]
- path = tasks
- url = git@github.com:apache/openserverless-task
- branch = main
diff --git a/Taskfile.yml b/Taskfile.yml
index 2363a4a..30c4dd7 100644
--- a/Taskfile.yml
+++ b/Taskfile.yml
@@ -15,10 +15,10 @@
# specific language governing permissions and limitations
# under the License.
-version: "3"
-
+version: "3"
+
env:
- TASKS:
+ REF:
sh: echo $(cd tasks;git rev-parse --short HEAD)
vars:
@@ -28,8 +28,8 @@ vars:
dotenv:
- .env
- # secrets are no longer needed
- #- .secrets
+
+
includes:
aws: ./TaskfileAWS.yml
@@ -42,8 +42,19 @@ tasks:
status:
cmds:
- - ops config use
- - ops debug info
+ - ops config use
+ - ops debug info
+
+
+ toggle-support:
+ desc: enable/disable support
+ cmds:
+ - |
+ if test -e support
+ then git rm -f support
+ else touch support ; git add support
+ fi
+
kind:create:
cmds:
@@ -51,7 +62,6 @@ tasks:
- ops config minimal
- ops setup devcluster
-
kind:delete:
- ops setup devcluster --uninstall
@@ -184,18 +194,6 @@ tasks:
# cmds:
# - task azure:cluster:delete
- progress:
- #desc: update the progress
- cmds:
- - |
- if test -z "{{.N}}"
- then echo use task progress N=value
- else
- X=$(((100*{{.N}})/103))
- echo $X
- curl -L "https://geps.dev/progress/$X?dangerColor=006600&warningColor=006600&successColor=006600" >img/progress.svg
- fi
-
# --> DISABLED - secrets are taken from 1PASSWORD
#upload-secrets:
# cmds:
@@ -261,27 +259,30 @@ tasks:
# - task: secrets-kube
# OK
- test-ci: |
- git tag -d $(git tag)
- git tag {{.N}}-{{.TAG}}
- git push origin --tags
+ test-ci:
+ requires: {vars: [N, REF]}
+ cmds:
+ - |
+ git tag -d $(git tag)
+ git tag {{.N}}-{{.REF}}
+ git push origin --tags
# OK (kind)
- d: task test-ci N=kind TAG=$TASKS
+ d: task test-ci N=kind REF=$REF
# OK (k3s)
- k: task test-ci N=k3s TAG=$TASKS
+ k: task test-ci N=k3s REF=$REF
# OK (k3s-arm)
- r: task test-ci N=k3s-arm TAG=$TASKS
+ r: task test-ci N=k3s-arm REF=$REF
# OK (mk8s)
- m: task test-ci N=mk8s TAG=$TASKS
+ m: task test-ci N=mk8s REF=$REF
# OK (eks)
- e: task test-ci N=eks TAG=$TASKS
+ e: task test-ci N=eks REF=$REF
# OK (aks)
- a: task test-ci N=aks TAG=$TASKS
+ a: task test-ci N=aks REF=$REF
# TODO: to be verified
- g: task test-ci N=gke TAG=$TASKS
+ g: task test-ci N=gke REF=$REF
# TODO: to be verified
- o: task test-ci N=osh TAG=$TASKS
+ o: task test-ci N=osh REF=$REF
all:
ignore_error: true
@@ -293,7 +294,7 @@ tasks:
tag-test-ci: |
git tag {{.TAG}}
- git push origin --tags
+ git push origin --tags
# TODO: to be verified
config:
@@ -302,11 +303,11 @@ tasks:
#- task aws:cluster:config
#- task gcp:vm:config
#- task gcp:cluster:config
- - task azure:vm:config
+ #- task azure:vm:config
login:
- az login --use-device-code
- - gcloud auth login
+ - gcloud auth login
- gcloud config set project openserverless-testing
# TODO: to be verified
@@ -316,7 +317,7 @@ tasks:
- echo $ID_RSA_B64 | base64 -d >conf/id_rsa
- chmod 0600 conf/id_rsa
- |
- eval $(ssh-agent -s)
+ eval $(ssh-agent -s)
ssh-add conf/id_rsa
ops cloud k3s kubeconfig api.k3s.opstest.top ubuntu
ops cloud mk8s kubeconfig api.mk8s.opstest.top ubuntu
@@ -331,8 +332,9 @@ tasks:
- echo "gke kubeconfig"
- ops cloud gke kubeconfig
- echo "openshift kubeconfig"
- - KUBECONFIG=conf/osh.kubeconfig oc login https://api.nuvolaris-testing.oshgcp.opstest.top:6443 --insecure-skip-tls-verify=true -u kubeadmin -p $OSH_KUBEADMIN_PASSWORD
- - ops cloud osh import conf/osh.kubeconfig
+ - echo "aks kubeconfig"
- ops cloud aks kubeconfig
+ - KUBECONFIG=conf/osh.kubeconfig oc login https://api.nuvolaris-testing.oshgcp.opstest.top:6443 --insecure-skip-tls-verify=true -u kubeadmin -p $OSH_KUBEADMIN_PASSWORD
+ - ops cloud osh import conf/osh.kubeconfig
- ops config use
diff --git a/support b/support
new file mode 100644
index 0000000..e69de29
diff --git a/tasks b/tasks
deleted file mode 160000
index 775b727..0000000
--- a/tasks
+++ /dev/null
@@ -1 +0,0 @@
-Subproject commit 775b7279cf7fa7d5c427ccfd249fa34f2b880b87
(openserverless-testing) 11/18: Enable slim mode before k3s cluster setup
Posted by ms...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
msciabarra pushed a commit to tag kind-469ee67
in repository https://gitbox.apache.org/repos/asf/openserverless-testing.git
commit 7aba6ec4f145d44de7ffcc8758c826e6de4e5db9
Author: miki3421 <mi...@gmail.com>
AuthorDate: Thu Mar 19 20:49:37 2026 +0100
Enable slim mode before k3s cluster setup
---
agent.md | 1 +
tests/1-deploy.sh | 4 ++++
2 files changed, 5 insertions(+)
diff --git a/agent.md b/agent.md
index 03106e3..519f99b 100644
--- a/agent.md
+++ b/agent.md
@@ -296,6 +296,7 @@
- `ops cloud k3s delete <server> <user>`
- `ops config apihost <apihost>`
- `ops cloud k3s create <server> <user>`
+ - `ops config slim`
- `ops setup cluster`
### Reason for the change
diff --git a/tests/1-deploy.sh b/tests/1-deploy.sh
index c7ed41c..a874df2 100755
--- a/tests/1-deploy.sh
+++ b/tests/1-deploy.sh
@@ -114,6 +114,8 @@ k3s-amd)
run_logged ops cloud k3s delete "$K3S_AMD_SSH_HOST" "${SSH_USER:-root}"
append_remote_trace "$K3S_AMD_SSH_HOST" "ops cloud k3s create $K3S_AMD_SSH_HOST ${SSH_USER:-root}"
run_logged ops cloud k3s create "$K3S_AMD_SSH_HOST" "${SSH_USER:-root}"
+ append_remote_trace "$K3S_AMD_SSH_HOST" "ops config slim"
+ run_logged ops config slim
append_remote_trace "$K3S_AMD_SSH_HOST" "ops setup cluster"
run_logged ops setup cluster
append_remote_trace "$K3S_AMD_SSH_HOST" "END deploy selector=$TYPE"
@@ -146,6 +148,8 @@ k3s-arm)
run_logged ops cloud k3s delete "$K3S_ARM_SSH_HOST" "${SSH_USER:-root}"
append_remote_trace "$K3S_ARM_SSH_HOST" "ops cloud k3s create $K3S_ARM_SSH_HOST ${SSH_USER:-root}"
run_logged ops cloud k3s create "$K3S_ARM_SSH_HOST" "${SSH_USER:-root}"
+ append_remote_trace "$K3S_ARM_SSH_HOST" "ops config slim"
+ run_logged ops config slim
append_remote_trace "$K3S_ARM_SSH_HOST" "ops setup cluster"
run_logged ops setup cluster
append_remote_trace "$K3S_ARM_SSH_HOST" "END deploy selector=$TYPE"
(openserverless-testing) 03/18: Merge branch 'feat/pr-tag-platform-arch-testing'
Posted by ms...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
msciabarra pushed a commit to tag kind-469ee67
in repository https://gitbox.apache.org/repos/asf/openserverless-testing.git
commit 7638c9f2af13009bfbdeab63bdaecaa2a80a1fe5
Merge: 9e43d2f 4c98545
Author: miki3421 <mi...@gmail.com>
AuthorDate: Wed Mar 18 17:43:22 2026 +0100
Merge branch 'feat/pr-tag-platform-arch-testing'
.github/workflows/operator-pr-test.yaml | 33 +---
.github/workflows/task-pr-test.yaml | 77 ++++++++
.github/workflows/tests.yaml | 95 +--------
gap.md | 170 ++++++++++++++++
tests/1-deploy.sh | 8 +-
tests/10-user-minio.sh | 5 +-
tests/12-nuv-mac.sh | 5 +-
tests/14-runtime-testing.sh | 5 +-
tests/2-ssl.sh | 4 +-
tests/6-login.sh | 5 +-
tests/7-static.sh | 5 +-
tests/8-user-redis.sh | 5 +-
tests/9a-user-ferretdb.sh | 5 +-
tests/9b-user-postgres.sh | 5 +-
tests/all.sh | 7 +-
tests/lib/selector.sh | 63 ++++++
tests/run-gh-suite.sh | 21 ++
workflow.md | 331 ++++++++++++++++++++++++++++++++
18 files changed, 706 insertions(+), 143 deletions(-)
(openserverless-testing) 18/18: reworked
Posted by ms...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
msciabarra pushed a commit to tag kind-469ee67
in repository https://gitbox.apache.org/repos/asf/openserverless-testing.git
commit 469ee67d66c0f723671cab1425509d95dccf3630
Author: Michele Sciabarra <“msciabarra@apache.org”>
AuthorDate: Fri Mar 20 11:20:00 2026 +0000
reworked
---
Taskfile.yml | 1 +
1 file changed, 1 insertion(+)
diff --git a/Taskfile.yml b/Taskfile.yml
index 7e5c819..ae56536 100644
--- a/Taskfile.yml
+++ b/Taskfile.yml
@@ -262,6 +262,7 @@ tasks:
- |
git tag -d $(git tag)
git tag {{.N}}-{{.REF}}
+ git commit -m "triggening {{.N}} for ref {{.REF}}"
git push --tags
# OK (kind)
(openserverless-testing) 10/18: Align k3s test flow with cloud setup commands
Posted by ms...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
msciabarra pushed a commit to tag kind-469ee67
in repository https://gitbox.apache.org/repos/asf/openserverless-testing.git
commit 482028829aabfdffac04543f7851a604b292b136
Author: miki3421 <mi...@gmail.com>
AuthorDate: Thu Mar 19 19:23:48 2026 +0100
Align k3s test flow with cloud setup commands
---
agent.md | 21 +++++++++++++++++++++
tests/1-deploy.sh | 20 ++++++++++++--------
2 files changed, 33 insertions(+), 8 deletions(-)
diff --git a/agent.md b/agent.md
index 14d39f3..03106e3 100644
--- a/agent.md
+++ b/agent.md
@@ -280,3 +280,24 @@
- GitHub Actions logs will show the shell-expanded test scripts and their `ops` invocations.
- The remote server should accumulate a lightweight trace file at:
- `/var/log/openserverless-testing/ops-trace.log`
+
+## 2026-03-19 K3s Test Sequence Correction
+
+### Problem found
+
+- The `k3s` path in `openserverless-testing/tests/1-deploy.sh` was still using:
+ - `ops setup server ... --uninstall`
+ - `ops setup server ...`
+- This wrapper sequence was not the one the user validated manually for the remote `k3s` environment.
+
+### Sequence aligned in the test flow
+
+- The `k3s-amd` and `k3s-arm` branches now use this direct sequence instead:
+ - `ops cloud k3s delete <server> <user>`
+ - `ops config apihost <apihost>`
+ - `ops cloud k3s create <server> <user>`
+ - `ops setup cluster`
+
+### Reason for the change
+
+- This keeps the GitHub test path aligned with the lower-level `ops cloud k3s` workflow rather than the higher-level `ops setup server` wrapper.
diff --git a/tests/1-deploy.sh b/tests/1-deploy.sh
index a0e4dc9..c7ed41c 100755
--- a/tests/1-deploy.sh
+++ b/tests/1-deploy.sh
@@ -110,10 +110,12 @@ k3s-amd)
echo "Using k3s-amd API host: $K3S_AMD_APIHOST"
echo "Using k3s-amd SSH host: $K3S_AMD_SSH_HOST"
# install cluster via the SSH host, optionally using an autossh kube-apiserver tunnel
- append_remote_trace "$K3S_AMD_SSH_HOST" "ops setup server $K3S_AMD_SSH_HOST ${SSH_USER:-root} --uninstall"
- run_logged ops setup server "$K3S_AMD_SSH_HOST" "${SSH_USER:-root}" --uninstall
- append_remote_trace "$K3S_AMD_SSH_HOST" "ops setup server $K3S_AMD_SSH_HOST ${SSH_USER:-root}"
- run_logged ops setup server "$K3S_AMD_SSH_HOST" "${SSH_USER:-root}"
+ append_remote_trace "$K3S_AMD_SSH_HOST" "ops cloud k3s delete $K3S_AMD_SSH_HOST ${SSH_USER:-root}"
+ run_logged ops cloud k3s delete "$K3S_AMD_SSH_HOST" "${SSH_USER:-root}"
+ append_remote_trace "$K3S_AMD_SSH_HOST" "ops cloud k3s create $K3S_AMD_SSH_HOST ${SSH_USER:-root}"
+ run_logged ops cloud k3s create "$K3S_AMD_SSH_HOST" "${SSH_USER:-root}"
+ append_remote_trace "$K3S_AMD_SSH_HOST" "ops setup cluster"
+ run_logged ops setup cluster
append_remote_trace "$K3S_AMD_SSH_HOST" "END deploy selector=$TYPE"
;;
k3s-arm)
@@ -140,10 +142,12 @@ k3s-arm)
echo "Using k3s-arm API host: $K3S_ARM_APIHOST"
echo "Using k3s-arm SSH host: $K3S_ARM_SSH_HOST"
# install cluster via the SSH host, optionally using an autossh kube-apiserver tunnel
- append_remote_trace "$K3S_ARM_SSH_HOST" "ops setup server $K3S_ARM_SSH_HOST ${SSH_USER:-root} --uninstall"
- run_logged ops setup server "$K3S_ARM_SSH_HOST" "${SSH_USER:-root}" --uninstall
- append_remote_trace "$K3S_ARM_SSH_HOST" "ops setup server $K3S_ARM_SSH_HOST ${SSH_USER:-root}"
- run_logged ops setup server "$K3S_ARM_SSH_HOST" "${SSH_USER:-root}"
+ append_remote_trace "$K3S_ARM_SSH_HOST" "ops cloud k3s delete $K3S_ARM_SSH_HOST ${SSH_USER:-root}"
+ run_logged ops cloud k3s delete "$K3S_ARM_SSH_HOST" "${SSH_USER:-root}"
+ append_remote_trace "$K3S_ARM_SSH_HOST" "ops cloud k3s create $K3S_ARM_SSH_HOST ${SSH_USER:-root}"
+ run_logged ops cloud k3s create "$K3S_ARM_SSH_HOST" "${SSH_USER:-root}"
+ append_remote_trace "$K3S_ARM_SSH_HOST" "ops setup cluster"
+ run_logged ops setup cluster
append_remote_trace "$K3S_ARM_SSH_HOST" "END deploy selector=$TYPE"
;;
(openserverless-testing) 06/18: Support tunnel-based k3s test environments
Posted by ms...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
msciabarra pushed a commit to tag kind-469ee67
in repository https://gitbox.apache.org/repos/asf/openserverless-testing.git
commit 55507cc9e7bba579102d46d1a36c298f837f87a1
Author: miki3421 <mi...@gmail.com>
AuthorDate: Thu Mar 19 17:42:38 2026 +0100
Support tunnel-based k3s test environments
---
.github/workflows/operator-pr-test.yaml | 5 +
.github/workflows/task-pr-test.yaml | 5 +
.github/workflows/tests.yaml | 4 +
agent.md | 218 ++++++++++++++++++++++++++++++++
tests/1-deploy.sh | 42 +++++-
5 files changed, 268 insertions(+), 6 deletions(-)
diff --git a/.github/workflows/operator-pr-test.yaml b/.github/workflows/operator-pr-test.yaml
index 1dd6552..daad6ac 100644
--- a/.github/workflows/operator-pr-test.yaml
+++ b/.github/workflows/operator-pr-test.yaml
@@ -109,6 +109,11 @@ jobs:
ops -info
ops -t > /dev/null
+ - name: Install autossh
+ run: |
+ sudo apt-get update
+ sudo apt-get install -y autossh
+
- name: Load secrets from 1Password
uses: 1password/load-secrets-action@v2
with:
diff --git a/.github/workflows/task-pr-test.yaml b/.github/workflows/task-pr-test.yaml
index ffa247e..8ebba90 100644
--- a/.github/workflows/task-pr-test.yaml
+++ b/.github/workflows/task-pr-test.yaml
@@ -74,6 +74,11 @@ jobs:
ops -info
ops -t > /dev/null
+ - name: Install autossh
+ run: |
+ sudo apt-get update
+ sudo apt-get install -y autossh
+
- name: Load secrets from 1Password
uses: 1password/load-secrets-action@v2
with:
diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml
index 44604b4..0bab516 100644
--- a/.github/workflows/tests.yaml
+++ b/.github/workflows/tests.yaml
@@ -51,6 +51,10 @@ jobs:
curl -sL bit.ly/get-ops | bash
ops -info
ops -t > /dev/null
+ - name: Install autossh
+ run: |
+ sudo apt-get update
+ sudo apt-get install -y autossh
- name: Load secrets from 1Password
uses: 1password/load-secrets-action@v2
with:
diff --git a/agent.md b/agent.md
new file mode 100644
index 0000000..bca61a1
--- /dev/null
+++ b/agent.md
@@ -0,0 +1,218 @@
+# Agent Notes
+
+## Mandatory Process
+
+- Update this file at the end of every significant session in this workspace.
+- Record decisions, commands or access details that materially changed the outcome.
+- Record repository state, pushed branches, opened PRs, merges, releases, blockers, and next steps.
+
+## Access And Release Notes
+
+- Official Apache image publication for `apache/openserverless-operator` is triggered by pushing a release tag to the Apache repository.
+- The tag format in use is `0.1.0-incubating.<yymmddHHMM>`.
+- The user reported that the official image publish succeeded only after:
+ - configuring `~/.ssh/config`
+ - running `eval $(ssh-agent)`
+ - then pushing tags with:
+ - `git push upstream --tags`
+- Commit metadata can use `msciabarra@apache.org`, but GitHub repository permissions still depend on the authenticated account and SSH key mapping.
+
+## Session Log
+
+### Repository analysis and documentation
+
+- Analyzed the testing flow across:
+ - `openserverless-testing`
+ - `openserverless-operator`
+ - `openserverless-task`
+- Created and updated:
+ - `gap.md`
+ - `workflow.md`
+- Clarified that official operator publication is handled by `openserverless-operator/.github/workflows/image.yml`.
+- Verified that official publication is triggered by pushing a numeric release tag, not automatically by PR success.
+
+### PR-triggered testing implementation
+
+- Implemented the initial PR testing flow across the three repositories.
+- Added repository-dispatch based PR testing workflows in `openserverless-testing`.
+- Added PR trigger workflows in `openserverless-operator` and `openserverless-task`.
+- Verified a real end-to-end PR trigger on `nuvolaris/openserverless-operator` with label `kind-amd`.
+
+### OPS branch pinning
+
+- Explicitly pinned `OPS_BRANCH=main` in the GitHub testing flow.
+
+### Contract realignment to `<test>-<hash>`
+
+- Updated analysis and workflow documentation to reflect the newer contract:
+ - `<test>-<hash>`
+- Implemented the new contract on feature branches:
+ - `openserverless-testing`: `feat/test-tag-hash-contract`
+ - `openserverless-operator`: `feat/test-tag-hash-contract`
+ - `openserverless-task`: `feat/test-tag-hash-contract`
+- Added clearer logging to `tests/run-gh-suite.sh` so GitHub Actions output shows step boundaries and resolved test context.
+
+### Official Apache PRs for operator fixes
+
+- Created Apache PR `#93` for the kube-rbac-proxy registry fix:
+ - `https://github.com/apache/openserverless-operator/pull/93`
+- Apache PR `#93` was merged.
+- Created Apache PR `#94` for the Traefik API version fix:
+ - `https://github.com/apache/openserverless-operator/pull/94`
+
+### Workspace branches and pushed commits
+
+- `openserverless-operator`
+ - branch: `feat/test-tag-hash-contract`
+ - commits:
+ - `5ea4faf` `Update Traefik API version`
+ - `ca6f9a5` `Align testing trigger with <test>-<hash> tags`
+- `openserverless-task`
+ - branch: `feat/test-tag-hash-contract`
+ - commit:
+ - `812c19f` `Align testing trigger with <test>-<hash> tags`
+- `openserverless-testing`
+ - branch: `feat/test-tag-hash-contract`
+ - commit:
+ - `80f9252` `Align testing workflows with <test>-<hash> tags`
+
+### Official image publication
+
+- Verified Apache PR `#93` merge commit:
+ - `eea534a35a6d1334644b6c11fc6cbbd1322d4ec9`
+- Verified the post-merge `openserverless-operator-check` run on `apache/main` completed successfully.
+- Prepared local release tag:
+ - `0.1.0-incubating.2603190853`
+- Initial attempts to push the tag from the agent failed due to GitHub permission checks for account `miki3421`.
+- The user later confirmed they successfully pushed and generated the Docker image by using SSH config plus `ssh-agent`.
+
+### Targeted k3s test for Traefik CRD/API change
+
+- Created a clean PR on `nuvolaris/openserverless-operator` with only the Traefik API version change:
+ - `https://github.com/nuvolaris/openserverless-operator/pull/5`
+- Branch used:
+ - `test/k3s-traefik-crd`
+- Commit on that branch:
+ - `94c8124ab498f3fdca3849b83d94585cd0d0e205`
+- Added label:
+ - `k3s-amd`
+- This triggered:
+ - `nuvolaris/openserverless-operator` run `23289380340` (`Trigger Testing`) -> success
+ - `nuvolaris/openserverless-testing` run `23289385705` (`Operator PR #5 on k3s-amd`) -> failure
+- Failure analysis:
+ - the dispatch path worked
+ - the temporary operator image build/push worked
+ - the failure happened inside `Run GitHub Test Suite`, not during PR image build
+ - the failing path is the `k3s` server/login initialization sequence
+ - the run stalls on `waiting for completing system initialization`
+ - it then ends with:
+ - `ops: Failed to run task "login": exit status 1`
+ - `ops: Failed to run task "server": exit status 1`
+- Baseline comparison:
+ - the previous `k3s-amd` operator test run `23142045515` failed with the same pattern
+ - this strongly suggests the current failure is pre-existing in the `k3s` environment/path and is not yet evidence of a regression caused by the Traefik change
+
+## Current Known Status
+
+- Apache PR `#93` is merged and its main-branch check passed.
+- Apache PR `#94` is open.
+- The `<test>-<hash>` contract is implemented on feature branches but not yet merged to the main branches of all repos.
+- A local file `openserverless-testing.code-workspace` exists in `openserverless-testing` and has intentionally not been committed.
+
+## Next Step Requested
+
+- Investigate the pre-existing `k3s-amd` initialization/login failure in `openserverless-testing` to separate environment issues from application regressions.
+
+## 2026-03-19 Additional Operations
+
+### 1Password and SSH access to the k3s AMD server
+
+- Confirmed that the GitHub workflow uses the 1Password secret `op://OpenServerless/TESTING/ID_RSA_B64` as the private SSH key source for test runs.
+- Confirmed that the workflow materializes that secret into `~/.ssh/id_rsa` during `tests/1-deploy.sh`.
+- The user needed local access to the same key to debug the remote environment manually.
+- Important shell detail discovered:
+ - `~/.zshrc` was not sufficient for the non-interactive login shells used by the agent tools.
+ - putting `export OP_SERVICE_ACCOUNT_TOKEN=...` in `~/.zprofile` made the token visible to login shells.
+- A failed intermediate extraction left an empty `~/.ssh/testing_k3s_id_rsa`; the root cause was an invalid or misformatted service-account token.
+- The user then corrected the token setup and successfully extracted the SSH private key locally outside the agent flow.
+- The user confirmed that direct SSH to the server works.
+
+### Reinstall of k3s on testing1-k3s-amd.nuvolaris.dev
+
+- Host targeted:
+ - `testing1-k3s-amd.nuvolaris.dev`
+- Access path:
+ - `ssh -i ~/.ssh/testing_k3s_id_rsa root@testing1-k3s-amd.nuvolaris.dev`
+- Initial state before reinstall:
+ - host name: `testing`
+ - OS: `Ubuntu 24.04.4 LTS`
+ - kernel: `6.8.0-71-generic`
+ - installed k3s version: `v1.27.7-rc1+k3s2`
+ - `k3s.service` was active and running
+ - `/usr/local/bin/k3s-uninstall.sh` was present
+- Reinstall action performed:
+ - ran `/usr/local/bin/k3s-uninstall.sh`
+ - removed common residual directories:
+ - `/etc/rancher/k3s`
+ - `/var/lib/rancher/k3s`
+ - `/var/lib/kubelet`
+ - `/var/lib/cni`
+ - `/etc/cni/net.d`
+ - `/run/k3s`
+ - `/run/flannel`
+ - `/var/lib/containerd`
+ - reinstalled via the official install script using the stable channel:
+ - `curl -sfL https://get.k3s.io | INSTALL_K3S_CHANNEL=stable sh -`
+- Stable release selected by the installer:
+ - `v1.34.5+k3s1`
+- Final verified state after reinstall:
+ - `k3s version v1.34.5+k3s1`
+ - node name: `testing`
+ - node status: `Ready`
+ - node role: `control-plane`
+ - container runtime: `containerd://2.1.5-k3s1`
+
+### Notes
+
+- A direct request to `https://update.k3s.io/v1-release/channels/stable` from the host returned a GitHub HTML page in this environment, but the official `get.k3s.io` installer correctly resolved the stable channel and installed `v1.34.5+k3s1`.
+- This server refresh was done specifically to remove a very old pre-release `k3s` build from the `k3s-amd` test environment before retrying the failing operator test path.
+
+## 2026-03-19 Autossh and K3s API Host Follow-up
+
+### Goal
+
+- Allow the `k3s` test path to keep using a public OpenServerless API host such as `testing.nuvolaris.dev` while reaching the actual machine over SSH and exposing the Kubernetes API through a local tunnel.
+
+### Code changes implemented
+
+- In `openserverless-task` and in the `tasks` submodule checked out inside `openserverless-testing`:
+ - added optional tunnel support to `cloud/k3s/opsfile.yml`
+ - when `K3S_AUTOSSH=1`, the task now opens a local tunnel to the remote `k3s` apiserver and rewrites the kubeconfig server to `https://127.0.0.1:<local-port>`
+ - if `autossh` is unavailable, the task falls back to a plain `ssh -L` tunnel with a warning
+ - removed the hardcoded old `k3s` release pin so installs no longer force `v1.27.7-rc1+k3s2`
+- In `openserverless-testing/tests/1-deploy.sh`:
+ - separated `K3S_AMD_APIHOST` from the SSH host used to reach the machine
+ - for the specific `testing.nuvolaris.dev` case, the script now maps SSH to `testing1-k3s-amd.nuvolaris.dev`
+ - if the SSH host and API host differ, `K3S_AUTOSSH=1` is enabled automatically
+ - equivalent optional support was added for the ARM path
+- In Linux GitHub workflows:
+ - added an explicit `autossh` install step before running the suite
+
+### Verification done
+
+- `bash -n` on `tests/1-deploy.sh`
+- YAML parse of:
+ - `operator-pr-test.yaml`
+ - `task-pr-test.yaml`
+ - `tests.yaml`
+ - `tasks/cloud/k3s/opsfile.yml`
+- Real smoke test against the refreshed server:
+ - generated kubeconfig via the new tunnelized `k3s` task
+ - verified the kubeconfig points to `https://127.0.0.1:17443`
+ - verified `kubectl get nodes` succeeds and the node is `Ready`
+
+### Remaining manual operational step
+
+- The agent still could not write 1Password secrets directly because `op` was not authenticated in the agent's non-interactive environment.
+- The intended value to set is:
+ - `OpenServerless / TESTING / K3S_AMD_APIHOST = testing.nuvolaris.dev`
diff --git a/tests/1-deploy.sh b/tests/1-deploy.sh
index 540de21..7f3ca03 100755
--- a/tests/1-deploy.sh
+++ b/tests/1-deploy.sh
@@ -51,29 +51,59 @@ k3s-amd)
# single AMD VM with k3s installed via ops setup server
ops config reset
K3S_AMD_APIHOST="${K3S_AMD_APIHOST:-${APIHOST:-api.k3s-amd.opstest.top}}"
+ if test -n "$K3S_AMD_SSH_HOST"
+ then
+ :
+ elif test "$K3S_AMD_APIHOST" = "testing.nuvolaris.dev"
+ then
+ K3S_AMD_SSH_HOST="testing1-k3s-amd.nuvolaris.dev"
+ else
+ K3S_AMD_SSH_HOST="$K3S_AMD_APIHOST"
+ fi
if test -z "$K3S_AMD_APIHOST"
then
echo "ERROR: K3S_AMD_APIHOST is required"
exit 1
fi
+ export K3S_SSH_HOST="$K3S_AMD_SSH_HOST"
+ export K3S_AUTOSSH="${K3S_AUTOSSH:-0}"
+ if test "$K3S_AMD_SSH_HOST" != "$K3S_AMD_APIHOST"
+ then
+ export K3S_AUTOSSH=1
+ fi
+ export K3S_AUTOSSH_LOCAL_PORT="${K3S_AUTOSSH_LOCAL_PORT:-16443}"
+ export K3S_AUTOSSH_REMOTE_PORT="${K3S_AUTOSSH_REMOTE_PORT:-6443}"
ops config apihost "$K3S_AMD_APIHOST"
- # install cluster (SSH via DNS hostname)
- ops setup server "$K3S_AMD_APIHOST" "${SSH_USER:-root}" --uninstall
- ops setup server "$K3S_AMD_APIHOST" "${SSH_USER:-root}"
+ echo "Using k3s-amd API host: $K3S_AMD_APIHOST"
+ echo "Using k3s-amd SSH host: $K3S_AMD_SSH_HOST"
+ # install cluster via the SSH host, optionally using an autossh kube-apiserver tunnel
+ ops setup server "$K3S_AMD_SSH_HOST" "${SSH_USER:-root}" --uninstall
+ ops setup server "$K3S_AMD_SSH_HOST" "${SSH_USER:-root}"
;;
k3s-arm)
# single ARM VM with k3s installed via ops setup server
ops config reset
K3S_ARM_APIHOST="${K3S_ARM_APIHOST:-${APIHOST:-api.k3s-arm.opstest.top}}"
+ K3S_ARM_SSH_HOST="${K3S_ARM_SSH_HOST:-$K3S_ARM_APIHOST}"
if test -z "$K3S_ARM_APIHOST"
then
echo "ERROR: K3S_ARM_APIHOST is required"
exit 1
fi
+ export K3S_SSH_HOST="$K3S_ARM_SSH_HOST"
+ export K3S_AUTOSSH="${K3S_AUTOSSH:-0}"
+ if test "$K3S_ARM_SSH_HOST" != "$K3S_ARM_APIHOST"
+ then
+ export K3S_AUTOSSH=1
+ fi
+ export K3S_AUTOSSH_LOCAL_PORT="${K3S_AUTOSSH_LOCAL_PORT:-26443}"
+ export K3S_AUTOSSH_REMOTE_PORT="${K3S_AUTOSSH_REMOTE_PORT:-6443}"
ops config apihost "$K3S_ARM_APIHOST"
- # install cluster (SSH via DNS hostname)
- ops setup server "$K3S_ARM_APIHOST" "${SSH_USER:-root}" --uninstall
- ops setup server "$K3S_ARM_APIHOST" "${SSH_USER:-root}"
+ echo "Using k3s-arm API host: $K3S_ARM_APIHOST"
+ echo "Using k3s-arm SSH host: $K3S_ARM_SSH_HOST"
+ # install cluster via the SSH host, optionally using an autossh kube-apiserver tunnel
+ ops setup server "$K3S_ARM_SSH_HOST" "${SSH_USER:-root}" --uninstall
+ ops setup server "$K3S_ARM_SSH_HOST" "${SSH_USER:-root}"
;;
# ---------------------------------------------------------------
(openserverless-testing) 09/18: Add visible ops tracing for k3s test runs
Posted by ms...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
msciabarra pushed a commit to tag kind-469ee67
in repository https://gitbox.apache.org/repos/asf/openserverless-testing.git
commit db4e0f06368fd1825f51694ea962067f4affe89c
Author: miki3421 <mi...@gmail.com>
AuthorDate: Thu Mar 19 19:06:49 2026 +0100
Add visible ops tracing for k3s test runs
---
agent.md | 29 +++++++++++++++++++++++++
tests/1-deploy.sh | 59 +++++++++++++++++++++++++++++++++++++++++++--------
tests/run-gh-suite.sh | 10 ++++++++-
3 files changed, 88 insertions(+), 10 deletions(-)
diff --git a/agent.md b/agent.md
index 49781a6..14d39f3 100644
--- a/agent.md
+++ b/agent.md
@@ -251,3 +251,32 @@
- For the `nuvolaris` work resumed after the Apache release steps, commits and pushes were switched back to the user's account/key:
- SSH key: `~/.ssh/id_ed25519`
- Git email restored to `miki3421@gmail.com` in the operator PR clone before committing the submodule bump
+
+## 2026-03-19 Ops Trace Visibility
+
+### Goal
+
+- Make the GitHub `k3s` test runs show the `ops` shell invocations in clear.
+- Keep a small local trace on the remote `k3s` server so deploy-time `ops setup server ...` calls can be correlated with server-side state.
+
+### Changes made
+
+- In `openserverless-testing/tests/run-gh-suite.sh`:
+ - enabled tracing by default with:
+ - `OPS_TRACE=1`
+ - `K3S_SERVER_TRACE=1`
+ - changed step execution so shell scripts run through `bash -x` when tracing is enabled
+- In `openserverless-testing/tests/1-deploy.sh`:
+ - added `run_logged` to print the exact top-level `ops ...` command before execution
+ - added `append_remote_trace` to append timestamped entries to:
+ - `/var/log/openserverless-testing/ops-trace.log`
+ - on the remote `k3s` server
+ - wired that trace around the deploy-time `ops config apihost` and `ops setup server ...` calls for:
+ - `k3s-amd`
+ - `k3s-arm`
+
+### Expected effect on the next rerun
+
+- GitHub Actions logs will show the shell-expanded test scripts and their `ops` invocations.
+- The remote server should accumulate a lightweight trace file at:
+ - `/var/log/openserverless-testing/ops-trace.log`
diff --git a/tests/1-deploy.sh b/tests/1-deploy.sh
index 7f3ca03..a0e4dc9 100755
--- a/tests/1-deploy.sh
+++ b/tests/1-deploy.sh
@@ -39,13 +39,44 @@ fi
export PREFL_NO_CPU_CHECK=true
export PREFL_NO_MEM_CHECK=true
+run_logged() {
+ printf '+ '
+ printf '%q ' "$@"
+ printf '\n'
+ "$@"
+}
+
+append_remote_trace() {
+ local host="${1:-}"
+ shift || true
+ local message="$*"
+ local remote_user="${SSH_USER:-root}"
+ local remote_log="${K3S_SERVER_TRACE_LOG:-/var/log/openserverless-testing/ops-trace.log}"
+ local remote_dir
+ local timestamp
+ local escaped
+
+ if test "${K3S_SERVER_TRACE:-0}" != "1" || test -z "$host"
+ then
+ return 0
+ fi
+
+ remote_dir="$(dirname "$remote_log")"
+ timestamp="$(date -u +'%Y-%m-%dT%H:%M:%SZ')"
+ escaped="$(printf "%s" "$message" | sed "s/'/'\\\\''/g")"
+
+ ssh -oBatchMode=yes -oStrictHostKeyChecking=no "${remote_user}@${host}" \
+ "sudo mkdir -p '$remote_dir' && printf '%s %s\n' '$timestamp' '$escaped' | sudo tee -a '$remote_log' >/dev/null" \
+ || echo "WARNING: unable to append remote trace on $host" >&2
+}
+
# actual setup
case "$TYPE" in
kind)
# create vm with docker
- ops config reset
- ops setup devcluster --uninstall
- ops setup devcluster
+ run_logged ops config reset
+ run_logged ops setup devcluster --uninstall
+ run_logged ops setup devcluster
;;
k3s-amd)
# single AMD VM with k3s installed via ops setup server
@@ -73,12 +104,17 @@ k3s-amd)
fi
export K3S_AUTOSSH_LOCAL_PORT="${K3S_AUTOSSH_LOCAL_PORT:-16443}"
export K3S_AUTOSSH_REMOTE_PORT="${K3S_AUTOSSH_REMOTE_PORT:-6443}"
- ops config apihost "$K3S_AMD_APIHOST"
+ append_remote_trace "$K3S_AMD_SSH_HOST" "BEGIN deploy selector=$TYPE apihost=$K3S_AMD_APIHOST ssh_host=$K3S_AMD_SSH_HOST autossh=$K3S_AUTOSSH"
+ append_remote_trace "$K3S_AMD_SSH_HOST" "ops config apihost $K3S_AMD_APIHOST"
+ run_logged ops config apihost "$K3S_AMD_APIHOST"
echo "Using k3s-amd API host: $K3S_AMD_APIHOST"
echo "Using k3s-amd SSH host: $K3S_AMD_SSH_HOST"
# install cluster via the SSH host, optionally using an autossh kube-apiserver tunnel
- ops setup server "$K3S_AMD_SSH_HOST" "${SSH_USER:-root}" --uninstall
- ops setup server "$K3S_AMD_SSH_HOST" "${SSH_USER:-root}"
+ append_remote_trace "$K3S_AMD_SSH_HOST" "ops setup server $K3S_AMD_SSH_HOST ${SSH_USER:-root} --uninstall"
+ run_logged ops setup server "$K3S_AMD_SSH_HOST" "${SSH_USER:-root}" --uninstall
+ append_remote_trace "$K3S_AMD_SSH_HOST" "ops setup server $K3S_AMD_SSH_HOST ${SSH_USER:-root}"
+ run_logged ops setup server "$K3S_AMD_SSH_HOST" "${SSH_USER:-root}"
+ append_remote_trace "$K3S_AMD_SSH_HOST" "END deploy selector=$TYPE"
;;
k3s-arm)
# single ARM VM with k3s installed via ops setup server
@@ -98,12 +134,17 @@ k3s-arm)
fi
export K3S_AUTOSSH_LOCAL_PORT="${K3S_AUTOSSH_LOCAL_PORT:-26443}"
export K3S_AUTOSSH_REMOTE_PORT="${K3S_AUTOSSH_REMOTE_PORT:-6443}"
- ops config apihost "$K3S_ARM_APIHOST"
+ append_remote_trace "$K3S_ARM_SSH_HOST" "BEGIN deploy selector=$TYPE apihost=$K3S_ARM_APIHOST ssh_host=$K3S_ARM_SSH_HOST autossh=$K3S_AUTOSSH"
+ append_remote_trace "$K3S_ARM_SSH_HOST" "ops config apihost $K3S_ARM_APIHOST"
+ run_logged ops config apihost "$K3S_ARM_APIHOST"
echo "Using k3s-arm API host: $K3S_ARM_APIHOST"
echo "Using k3s-arm SSH host: $K3S_ARM_SSH_HOST"
# install cluster via the SSH host, optionally using an autossh kube-apiserver tunnel
- ops setup server "$K3S_ARM_SSH_HOST" "${SSH_USER:-root}" --uninstall
- ops setup server "$K3S_ARM_SSH_HOST" "${SSH_USER:-root}"
+ append_remote_trace "$K3S_ARM_SSH_HOST" "ops setup server $K3S_ARM_SSH_HOST ${SSH_USER:-root} --uninstall"
+ run_logged ops setup server "$K3S_ARM_SSH_HOST" "${SSH_USER:-root}" --uninstall
+ append_remote_trace "$K3S_ARM_SSH_HOST" "ops setup server $K3S_ARM_SSH_HOST ${SSH_USER:-root}"
+ run_logged ops setup server "$K3S_ARM_SSH_HOST" "${SSH_USER:-root}"
+ append_remote_trace "$K3S_ARM_SSH_HOST" "END deploy selector=$TYPE"
;;
# ---------------------------------------------------------------
diff --git a/tests/run-gh-suite.sh b/tests/run-gh-suite.sh
index cc45011..7179e6b 100755
--- a/tests/run-gh-suite.sh
+++ b/tests/run-gh-suite.sh
@@ -9,10 +9,13 @@ cd "$(dirname "$0")"
resolve_test_selector "$TEST_INPUT"
export OPS_BRANCH=main
+export OPS_TRACE="${OPS_TRACE:-1}"
+export K3S_SERVER_TRACE="${K3S_SERVER_TRACE:-1}"
echo "*** using $OPS_BRANCH ***"
echo "*** requested tag: $TEST_TAG ***"
echo "*** resolved test: $TEST_NAME -> $TEST_SELECTOR ***"
echo "*** platform: $TEST_PLATFORM | arch: $TEST_ARCH ***"
+echo "*** ops trace: $OPS_TRACE | k3s server trace: $K3S_SERVER_TRACE ***"
if test -n "$TEST_HASH"
then
echo "*** commit hash: $TEST_HASH ***"
@@ -29,7 +32,12 @@ run_step() {
printf '\n[%s] START %s\n' "$(date -u +'%Y-%m-%dT%H:%M:%SZ')" "$label"
set +e
- "$@"
+ if test "${OPS_TRACE:-0}" = "1" && test -f "$1"
+ then
+ bash -x "$@"
+ else
+ "$@"
+ fi
status=$?
set -e
(openserverless-testing) 15/18: Record branch cleanup
Posted by ms...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
msciabarra pushed a commit to tag kind-469ee67
in repository https://gitbox.apache.org/repos/asf/openserverless-testing.git
commit a59df2f2cbb76af6c5edc7ea8efa4673bfce0c15
Author: miki3421 <mi...@gmail.com>
AuthorDate: Fri Mar 20 10:16:10 2026 +0100
Record branch cleanup
---
agent.md | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)
diff --git a/agent.md b/agent.md
index 8279d9a..e37802d 100644
--- a/agent.md
+++ b/agent.md
@@ -391,3 +391,25 @@
- `tests/14-runtime-testing.sh` now derives the repository root from the script location and uses:
- `${REPO_ROOT}/test-runtimes/manifest.yaml`
- This makes the manifest lookup independent from the shell's current working directory.
+
+## 2026-03-20 Branch Cleanup
+
+### Nuvolaris branches removed
+
+- Deleted merged or obsolete remote branches from `nuvolaris/openserverless-testing`:
+ - `feat/pr-tag-platform-arch-testing`
+ - `feat/test-tag-hash-contract`
+- Deleted merged or obsolete remote branches from `nuvolaris/openserverless-task`:
+ - `feat/pr-tag-platform-arch-testing`
+ - `feat/test-tag-hash-contract`
+- Deleted merged or obsolete remote branches from `nuvolaris/openserverless-operator`:
+ - `feat/pr-tag-platform-arch-testing`
+ - `feat/test-tag-hash-contract`
+ - `test/kind-amd-kube-rbac-proxy-registry`
+ - `test/k3s-traefik-crd`
+
+### Local cleanup
+
+- Removed the local `openserverless-operator-nuvolaris-traefik-test` worktree.
+- Deleted the matching local `operator` branches listed above.
+- Left Apache-specific release branches and worktrees untouched.
(openserverless-testing) 05/18: Align testing workflows with - tags
Posted by ms...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
msciabarra pushed a commit to tag kind-469ee67
in repository https://gitbox.apache.org/repos/asf/openserverless-testing.git
commit 80f92529fcc5c6838f4c33c210c930e10c19f2c3
Author: miki3421 <mi...@gmail.com>
AuthorDate: Wed Mar 18 22:08:51 2026 +0100
Align testing workflows with <test>-<hash> tags
---
.github/workflows/operator-pr-test.yaml | 21 +-
.github/workflows/platform-ci-tests.yaml | 9 +-
.github/workflows/task-pr-test.yaml | 21 +-
.github/workflows/tests.yaml | 8 +-
gap.md | 216 ++++++++++++-------
tests/all.sh | 8 +
tests/lib/selector.sh | 89 +++++---
tests/run-gh-suite.sh | 60 ++++--
workflow.md | 348 ++++++++++++++++---------------
9 files changed, 485 insertions(+), 295 deletions(-)
diff --git a/.github/workflows/operator-pr-test.yaml b/.github/workflows/operator-pr-test.yaml
index 1e82bb4..1dd6552 100644
--- a/.github/workflows/operator-pr-test.yaml
+++ b/.github/workflows/operator-pr-test.yaml
@@ -16,7 +16,7 @@
# under the License.
#
name: Operator PR Test
-run-name: "Operator PR #${{ github.event.client_payload.pr_number }} on ${{ github.event.client_payload.selector || github.event.client_payload.platform }}"
+run-name: "Operator PR #${{ github.event.client_payload.pr_number }} on ${{ github.event.client_payload.test_tag || github.event.client_payload.selector || github.event.client_payload.platform }}"
on:
repository_dispatch:
@@ -27,7 +27,9 @@ env:
PR_REF: ${{ github.event.client_payload.pr_ref }}
PR_SHA: ${{ github.event.client_payload.pr_sha }}
OPERATOR_REPO: ${{ github.event.client_payload.operator_repo }}
- SELECTOR: ${{ github.event.client_payload.selector || github.event.client_payload.platform }}
+ TEST_TAG: ${{ github.event.client_payload.test_tag || github.event.client_payload.selector || github.event.client_payload.platform }}
+ TEST_NAME: ${{ github.event.client_payload.test_name || '' }}
+ TEST_HASH: ${{ github.event.client_payload.test_hash || '' }}
OPS_BRANCH: main
OPERATOR_IMAGE: ghcr.io/${{ github.repository_owner }}/openserverless-testing
@@ -55,6 +57,19 @@ jobs:
ls _operator/olaris/opsfile.yml _operator/olaris/opsroot.json
echo "Submodule OK"
+ - name: Show requested test context
+ run: |
+ echo "PR number: $PR_NUMBER"
+ echo "PR ref: $PR_REF"
+ echo "PR sha: $PR_SHA"
+ echo "Requested test tag: $TEST_TAG"
+ if [[ -n "$TEST_NAME" ]]; then
+ echo "Requested test name: $TEST_NAME"
+ fi
+ if [[ -n "$TEST_HASH" ]]; then
+ echo "Requested test hash: $TEST_HASH"
+ fi
+
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
@@ -110,4 +125,4 @@ jobs:
APIHOST: op://OpenServerless/TESTING/APIHOST
- name: Run GitHub Test Suite
- run: tests/run-gh-suite.sh $SELECTOR
+ run: tests/run-gh-suite.sh "$TEST_TAG"
diff --git a/.github/workflows/platform-ci-tests.yaml b/.github/workflows/platform-ci-tests.yaml
index 3fba34c..64976c5 100644
--- a/.github/workflows/platform-ci-tests.yaml
+++ b/.github/workflows/platform-ci-tests.yaml
@@ -15,16 +15,15 @@
# specific language governing permissions and limitations
# under the License.
#
-# Use client_payload.platform attribute to detect the platform being tested.
name: On Tasks Testing Request
-run-name: Tagging openserverless-testing for platform ${{ github.event.client_payload.platform }}
+run-name: Tagging openserverless-testing for ${{ github.event.client_payload.test_tag || format('{0}-{1}', github.event.client_payload.test || github.event.client_payload.platform, github.event.client_payload.hash || github.event.client_payload.tag) }}
on:
repository_dispatch:
types: [ olaris-testing-update ]
env:
- TAG: ${{ format('{0}-{1}', github.event.client_payload.platform, github.event.client_payload.tag) }}
+ TEST_TAG: ${{ github.event.client_payload.test_tag || format('{0}-{1}', github.event.client_payload.test || github.event.client_payload.platform, github.event.client_payload.hash || github.event.client_payload.tag) }}
jobs:
tags-push:
@@ -35,6 +34,6 @@ jobs:
with:
token: ${{ secrets.PAT }}
- name: Tag
- run: git tag $TAG
+ run: git tag $TEST_TAG
- name: Push Tag
- run: git push origin $TAG
\ No newline at end of file
+ run: git push origin $TEST_TAG
diff --git a/.github/workflows/task-pr-test.yaml b/.github/workflows/task-pr-test.yaml
index a2c2054..ffa247e 100644
--- a/.github/workflows/task-pr-test.yaml
+++ b/.github/workflows/task-pr-test.yaml
@@ -16,7 +16,7 @@
# under the License.
#
name: Task PR Test
-run-name: "Task PR #${{ github.event.client_payload.pr_number }} on ${{ github.event.client_payload.selector || github.event.client_payload.platform }}"
+run-name: "Task PR #${{ github.event.client_payload.pr_number }} on ${{ github.event.client_payload.test_tag || github.event.client_payload.selector || github.event.client_payload.platform }}"
on:
repository_dispatch:
@@ -27,7 +27,9 @@ env:
PR_REF: ${{ github.event.client_payload.pr_ref }}
PR_SHA: ${{ github.event.client_payload.pr_sha }}
TASK_REPO: ${{ github.event.client_payload.task_repo }}
- SELECTOR: ${{ github.event.client_payload.selector || github.event.client_payload.platform }}
+ TEST_TAG: ${{ github.event.client_payload.test_tag || github.event.client_payload.selector || github.event.client_payload.platform }}
+ TEST_NAME: ${{ github.event.client_payload.test_name || '' }}
+ TEST_HASH: ${{ github.event.client_payload.test_hash || '' }}
OPS_BRANCH: main
NGROK_TOKEN: ${{ secrets.NGROK_TOKEN }}
@@ -50,6 +52,19 @@ jobs:
ls _task/opsfile.yml _task/opsroot.json
git -C _task rev-parse HEAD
+ - name: Show requested test context
+ run: |
+ echo "PR number: $PR_NUMBER"
+ echo "PR ref: $PR_REF"
+ echo "PR sha: $PR_SHA"
+ echo "Requested test tag: $TEST_TAG"
+ if [[ -n "$TEST_NAME" ]]; then
+ echo "Requested test name: $TEST_NAME"
+ fi
+ if [[ -n "$TEST_HASH" ]]; then
+ echo "Requested test hash: $TEST_HASH"
+ fi
+
- name: Set OPS_ROOT
run: echo "OPS_ROOT=$(pwd)/_task" >> "$GITHUB_ENV"
@@ -75,4 +90,4 @@ jobs:
APIHOST: op://OpenServerless/TESTING/APIHOST
- name: Run GitHub Test Suite
- run: tests/run-gh-suite.sh $SELECTOR
+ run: tests/run-gh-suite.sh "$TEST_TAG"
diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml
index 24fb5f4..44604b4 100644
--- a/.github/workflows/tests.yaml
+++ b/.github/workflows/tests.yaml
@@ -24,7 +24,7 @@ on:
- '*-*'
env:
- PLATFORM: ${{ github.ref_name }}
+ TEST_TAG: ${{ github.ref_name }}
OPS_REPO: ${{ vars.OPS_REPO || 'https://github.com/apache/openserverless-task' }}
OPS_BRANCH: main
NGROK_TOKEN: ${{ secrets.NGROK_TOKEN }}
@@ -70,7 +70,7 @@ jobs:
- name: Wait for Debug (if requested)
run: .github/waitIfDebug.sh
- name: Run GitHub Test Suite
- run: tests/run-gh-suite.sh $PLATFORM
+ run: tests/run-gh-suite.sh "$TEST_TAG"
test-windows:
runs-on: windows-2022
@@ -135,7 +135,7 @@ jobs:
run: .github/waitIfDebug.sh
- name: Run GitHub Test Suite
shell: bash
- run: tests/run-gh-suite.sh $PLATFORM
+ run: tests/run-gh-suite.sh "$TEST_TAG"
test-mac:
runs-on: macOS-14
@@ -183,4 +183,4 @@ jobs:
- name: Wait for Debug (if requested)
run: .github/waitIfDebug.sh
- name: Run GitHub Test Suite
- run: tests/run-gh-suite.sh $PLATFORM
+ run: tests/run-gh-suite.sh "$TEST_TAG"
diff --git a/gap.md b/gap.md
index ae7c35a..8192c7f 100644
--- a/gap.md
+++ b/gap.md
@@ -1,170 +1,234 @@
-# Gap Analysis: PR-driven testing for `openserverless-operator` and `openserverless-task`
+# Gap Analysis: tag-driven PR testing for `openserverless-operator` and `openserverless-task`
+
+Note:
+
+- this document captures the gaps identified before the current implementation branch
+- the branch `feat/test-tag-hash-contract` addresses the trigger contract shift to `<test>-<hash>` and improves test log visibility
+- any remaining gaps below should therefore be read as historical analysis unless they are still explicitly present after merge
## Assumption
-Based on the clarification, the trigger contract is a selector shaped as:
+Based on the latest clarification, the desired trigger contract is:
+
+- `<test>-<hash>`
-- `<platform>-<architecture>`
+Where:
-Example: `k3s-amd`, `k3s-arm`.
+- `test` already encodes the target platform or runtime shape
+- no extra platform or architecture field is needed
+- examples of test names are `k3s` and `k3sarm`
+- `hash` is the commit hash that generated the test request
-The main question is therefore whether a PR in `openserverless-operator` or `openserverless-task` can propagate that selector end-to-end, trigger the right GitHub workflow, and execute on the matching infrastructure.
+The main question is therefore whether a PR in `openserverless-operator` or `openserverless-task` can propagate that tag end-to-end, trigger the right GitHub workflow, and execute the corresponding test on the intended infrastructure.
## Current state found
### Operator path
-- `openserverless-testing/.github/workflows/operator-pr-test.yaml:21-135` already accepts `repository_dispatch` with PR number, ref, sha, repo and platform.
-- `nuvolaris/openserverless-operator/.github/workflows/trigger-testing.yaml:21-90` can dispatch that event, but only from:
- - an issue comment `/testing <platform>`
- - a manual `workflow_dispatch`
+- `openserverless-testing/.github/workflows/operator-pr-test.yaml` accepts `repository_dispatch` with PR number, ref, sha, repo and selector-like data.
+- `nuvolaris/openserverless-operator/.github/workflows/trigger-testing.yaml` currently enables testing from PR labels, not from a `<test>-<hash>` tag.
### Task path
-- `openserverless-testing/.github/workflows/platform-ci-tests.yaml:22-40` accepts `repository_dispatch` type `olaris-testing-update` and converts the payload into a git tag.
-- `openserverless-testing/.github/workflows/tests.yaml:21-97` runs the full test suite on any pushed tag matching `*-*`.
-- `nuvolaris/openserverless-task` currently has no `.github/workflows` directory, so there is no producer for that dispatch.
+- `openserverless-testing/.github/workflows/platform-ci-tests.yaml` accepts `repository_dispatch` type `olaris-testing-update` and converts the payload into a git tag.
+- `openserverless-testing/.github/workflows/tests.yaml` runs the full test suite on any pushed tag matching `*-*`.
+- `nuvolaris/openserverless-task` originally had no workflow producer for that dispatch.
+
+### What was already close to the new specification
+
+- `platform-ci-tests.yaml` already materializes a tag from two fields:
+ - a logical test identifier
+ - a second suffix currently named `tag`
+- `tests.yaml` already treats the incoming trigger generically as `*-*`
+- the historical task flow therefore was structurally closer to `<test>-<hash>` than the newer label contract based on `kind-amd` or `k3s-arm`
## Gaps
-### 1. No end-to-end PR trigger exists for `openserverless-task`
+### 1. The documented trigger contract and the implemented one do not match
Evidence:
-- `platform-ci-tests.yaml` waits for `repository_dispatch` (`olaris-testing-update`), but `nuvolaris/openserverless-task` has no GitHub workflows at all.
+- desired contract is now `<test>-<hash>`
+- current trigger implementation added in the PR flow is based on labels like `kind-amd`, `k3s-amd`, `k3s-arm`
Impact:
-- A PR on `openserverless-task` cannot currently trigger anything in this repository.
+- the system is not yet aligned with the latest specification
+- a PR tag like `k3s-abcdef1` or `k3sarm-abcdef1` is conceptually different from the currently implemented selector labels
-### 2. Operator flow is not tag-driven today
+### 2. No end-to-end PR trigger existed for `openserverless-task`
Evidence:
-- `nuvolaris/openserverless-operator/.github/workflows/trigger-testing.yaml:21-57` only parses:
- - `workflow_dispatch` inputs
- - issue comments starting with `/testing `
+- `platform-ci-tests.yaml` waits for `repository_dispatch` (`olaris-testing-update`)
+- `nuvolaris/openserverless-task` originally had no GitHub workflow producing it
Impact:
-- The current operator flow still requires a comment or manual dispatch instead of a tag-shaped selector propagated automatically from the PR flow.
+- a PR on `openserverless-task` could not trigger anything in `openserverless-testing`
-### 3. The selector contract is only partially implemented across repos
+### 3. The tag contract is only partially implemented across repos
Evidence:
-- `operator` dispatch passes a single `platform` field, whose value is expected to already contain the combined selector such as `k3s-amd`.
-- `platform-ci-tests.yaml:27` builds a tag as `<platform>-<tag>`, but the second field is still generically named `tag`, not `architecture`.
-- `tests.yaml:21-24` reacts to any tag matching `*-*`.
+- `tests.yaml` reacts generically to any tag matching `*-*`
+- `platform-ci-tests.yaml` builds a tag from two payload fields, but still names the first field `platform`
+- there is no canonical schema for:
+ - test name
+ - commit hash
+ - source repository
+ - PR number/ref/sha
Impact:
-- The system has no canonical representation for:
- - which repo is under test
- - which platform/infrastructure should be targeted
- - which architecture is being targeted
- - which PR commit should be tested
+- the system still lacks one explicit contract shared by `operator`, `task`, and `testing`
+- the current codebase does not consistently treat the trigger as `<test>-<hash>`
+- some code paths are semantically aligned already, but their naming is still tied to the older abstraction
-### 4. There is no task-specific PR workflow in `openserverless-testing`
+### 4. The old task tag transport loses PR identity and is not reproducible
Evidence:
-- The operator has a dedicated entry point: `operator-pr-test.yaml:21-135`.
-- The task path only has the generic tag flow: `platform-ci-tests.yaml` -> `tests.yaml`.
+- `platform-ci-tests.yaml` turns the payload into a git tag only
+- that tag does not carry `pr_number`, `pr_ref`, `pr_sha`, or source repository as first-class workflow inputs
+- `tests.yaml` uses static defaults for `OPS_REPO` and `OPS_BRANCH`
Impact:
-- `openserverless-task` does not have a PR-aware execution path comparable to the operator one.
-- The generic tag flow cannot attach PR metadata to the run in the same way.
+- a task-triggered run cannot be pinned reliably to the exact PR commit that requested the test unless the commit identity is explicitly reconstructed from the tag
+- reruns may test different code than the originally requested change
-### 5. The tag-based transport loses PR identity and is not reproducible
+### 5. Tag parsing logic was historically built around split selectors, not `<test>-<hash>`
Evidence:
-- `platform-ci-tests.yaml:27-40` turns the payload into a git tag only.
-- That tag stores no `pr_number`, `pr_ref`, `pr_sha`, or source repository.
-- `tests.yaml:27-29` uses static defaults for `OPS_REPO` and `OPS_BRANCH`.
+- `tests/1-deploy.sh` historically stripped a trailing suffix from the incoming tag
+- many test scripts historically collapsed values at the first `-`
+- this made sense for forms like `k3s-amd` or `k3s-arm`, but not for the new contract where the separator is between test name and commit hash
Impact:
-- A task-triggered run cannot be pinned to the exact PR commit that requested the test.
-- Two runs with the same `<platform>-<tag>` collide.
-- A rerun may test different code than the one originally requested.
+- parsing must be normalized around:
+ - `test`
+ - `hash`
+- not around:
+ - platform
+ - architecture
+- this matters both in shell parsing and in the workflow payload field names
-### 6. Selector parsing is inconsistent with the `<platform>-<architecture>` contract
+### 6. The current implementation still assumes architecture-encoded test names in deploy logic
Evidence:
-- `tests/1-deploy.sh:18-22` keeps selectors like `k3s-amd` and `k3s-arm`, but only strips a trailing numeric suffix.
-- Many later scripts collapse the selector to the first `-` segment, for example:
- - `tests/6-login.sh:18-19`
- - `tests/7-static.sh:18-19`
- - `tests/8-user-redis.sh:18-19`
- - same pattern also appears in `tests/9a-user-ferretdb.sh`, `tests/9b-user-postgres.sh`, `tests/10-user-minio.sh`, `tests/14-runtime-testing.sh`
+- deploy/test support in `tests/1-deploy.sh` is centered on names like `kind`, `k3s-amd`, `k3s-arm`, `k8s`
+- the new examples provided are `k3s` and `k3sarm`
Impact:
-- The selector is not preserved consistently end-to-end.
-- `k3s-amd` and `k3s-arm` are distinguished in deploy, but become just `k3s` in many subsequent test steps.
+- there is a naming mismatch between the latest desired contract and the currently supported deploy/test names
+- either:
+ - test names must be normalized to the new canonical names
+ - or the specification must explicitly preserve the current names
+
+Clarification:
+
+- under the latest requirement, the platform distinction is not a second dimension
+- it is already encoded in the test name itself
### 7. Platform support is incomplete in the actual deploy path
Evidence:
-- `tests/1-deploy.sh:45-79` actively supports only `kind`, `k3s-amd`, `k3s-arm`.
-- `tests/1-deploy.sh:86-212` has `mk8s`, `eks`, `aks`, `gke`, `osh` commented out.
-- `tests/1-deploy.sh:214-229` supports generic `k8s`.
-- `tests/all.sh:29-37` still advertises more platforms than `1-deploy.sh` actually enables.
+- active deploy support in `tests/1-deploy.sh` is limited
+- several other targets remain commented out
Impact:
-- "Selected infrastructure" is only partially true today.
-- Any tag/label selecting `mk8s`, `eks`, `aks`, `gke`, or `osh` will not reach a working deploy path in the current GitHub workflow.
+- even with a correct `<test>-<hash>` contract, only a subset of tests can currently execute end-to-end
-### 8. Operator PR execution is not pinned to the requested SHA
+### 8. Operator PR execution originally was not pinned to the requested SHA
Evidence:
-- `operator-pr-test.yaml:45-49` clones `--branch "$PR_REF"` but does not checkout `PR_SHA`.
-- `PR_SHA` is only used for the image tag at `operator-pr-test.yaml:69-75`.
+- the earlier operator PR flow cloned the PR branch without checking out the requested `PR_SHA`
Impact:
-- If the PR branch moves after dispatch, the workflow may build and test a newer commit than the one that triggered the run.
+- if the branch moved after dispatch, the workflow could test code different from the commit that requested the run
+
+Note:
-### 9. There is no equivalent "materialize PR code locally" step for `openserverless-task`
+- this was one of the concrete problems identified during implementation and has already been addressed in the new workflow changes
+
+### 9. There was no equivalent "materialize PR code locally" step for `openserverless-task`
Evidence:
-- Operator flow clones the PR repo and patches `_operator/olaris/opsroot.json`, then exports `OPS_ROOT` (`operator-pr-test.yaml:45-87`).
-- The generic tag flow in `tests.yaml` does not clone `openserverless-task`, does not checkout a PR ref/sha, and does not set `OPS_ROOT`.
+- operator flow had dedicated PR checkout logic
+- generic task tag flow did not clone `openserverless-task` at the requested PR revision
Impact:
-- Even after adding a PR trigger in `openserverless-task`, this repo still lacks the execution path required to test the actual PR contents instead of a default branch.
+- task PRs could not be tested against their actual contents in a deterministic way
-### 10. Validation and guardrails are missing
+### 10. Validation and guardrails are still tied to the wrong abstraction
Evidence:
-- `platform-ci-tests.yaml:27-40` accepts raw `platform` and `tag` strings and pushes them directly as git tags.
-- `operator-pr-test.yaml:26-30` accepts raw payload fields and passes `platform` directly into the test scripts.
+- the recent implementation validates selector-like values
+- the latest specification says the trigger should be `<test>-<hash>`
Impact:
-- Unsupported `<platform>-<architecture>` combinations fail late, inside the test workflow.
-- There is no central allowlist for valid repositories or selectors.
+- validation should move to:
+ - allowed test names
+ - valid commit-hash format
+- instead of validating synthetic platform-architecture pairs
+
+### 11. Workflow and payload naming still use legacy terms
+
+Evidence:
+
+- `platform-ci-tests.yaml` still refers to `client_payload.platform`
+- several documents and scripts still speak about selector or platform-architecture values
+
+Impact:
+
+- even where behavior is compatible with `<test>-<hash>`, the naming remains misleading
+- future maintenance will be error-prone until the terminology becomes:
+ - `test`
+ - `hash`
+ - source repo / PR metadata
+
+## What in the previous analysis was still useful
+
+These earlier findings remain relevant even after the specification change:
+
+1. the system needed a real PR trigger for `openserverless-task`
+2. the task tag flow was losing PR identity
+3. parsing was inconsistent and needed normalization
+4. deploy support was only partial
+5. deterministic checkout by SHA was missing in some paths
+6. workflow naming was obscuring the real trigger contract
-## Minimum missing pieces before the target flow can work
+## Minimum missing pieces under the new specification
1. A single trigger contract shared by `operator`, `task`, and `testing`:
- repo
- pr number
- ref
- sha
- - selector `<platform>-<architecture>`
-2. A PR-trigger workflow in `nuvolaris/openserverless-task`.
-3. A task-specific workflow in `openserverless-testing` that checks out the requested task PR revision, not just a tag.
-4. Deterministic checkout by SHA for both operator and task flows.
-5. A routing layer in `openserverless-testing` that maps `<platform>-<architecture>` to supported infrastructures.
-6. A normalized parser for selectors, instead of the current mixed comment/tag/string conventions.
+ - tag `<test>-<hash>`
+2. A clear canonical list of test names:
+ - for example `k3s`, `k3sarm`, `kind`
+3. Parsing logic that extracts:
+ - test name
+ - commit hash
+4. A task-specific workflow in `openserverless-testing` that checks out the requested task PR revision, not just a tag
+5. Deterministic checkout by SHA for both operator and task flows
+6. A mapping layer in `openserverless-testing` from canonical test name to the actual infrastructure setup used by the tests
+7. Terminology cleanup so workflows, payloads and docs consistently say:
+ - `test`
+ - `hash`
+ - not `platform`
+ - not `architecture`
diff --git a/tests/all.sh b/tests/all.sh
index 90d9a85..96084a3 100755
--- a/tests/all.sh
+++ b/tests/all.sh
@@ -19,6 +19,14 @@
resolve_test_selector "${1:?test selector}"
TYPE="$TEST_SELECTOR"
+echo "*** requested tag: $TEST_TAG ***"
+echo "*** resolved test: $TEST_NAME -> $TEST_SELECTOR ***"
+echo "*** platform: $TEST_PLATFORM | arch: $TEST_ARCH ***"
+if test -n "$TEST_HASH"
+then
+ echo "*** commit hash: $TEST_HASH ***"
+fi
+
# Always use the main OPS branch for the local all.sh sequence.
export OPS_BRANCH=main
echo "*** using $OPS_BRANCH ***"
diff --git a/tests/lib/selector.sh b/tests/lib/selector.sh
index 9a55bf5..c6ebe45 100755
--- a/tests/lib/selector.sh
+++ b/tests/lib/selector.sh
@@ -4,50 +4,91 @@ resolve_test_selector() {
local raw_selector="${1:?test selector}"
local selector="$raw_selector"
- if [[ "$selector" =~ ^(.+)-([0-9]{6,})$ ]]; then
- selector="${BASH_REMATCH[1]}"
+ TEST_TAG="$raw_selector"
+ TEST_HASH=""
+
+ if [[ "$selector" =~ ^([a-z0-9]+)-([0-9a-f]{7,40})$ ]]; then
+ TEST_NAME="${BASH_REMATCH[1]}"
+ TEST_HASH="${BASH_REMATCH[2]}"
+ else
+ TEST_NAME="$selector"
fi
- case "$selector" in
- kind | kind-amd | kind-arm)
+ case "$TEST_NAME" in
+ kind | kind-amd)
TEST_SELECTOR="kind"
TEST_PLATFORM="kind"
- TEST_ARCH="${selector#kind-}"
+ TEST_ARCH="amd"
+ ;;
+ k3s | k3s-amd)
+ TEST_SELECTOR="k3s-amd"
+ TEST_PLATFORM="k3s"
+ TEST_ARCH="amd"
;;
- k8s | k8s-amd | k8s-arm)
+ k3sarm | k3s-arm)
+ TEST_SELECTOR="k3s-arm"
+ TEST_PLATFORM="k3s"
+ TEST_ARCH="arm"
+ ;;
+ k8s | k8s-amd)
TEST_SELECTOR="k8s"
TEST_PLATFORM="k8s"
- TEST_ARCH="${selector#k8s-}"
+ TEST_ARCH="amd"
;;
- k3s-amd | k3s-arm)
- TEST_SELECTOR="$selector"
- TEST_PLATFORM="k3s"
- TEST_ARCH="${selector#k3s-}"
+ k8sarm | k8s-arm)
+ TEST_SELECTOR="k8s"
+ TEST_PLATFORM="k8s"
+ TEST_ARCH="arm"
+ ;;
+ mk8s | mk8s-amd)
+ TEST_SELECTOR="mk8s"
+ TEST_PLATFORM="mk8s"
+ TEST_ARCH="amd"
;;
- mk8s | mk8s-amd | mk8s-arm)
+ mk8sarm | mk8s-arm)
TEST_SELECTOR="mk8s"
TEST_PLATFORM="mk8s"
- TEST_ARCH="${selector#mk8s-}"
+ TEST_ARCH="arm"
+ ;;
+ eks | eks-amd)
+ TEST_SELECTOR="eks"
+ TEST_PLATFORM="eks"
+ TEST_ARCH="amd"
;;
- eks | eks-amd | eks-arm)
+ eksarm | eks-arm)
TEST_SELECTOR="eks"
TEST_PLATFORM="eks"
- TEST_ARCH="${selector#eks-}"
+ TEST_ARCH="arm"
;;
- aks | aks-amd | aks-arm)
+ aks | aks-amd)
TEST_SELECTOR="aks"
TEST_PLATFORM="aks"
- TEST_ARCH="${selector#aks-}"
+ TEST_ARCH="amd"
;;
- gke | gke-amd | gke-arm)
+ aksarm | aks-arm)
+ TEST_SELECTOR="aks"
+ TEST_PLATFORM="aks"
+ TEST_ARCH="arm"
+ ;;
+ gke | gke-amd)
TEST_SELECTOR="gke"
TEST_PLATFORM="gke"
- TEST_ARCH="${selector#gke-}"
+ TEST_ARCH="amd"
;;
- osh | osh-amd | osh-arm)
+ gkearm | gke-arm)
+ TEST_SELECTOR="gke"
+ TEST_PLATFORM="gke"
+ TEST_ARCH="arm"
+ ;;
+ osh | osh-amd)
+ TEST_SELECTOR="osh"
+ TEST_PLATFORM="osh"
+ TEST_ARCH="amd"
+ ;;
+ osharm | osh-arm)
TEST_SELECTOR="osh"
TEST_PLATFORM="osh"
- TEST_ARCH="${selector#osh-}"
+ TEST_ARCH="arm"
;;
*)
echo "ERROR: unsupported test selector '$raw_selector'" >&2
@@ -55,9 +96,5 @@ resolve_test_selector() {
;;
esac
- if [[ "$TEST_ARCH" == "$selector" ]]; then
- TEST_ARCH="amd"
- fi
-
- export TEST_SELECTOR TEST_PLATFORM TEST_ARCH
+ export TEST_TAG TEST_NAME TEST_HASH TEST_SELECTOR TEST_PLATFORM TEST_ARCH
}
diff --git a/tests/run-gh-suite.sh b/tests/run-gh-suite.sh
index abd7e8d..bcee7e7 100755
--- a/tests/run-gh-suite.sh
+++ b/tests/run-gh-suite.sh
@@ -1,24 +1,58 @@
#!/bin/bash
set -euo pipefail
-SELECTOR="${1:?test selector}"
+TEST_INPUT="${1:?test selector}"
cd "$(dirname "$0")"
+. "$(dirname "$0")/lib/selector.sh"
+resolve_test_selector "$TEST_INPUT"
+
export OPS_BRANCH=main
echo "*** using $OPS_BRANCH ***"
+echo "*** requested tag: $TEST_TAG ***"
+echo "*** resolved test: $TEST_NAME -> $TEST_SELECTOR ***"
+echo "*** platform: $TEST_PLATFORM | arch: $TEST_ARCH ***"
+if test -n "$TEST_HASH"
+then
+ echo "*** commit hash: $TEST_HASH ***"
+fi
touch ../.secrets
-./1-deploy.sh "$SELECTOR"
-./3-sys-redis.sh "$SELECTOR"
-./4a-sys-ferretdb.sh "$SELECTOR"
-./4b-sys-postgres.sh "$SELECTOR"
-./5-sys-minio.sh "$SELECTOR"
-./6-login.sh "$SELECTOR"
-./7-static.sh "$SELECTOR"
-./8-user-redis.sh "$SELECTOR"
-./9a-user-ferretdb.sh "$SELECTOR"
-./9b-user-postgres.sh "$SELECTOR"
-./10-user-minio.sh "$SELECTOR"
-./14-runtime-testing.sh "$SELECTOR"
+run_step() {
+ local label="${1:?step label}"
+ shift
+ local status=0
+
+ echo "::group::$label"
+ printf '\n[%s] START %s\n' "$(date -u +'%Y-%m-%dT%H:%M:%SZ')" "$label"
+
+ set +e
+ "$@"
+ status=$?
+ set -e
+
+ if test "$status" -eq 0
+ then
+ printf '[%s] PASS %s\n\n' "$(date -u +'%Y-%m-%dT%H:%M:%SZ')" "$label"
+ else
+ printf '[%s] FAIL %s (exit %s)\n\n' "$(date -u +'%Y-%m-%dT%H:%M:%SZ')" "$label" "$status"
+ fi
+
+ echo "::endgroup::"
+ return "$status"
+}
+
+run_step "Deploy ($TEST_SELECTOR)" ./1-deploy.sh "$TEST_INPUT"
+run_step "System Redis ($TEST_SELECTOR)" ./3-sys-redis.sh "$TEST_INPUT"
+run_step "System FerretDB ($TEST_SELECTOR)" ./4a-sys-ferretdb.sh "$TEST_INPUT"
+run_step "System Postgres ($TEST_SELECTOR)" ./4b-sys-postgres.sh "$TEST_INPUT"
+run_step "System Minio ($TEST_SELECTOR)" ./5-sys-minio.sh "$TEST_INPUT"
+run_step "Login ($TEST_SELECTOR)" ./6-login.sh "$TEST_INPUT"
+run_step "Static ($TEST_SELECTOR)" ./7-static.sh "$TEST_INPUT"
+run_step "User Redis ($TEST_SELECTOR)" ./8-user-redis.sh "$TEST_INPUT"
+run_step "User FerretDB ($TEST_SELECTOR)" ./9a-user-ferretdb.sh "$TEST_INPUT"
+run_step "User Postgres ($TEST_SELECTOR)" ./9b-user-postgres.sh "$TEST_INPUT"
+run_step "User Minio ($TEST_SELECTOR)" ./10-user-minio.sh "$TEST_INPUT"
+run_step "Runtime Testing ($TEST_SELECTOR)" ./14-runtime-testing.sh "$TEST_INPUT"
diff --git a/workflow.md b/workflow.md
index 3126c09..d3e50d5 100644
--- a/workflow.md
+++ b/workflow.md
@@ -1,224 +1,221 @@
# Workflow Notes
+Note:
+
+- this document describes both the historical state and the target contract
+- the branch `feat/test-tag-hash-contract` implements the `<test>-<hash>` trigger flow and clearer step-by-step test logging
+- references below to the earlier selector-style contract are kept only to explain the transition
+
## Repositories involved
- `nuvolaris/openserverless-operator`
- `nuvolaris/openserverless-task`
- `nuvolaris/openserverless-testing`
-## Goal
+## Latest desired contract
-Enable a PR in `openserverless-operator` or `openserverless-task` to trigger the corresponding test workflow in `openserverless-testing`, using a PR label/tag shaped as:
+The latest specification says the trigger should be:
-- `<platform>-<architecture>`
+- `<test>-<hash>`
-Examples:
+Where:
-- `k3s-amd`
-- `k3s-arm`
-- `kind-amd`
+- `test` already includes the platform distinction
+- no extra platform or architecture field is needed
+- examples given are:
+ - `k3s`
+ - `k3sarm`
+- `hash` is the commit hash that generated the test
-## Current repositories and branches used during this analysis
+This is different from the earlier interpretation based on selectors like `k3s-amd` or `kind-amd`.
-Implementation work was pushed to:
+The key clarification is:
-- `feat/pr-tag-platform-arch-testing` in `openserverless-testing`
-- `feat/pr-tag-platform-arch-testing` in `openserverless-operator`
-- `feat/pr-tag-platform-arch-testing` in `openserverless-task`
+- platform is already part of the test name
+- there is no independent platform or architecture dimension to reconstruct later
## Important GitHub Actions behavior
### Why branch-only changes are not enough for end-to-end PR testing
-For the new PR-trigger flow:
+For PR-triggered flows:
- source repos use `pull_request_target`
- `pull_request_target` reads the workflow from the base branch of the PR
-- `repository_dispatch` workflows in `openserverless-testing` must also exist on the target branch used by GitHub
+- `repository_dispatch` workflows in `openserverless-testing` must also exist on the branch GitHub uses for the target repo
Practical consequence:
-- opening a PR on `openserverless-operator` against `main` does not automatically use the new trigger logic if that logic only exists in the PR branch
-- the new flow becomes real only after the relevant workflow changes are available on the base branch, typically `main`
+- opening a PR against `main` does not automatically use workflow logic that exists only in the PR branch
+- the new behavior becomes real only after the relevant workflow changes are available on `main`
+
+## What was implemented during this work
+
+### Source repo triggers
+
+Feature branches added PR-trigger logic in:
+
+- `openserverless-operator/.github/workflows/trigger-testing.yaml`
+- `openserverless-task/.github/workflows/trigger-testing.yaml`
+
+Those changes currently enable testing from PR labels and dispatch to `openserverless-testing`.
+That behavior was enough to validate the PR-trigger pipeline, but its naming contract is still older than the final requirement.
+
+### Testing repo flows
+
+Feature branches added or updated:
+
+- `openserverless-testing/.github/workflows/operator-pr-test.yaml`
+- `openserverless-testing/.github/workflows/task-pr-test.yaml`
+- `openserverless-testing/.github/workflows/tests.yaml`
+
+Main improvements introduced:
+
+- deterministic checkout by `PR_SHA`
+- dedicated task PR workflow
+- common test sequence extraction
+- more consistent selector parsing than before
+- explicit `OPS_BRANCH=main` in the shared GitHub test path
+
+## Important note: current implementation vs latest specification
+
+The implemented PR-trigger flow was built around label values like:
+
+- `kind-amd`
+- `k3s-amd`
+- `k3s-arm`
+
+The latest specification instead says the tag should be:
-Minimum merge set for real usage:
+- `<test>-<hash>`
-1. merge `openserverless-testing`
-2. merge `openserverless-operator`
-3. merge `openserverless-task` if task PRs must also trigger tests
+Examples:
+
+- `k3s-<hash>`
+- `k3sarm-<hash>`
+
+So the code currently merged on `main` improved the trigger pipeline, but it is not yet fully aligned with this final naming contract.
+
+One important nuance:
-## Current testing flow before the new changes
+- the older tag-driven task path in `platform-ci-tests.yaml` is structurally closer to `<test>-<hash>`
+- the newer selector-based PR trigger improved orchestration and PR metadata handling, but uses the wrong external naming contract
+
+## Historical testing flow
### Operator
-Existing trigger path:
+Previous operator path:
1. `openserverless-operator/.github/workflows/trigger-testing.yaml`
-2. trigger came from:
+2. trigger originally came from:
- issue comment `/testing <platform>`
- manual `workflow_dispatch`
-3. workflow collected:
- - PR number
- - PR ref
- - PR sha
- - source repo
- - platform selector
-4. workflow dispatched `repository_dispatch` to `openserverless-testing`
-5. `openserverless-testing/.github/workflows/operator-pr-test.yaml` built a temporary operator image and executed tests
+3. workflow dispatched `repository_dispatch` to `openserverless-testing`
+4. `openserverless-testing/.github/workflows/operator-pr-test.yaml` built a temporary operator image and ran tests
### Task
-Existing trigger path:
+Previous task path:
-1. `openserverless-testing/.github/workflows/platform-ci-tests.yaml` could receive `repository_dispatch`
-2. it converted payload into a git tag
+1. `openserverless-testing/.github/workflows/platform-ci-tests.yaml` accepted `repository_dispatch`
+2. payload was converted into a git tag
3. `openserverless-testing/.github/workflows/tests.yaml` ran tests on tag push
-Missing piece:
-
-- `openserverless-task` had no `.github/workflows` directory, so there was no workflow producing that dispatch from a PR
+Original missing piece:
-## New testing flow implemented in the feature branches
+- `openserverless-task` did not have a workflow producer for that dispatch
-### Source of truth for enabling tests
+What was already aligned in spirit:
-A PR label/tag matching one of these selectors enables the process:
+- `platform-ci-tests.yaml` already creates a tag from two parts
+- `tests.yaml` already accepts any tag matching `*-*`
+- this means the historical task path was already closer to a canonical `<test>-<hash>` trigger than the later `kind-amd` style label naming
-- `kind-amd`
-- `kind-arm`
-- `k3s-amd`
-- `k3s-arm`
-- `k8s-amd`
-- `k8s-arm`
-- `mk8s-amd`
-- `mk8s-arm`
-- `eks-amd`
-- `eks-arm`
-- `aks-amd`
-- `aks-arm`
-- `gke-amd`
-- `gke-arm`
-- `osh-amd`
-- `osh-arm`
-
-### Operator flow after the feature changes
+## Current code paths that are still useful under the new contract
-Files:
+Even with the new `<test>-<hash>` specification, these pieces remain useful:
-- `openserverless-operator/.github/workflows/trigger-testing.yaml`
- `openserverless-testing/.github/workflows/operator-pr-test.yaml`
+ Purpose:
+ checkout operator PR by SHA, build temporary image, run tests
+- `openserverless-testing/.github/workflows/task-pr-test.yaml`
+ Purpose:
+ checkout task PR by SHA and run tests from the requested PR contents
+- `openserverless-testing/.github/workflows/tests.yaml`
+ Purpose:
+ generic tag-based test entry point for `*-*`
+- `openserverless-testing/tests/run-gh-suite.sh`
+ Purpose:
+ central GitHub test sequence
-Flow:
-
-1. PR in `openserverless-operator` receives a valid label
-2. `pull_request_target` runs on:
- - `labeled`
- - `synchronize`
- - `reopened`
-3. workflow scans PR labels and picks the first valid `<platform>-<architecture>` selector
-4. workflow fetches PR details via `gh api`
-5. workflow dispatches `operator-pr-test` to `openserverless-testing`
-6. testing workflow clones the operator PR branch
-7. testing workflow explicitly checks out the requested `PR_SHA`
-8. testing workflow builds a temporary operator image
-9. testing workflow patches `opsroot.json`
-10. testing workflow runs the test suite on the selected infrastructure
+## What needs realignment for the latest specification
-### Task flow after the feature changes
+### 1. Trigger naming
-Files:
+The system must treat the tag as:
-- `openserverless-task/.github/workflows/trigger-testing.yaml`
-- `openserverless-testing/.github/workflows/task-pr-test.yaml`
+- `<test>-<hash>`
-Flow:
+Not as:
-1. PR in `openserverless-task` receives a valid label
-2. `pull_request_target` runs on:
- - `labeled`
- - `synchronize`
- - `reopened`
-3. workflow scans PR labels and picks the first valid selector
-4. workflow fetches PR details via `gh api`
-5. workflow dispatches `task-pr-test` to `openserverless-testing`
-6. testing workflow clones the task PR branch
-7. testing workflow explicitly checks out the requested `PR_SHA`
-8. testing workflow sets `OPS_ROOT` to the checked out task tree
-9. testing workflow runs the test suite on the selected infrastructure
+- `<platform>-<architecture>`
-## Changes made in `openserverless-testing`
+### 2. Canonical test names
-### New workflows
+The system needs one stable list of accepted test names.
-- `./.github/workflows/task-pr-test.yaml`
+Examples currently mentioned by the latest clarification:
-Purpose:
+- `k3s`
+- `k3sarm`
-- dedicated repository-dispatch workflow for PR testing of `openserverless-task`
+That means the code should not rely on split forms like:
-### Updated workflows
+- `k3s-amd`
+- `k3s-arm`
-- `./.github/workflows/operator-pr-test.yaml`
-- `./.github/workflows/tests.yaml`
+unless those remain officially supported aliases.
-Main updates:
+### 3. Parser behavior
-- operator PR testing now checks out the exact requested SHA
-- common test execution is centralized through `tests/run-gh-suite.sh`
-- selector is passed consistently as one input to the suite
+Parsing should extract:
-### New selector normalization
+- `test`
+- `hash`
-Files:
+The earlier selector parser was built for names that embedded an extra `-amd` or `-arm` part.
-- `./tests/lib/selector.sh`
-- `./tests/run-gh-suite.sh`
+### 4. Mapping from test name to infrastructure
-Purpose:
+Because platform is already encoded in the test name, the test runner should map:
-- normalize `<platform>-<architecture>` once
-- preserve distinctions like `k3s-amd` vs `k3s-arm`
-- remove inconsistent parsing scattered across test scripts
+- `k3s` -> the corresponding infrastructure path
+- `k3sarm` -> the corresponding infrastructure path
-### Test scripts updated to use shared selector parsing
+instead of reconstructing platform and architecture as separate dimensions.
-Updated:
+### 5. Workflow payload naming
-- `./tests/1-deploy.sh`
-- `./tests/2-ssl.sh`
-- `./tests/6-login.sh`
-- `./tests/7-static.sh`
-- `./tests/8-user-redis.sh`
-- `./tests/9a-user-ferretdb.sh`
-- `./tests/9b-user-postgres.sh`
-- `./tests/10-user-minio.sh`
-- `./tests/12-nuv-mac.sh`
-- `./tests/14-runtime-testing.sh`
-- `./tests/all.sh`
+Even where behavior is already close, workflow fields should stop implying a separate platform dimension.
-Why this mattered:
+Examples of terminology that should be renamed in the next code alignment:
-- before the change, many scripts reduced `k3s-amd` and `k3s-arm` to `k3s`
-- deploy logic distinguished them, but later test steps did not preserve the selector consistently
+- `platform` -> `test`
+- selector -> tag or test selector only if it really means `<test>-<hash>`
-## Current deploy/test platform support in `openserverless-testing`
+## Current deploy/test support in `openserverless-testing`
-Effective support in `tests/1-deploy.sh`:
+Current deploy logic is still based on names such as:
- `kind`
- `k3s-amd`
- `k3s-arm`
- `k8s`
-Present but commented out in deploy path:
-
-- `mk8s`
-- `eks`
-- `aks`
-- `gke`
-- `osh`
+This is one of the main remaining mismatches with the latest desired naming.
-This means the label set is broader than the currently active deploy implementation. Some selectors are accepted by workflow validation, but their deploy path still depends on commented or incomplete code in `tests/1-deploy.sh`.
+The current deploy logic therefore supports the infrastructure execution, but not yet the final canonical naming expected by the new contract.
## Operator image build and publication
@@ -231,15 +228,16 @@ File:
What happens:
1. testing workflow clones the operator PR
-2. builds an image from the PR source
-3. pushes it to GHCR as a temporary test image
-4. patches the task configuration to use that image during tests
+2. checks out the requested `PR_SHA`
+3. builds an image from the PR source
+4. pushes it to GHCR as a temporary test image
+5. patches the task configuration to use that image during tests
Destination:
- `ghcr.io/<repository_owner>/openserverless-testing:pr-<PR_NUMBER>-<SHORT_SHA>`
-This is a testing image, not the official published operator image.
+This is only the test image.
### Official operator image publication
@@ -255,8 +253,8 @@ Trigger:
Important conclusion:
-- there is currently no automatic path from “PR tests passed” to “publish official operator image”
-- publication depends on a tag push
+- there is no automatic path today from “PR tests passed” to “publish official operator image”
+- official publication still depends on pushing a release tag
### Where the official operator image is published
@@ -282,7 +280,7 @@ Actual push implementation:
There is no workflow that automatically creates the release tag after tests or after merge.
-Current tag creation is manual or task-driven:
+Current tag creation remains manual or task-driven:
- `openserverless-operator/Taskfile.yml` task `tag`
- `openserverless-operator/Taskfile.yml` task `tag-commit-push`
@@ -291,41 +289,61 @@ So the current release path is:
1. someone creates or pushes a numeric version tag
2. tag push triggers `image.yml`
-3. `image.yml` runs tests/build and then publishes the official image
+3. `image.yml` builds and publishes the official image
## Validation performed during implementation
-Static checks executed:
+Static checks executed during the implementation work:
- `bash -n` on updated shell scripts in `openserverless-testing`
- YAML parsing with Ruby for modified workflows in all three repositories
-- quick selector parsing checks for:
- - `kind-amd`
- - `k3s-arm`
- - `k8s-arm`
+- a real trigger validation using:
+ - an operator PR
+ - label `kind-amd`
+ - successful dispatch into `openserverless-testing`
-Not executed:
+That real validation confirmed:
-- full end-to-end GitHub Actions run on live PRs
-- real registry publication test for the final operator release image
+- the PR-trigger pipeline works
+- `repository_dispatch` reaches `openserverless-testing`
+- the operator PR test workflow starts correctly
+
+But it validated the selector-style contract, not yet the final `<test>-<hash>` contract.
## Open points
-### 1. Label naming
+### 1. Exact meaning of “tag”
+
+The latest requirement uses the word “tag” as:
+
+- `<test>-<hash>`
+
+This should now become the canonical name everywhere in code and docs.
+
+### 2. Transition plan
+
+There are now two conceptual layers:
+
+- trigger pipeline improvements already implemented and merged
+- final naming contract `<test>-<hash>` still to be aligned
-The implementation assumes GitHub PR labels are the “tag” mentioned in the process description.
+### 3. Next update needed in code
-### 2. Multiple valid labels on the same PR
+To fully align the codebase, the next round should update:
-Current logic picks the first matching valid selector found on the PR.
+- trigger parsing
+- validation rules
+- test-name allowlists
+- deploy mapping
+- workflow payload field names
+- documentation
-### 3. Release automation
+so everything consistently speaks in terms of:
-If desired, a future improvement could connect:
+- `test`
+- `hash`
-- PR test success
-- merge to `main`
-- release tag creation
-- official image publication
+and no longer in terms of:
-Today these are still separate processes.
+- platform
+- architecture
(openserverless-testing) 01/18: Add selector-driven PR testing flow
Posted by ms...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
msciabarra pushed a commit to tag kind-469ee67
in repository https://gitbox.apache.org/repos/asf/openserverless-testing.git
commit 8efca5f86085d0892ced329206af70bed39abf36
Author: miki3421 <mi...@gmail.com>
AuthorDate: Wed Mar 18 17:04:30 2026 +0100
Add selector-driven PR testing flow
---
.github/workflows/operator-pr-test.yaml | 33 +------
.github/workflows/task-pr-test.yaml | 77 +++++++++++++++
.github/workflows/tests.yaml | 95 ++----------------
gap.md | 170 ++++++++++++++++++++++++++++++++
tests/1-deploy.sh | 8 +-
tests/10-user-minio.sh | 5 +-
tests/12-nuv-mac.sh | 5 +-
tests/14-runtime-testing.sh | 5 +-
tests/2-ssl.sh | 4 +-
tests/6-login.sh | 5 +-
tests/7-static.sh | 5 +-
tests/8-user-redis.sh | 5 +-
tests/9a-user-ferretdb.sh | 5 +-
tests/9b-user-postgres.sh | 5 +-
tests/all.sh | 7 +-
tests/lib/selector.sh | 63 ++++++++++++
tests/run-gh-suite.sh | 21 ++++
17 files changed, 375 insertions(+), 143 deletions(-)
diff --git a/.github/workflows/operator-pr-test.yaml b/.github/workflows/operator-pr-test.yaml
index 90ed406..994d13c 100644
--- a/.github/workflows/operator-pr-test.yaml
+++ b/.github/workflows/operator-pr-test.yaml
@@ -16,7 +16,7 @@
# under the License.
#
name: Operator PR Test
-run-name: "Operator PR #${{ github.event.client_payload.pr_number }} on ${{ github.event.client_payload.platform }}"
+run-name: "Operator PR #${{ github.event.client_payload.pr_number }} on ${{ github.event.client_payload.selector || github.event.client_payload.platform }}"
on:
repository_dispatch:
@@ -27,7 +27,7 @@ env:
PR_REF: ${{ github.event.client_payload.pr_ref }}
PR_SHA: ${{ github.event.client_payload.pr_sha }}
OPERATOR_REPO: ${{ github.event.client_payload.operator_repo }}
- PLATFORM: ${{ github.event.client_payload.platform }}
+ SELECTOR: ${{ github.event.client_payload.selector || github.event.client_payload.platform }}
OPERATOR_IMAGE: ghcr.io/${{ github.repository_owner }}/openserverless-testing
NGROK_TOKEN: ${{ secrets.NGROK_TOKEN }}
@@ -46,6 +46,7 @@ jobs:
run: |
git clone --recurse-submodules --branch "$PR_REF" \
"https://github.com/$OPERATOR_REPO.git" _operator
+ git -C _operator checkout "$PR_SHA"
- name: Verify submodule
run: |
@@ -107,29 +108,5 @@ jobs:
K8S_APIHOST: op://OpenServerless/TESTING/K8S_APIHOST
APIHOST: op://OpenServerless/TESTING/APIHOST
- - name: 1 Deploy
- run: |
- touch .secrets
- tests/1-deploy.sh $PLATFORM
- - name: 3 SysRedis
- run: tests/3-sys-redis.sh $PLATFORM
- - name: 4 SysMongo
- run: tests/4a-sys-ferretdb.sh $PLATFORM
- - name: 4b SysPostgres
- run: tests/4b-sys-postgres.sh $PLATFORM
- - name: 5 SysMinio
- run: tests/5-sys-minio.sh $PLATFORM
- - name: 6 Login
- run: tests/6-login.sh $PLATFORM
- - name: 7 Static
- run: tests/7-static.sh $PLATFORM
- - name: 8 UserRedis
- run: tests/8-user-redis.sh $PLATFORM
- - name: 9a UserFerretDB
- run: tests/9a-user-ferretdb.sh $PLATFORM
- - name: 9b UserPostgres
- run: tests/9b-user-postgres.sh $PLATFORM
- - name: 10 UserMinio
- run: tests/10-user-minio.sh $PLATFORM
- - name: 14 RuntimeTesting
- run: tests/14-runtime-testing.sh $PLATFORM
+ - name: Run GitHub Test Suite
+ run: tests/run-gh-suite.sh $SELECTOR
diff --git a/.github/workflows/task-pr-test.yaml b/.github/workflows/task-pr-test.yaml
new file mode 100644
index 0000000..34f1fc2
--- /dev/null
+++ b/.github/workflows/task-pr-test.yaml
@@ -0,0 +1,77 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+name: Task PR Test
+run-name: "Task PR #${{ github.event.client_payload.pr_number }} on ${{ github.event.client_payload.selector || github.event.client_payload.platform }}"
+
+on:
+ repository_dispatch:
+ types: [task-pr-test]
+
+env:
+ PR_NUMBER: ${{ github.event.client_payload.pr_number }}
+ PR_REF: ${{ github.event.client_payload.pr_ref }}
+ PR_SHA: ${{ github.event.client_payload.pr_sha }}
+ TASK_REPO: ${{ github.event.client_payload.task_repo }}
+ SELECTOR: ${{ github.event.client_payload.selector || github.event.client_payload.platform }}
+ NGROK_TOKEN: ${{ secrets.NGROK_TOKEN }}
+
+jobs:
+ task-pr-test:
+ name: "Test task PR #${{ github.event.client_payload.pr_number }}"
+ runs-on: ubuntu-22.04
+ steps:
+ - name: Checkout testing repo
+ uses: actions/checkout@v4
+
+ - name: Clone task PR branch
+ run: |
+ git clone --branch "$PR_REF" \
+ "https://github.com/$TASK_REPO.git" _task
+ git -C _task checkout "$PR_SHA"
+
+ - name: Verify task checkout
+ run: |
+ ls _task/opsfile.yml _task/opsroot.json
+ git -C _task rev-parse HEAD
+
+ - name: Set OPS_ROOT
+ run: echo "OPS_ROOT=$(pwd)/_task" >> "$GITHUB_ENV"
+
+ - name: Install ops
+ run: |
+ curl -sL bit.ly/get-ops | bash
+ ops -info
+ ops -t > /dev/null
+
+ - name: Load secrets from 1Password
+ uses: 1password/load-secrets-action@v2
+ with:
+ export-env: true
+ env:
+ OP_SERVICE_ACCOUNT_TOKEN: ${{ secrets.OP_SERVICE_ACCOUNT_TOKEN }}
+ SSH_KEY: op://OpenServerless/ops_testing_ssh/public key
+ NGROK_PASSWORD: op://OpenServerless/TESTING/NGROK_PASSWORD
+ ID_RSA_B64: op://OpenServerless/TESTING/ID_RSA_B64
+ K8S_KUBECONFIG_B64: op://OpenServerless/TESTING/K8S_KUBECONFIG_B64
+ K3S_AMD_APIHOST: op://OpenServerless/TESTING/K3S_AMD_APIHOST
+ K3S_ARM_APIHOST: op://OpenServerless/TESTING/K3S_ARM_APIHOST
+ K8S_APIHOST: op://OpenServerless/TESTING/K8S_APIHOST
+ APIHOST: op://OpenServerless/TESTING/APIHOST
+
+ - name: Run GitHub Test Suite
+ run: tests/run-gh-suite.sh $SELECTOR
diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml
index 12ce44f..d744e90 100644
--- a/.github/workflows/tests.yaml
+++ b/.github/workflows/tests.yaml
@@ -69,32 +69,8 @@ jobs:
run: .github/debugAction.sh
- name: Wait for Debug (if requested)
run: .github/waitIfDebug.sh
- - name: 1 Deploy
- run: |
- touch .secrets
- tests/1-deploy.sh $PLATFORM
- - name: 3 SysRedis
- run: tests/3-sys-redis.sh $PLATFORM
- - name: 4 SysMongo
- run: tests/4a-sys-ferretdb.sh $PLATFORM
- - name: 4b SysPostgres
- run: tests/4b-sys-postgres.sh $PLATFORM
- - name: 5 SysMinio
- run: tests/5-sys-minio.sh $PLATFORM
- - name: 6 Login
- run: tests/6-login.sh $PLATFORM
- - name: 7 Static
- run: tests/7-static.sh $PLATFORM
- - name: 8 UserRedis
- run: tests/8-user-redis.sh $PLATFORM
- - name: 9a UserFerretDB
- run: tests/9a-user-ferretdb.sh $PLATFORM
- - name: 9b UserPostgres
- run: tests/9b-user-postgres.sh $PLATFORM
- - name: 10 UserMinio
- run: tests/10-user-minio.sh $PLATFORM
- - name: 14 RuntimeTesting
- run: tests/14-runtime-testing.sh $PLATFORM
+ - name: Run GitHub Test Suite
+ run: tests/run-gh-suite.sh $PLATFORM
test-windows:
runs-on: windows-2022
@@ -151,50 +127,15 @@ jobs:
env:
OP_SERVICE_ACCOUNT_TOKEN: ${{ secrets.OP_SERVICE_ACCOUNT_TOKEN }}
- - name: 1 Deploy
- shell: bash
- run: |
- touch .secrets
- tests/1-deploy.sh $PLATFORM
- name: Debug Action (if requested)
shell: bash
run: .github/debugAction.sh
- name: Wait for Debug (if requested)
shell: bash
run: .github/waitIfDebug.sh
- - name: 3 SysRedis
- shell: bash
- run: tests/3-sys-redis.sh $PLATFORM
- - name: 4 SysMongo
- shell: bash
- run: tests/4a-sys-ferretdb.sh $PLATFORM
- - name: 4b SysPostgres
- shell: bash
- run: tests/4b-sys-postgres.sh $PLATFORM
- - name: 5 SysMinio
- shell: bash
- run: tests/5-sys-minio.sh $PLATFORM
- - name: 6 Login
+ - name: Run GitHub Test Suite
shell: bash
- run: tests/6-login.sh $PLATFORM
- - name: 7 Static
- shell: bash
- run: tests/7-static.sh $PLATFORM
- - name: 8 UserRedis
- shell: bash
- run: tests/8-user-redis.sh $PLATFORM
- - name: 9a UserFerretDB
- shell: bash
- run: tests/9a-user-ferretdb.sh $PLATFORM
- - name: 9b UserPostgres
- shell: bash
- run: tests/9b-user-postgres.sh $PLATFORM
- - name: 10 UserMinio
- shell: bash
- run: tests/10-user-minio.sh $PLATFORM
- - name: 14 RuntimeTesting
- shell: bash
- run: tests/14-runtime-testing.sh $PLATFORM
+ run: tests/run-gh-suite.sh $PLATFORM
test-mac:
runs-on: macOS-14
@@ -241,29 +182,5 @@ jobs:
run: .github/debugAction.sh
- name: Wait for Debug (if requested)
run: .github/waitIfDebug.sh
- - name: 1 Deploy
- run: |
- touch .secrets
- tests/1-deploy.sh $PLATFORM
- - name: 3 SysRedis
- run: tests/3-sys-redis.sh $PLATFORM
- - name: 4 SysMongo
- run: tests/4a-sys-ferretdb.sh $PLATFORM
- - name: 4b SysPostgres
- run: tests/4b-sys-postgres.sh $PLATFORM
- - name: 5 SysMinio
- run: tests/5-sys-minio.sh $PLATFORM
- - name: 6 Login
- run: tests/6-login.sh $PLATFORM
- - name: 7 Static
- run: tests/7-static.sh $PLATFORM
- - name: 8 UserRedis
- run: tests/8-user-redis.sh $PLATFORM
- - name: 9a UserFerretDB
- run: tests/9a-user-ferretdb.sh $PLATFORM
- - name: 9b UserPostgres
- run: tests/9b-user-postgres.sh $PLATFORM
- - name: 10 UserMinio
- run: tests/10-user-minio.sh $PLATFORM
- - name: 14 RuntimeTesting
- run: tests/14-runtime-testing.sh $PLATFORM
+ - name: Run GitHub Test Suite
+ run: tests/run-gh-suite.sh $PLATFORM
diff --git a/gap.md b/gap.md
new file mode 100644
index 0000000..ae7c35a
--- /dev/null
+++ b/gap.md
@@ -0,0 +1,170 @@
+# Gap Analysis: PR-driven testing for `openserverless-operator` and `openserverless-task`
+
+## Assumption
+
+Based on the clarification, the trigger contract is a selector shaped as:
+
+- `<platform>-<architecture>`
+
+Example: `k3s-amd`, `k3s-arm`.
+
+The main question is therefore whether a PR in `openserverless-operator` or `openserverless-task` can propagate that selector end-to-end, trigger the right GitHub workflow, and execute on the matching infrastructure.
+
+## Current state found
+
+### Operator path
+
+- `openserverless-testing/.github/workflows/operator-pr-test.yaml:21-135` already accepts `repository_dispatch` with PR number, ref, sha, repo and platform.
+- `nuvolaris/openserverless-operator/.github/workflows/trigger-testing.yaml:21-90` can dispatch that event, but only from:
+ - an issue comment `/testing <platform>`
+ - a manual `workflow_dispatch`
+
+### Task path
+
+- `openserverless-testing/.github/workflows/platform-ci-tests.yaml:22-40` accepts `repository_dispatch` type `olaris-testing-update` and converts the payload into a git tag.
+- `openserverless-testing/.github/workflows/tests.yaml:21-97` runs the full test suite on any pushed tag matching `*-*`.
+- `nuvolaris/openserverless-task` currently has no `.github/workflows` directory, so there is no producer for that dispatch.
+
+## Gaps
+
+### 1. No end-to-end PR trigger exists for `openserverless-task`
+
+Evidence:
+
+- `platform-ci-tests.yaml` waits for `repository_dispatch` (`olaris-testing-update`), but `nuvolaris/openserverless-task` has no GitHub workflows at all.
+
+Impact:
+
+- A PR on `openserverless-task` cannot currently trigger anything in this repository.
+
+### 2. Operator flow is not tag-driven today
+
+Evidence:
+
+- `nuvolaris/openserverless-operator/.github/workflows/trigger-testing.yaml:21-57` only parses:
+ - `workflow_dispatch` inputs
+ - issue comments starting with `/testing `
+
+Impact:
+
+- The current operator flow still requires a comment or manual dispatch instead of a tag-shaped selector propagated automatically from the PR flow.
+
+### 3. The selector contract is only partially implemented across repos
+
+Evidence:
+
+- `operator` dispatch passes a single `platform` field, whose value is expected to already contain the combined selector such as `k3s-amd`.
+- `platform-ci-tests.yaml:27` builds a tag as `<platform>-<tag>`, but the second field is still generically named `tag`, not `architecture`.
+- `tests.yaml:21-24` reacts to any tag matching `*-*`.
+
+Impact:
+
+- The system has no canonical representation for:
+ - which repo is under test
+ - which platform/infrastructure should be targeted
+ - which architecture is being targeted
+ - which PR commit should be tested
+
+### 4. There is no task-specific PR workflow in `openserverless-testing`
+
+Evidence:
+
+- The operator has a dedicated entry point: `operator-pr-test.yaml:21-135`.
+- The task path only has the generic tag flow: `platform-ci-tests.yaml` -> `tests.yaml`.
+
+Impact:
+
+- `openserverless-task` does not have a PR-aware execution path comparable to the operator one.
+- The generic tag flow cannot attach PR metadata to the run in the same way.
+
+### 5. The tag-based transport loses PR identity and is not reproducible
+
+Evidence:
+
+- `platform-ci-tests.yaml:27-40` turns the payload into a git tag only.
+- That tag stores no `pr_number`, `pr_ref`, `pr_sha`, or source repository.
+- `tests.yaml:27-29` uses static defaults for `OPS_REPO` and `OPS_BRANCH`.
+
+Impact:
+
+- A task-triggered run cannot be pinned to the exact PR commit that requested the test.
+- Two runs with the same `<platform>-<tag>` collide.
+- A rerun may test different code than the one originally requested.
+
+### 6. Selector parsing is inconsistent with the `<platform>-<architecture>` contract
+
+Evidence:
+
+- `tests/1-deploy.sh:18-22` keeps selectors like `k3s-amd` and `k3s-arm`, but only strips a trailing numeric suffix.
+- Many later scripts collapse the selector to the first `-` segment, for example:
+ - `tests/6-login.sh:18-19`
+ - `tests/7-static.sh:18-19`
+ - `tests/8-user-redis.sh:18-19`
+ - same pattern also appears in `tests/9a-user-ferretdb.sh`, `tests/9b-user-postgres.sh`, `tests/10-user-minio.sh`, `tests/14-runtime-testing.sh`
+
+Impact:
+
+- The selector is not preserved consistently end-to-end.
+- `k3s-amd` and `k3s-arm` are distinguished in deploy, but become just `k3s` in many subsequent test steps.
+
+### 7. Platform support is incomplete in the actual deploy path
+
+Evidence:
+
+- `tests/1-deploy.sh:45-79` actively supports only `kind`, `k3s-amd`, `k3s-arm`.
+- `tests/1-deploy.sh:86-212` has `mk8s`, `eks`, `aks`, `gke`, `osh` commented out.
+- `tests/1-deploy.sh:214-229` supports generic `k8s`.
+- `tests/all.sh:29-37` still advertises more platforms than `1-deploy.sh` actually enables.
+
+Impact:
+
+- "Selected infrastructure" is only partially true today.
+- Any tag/label selecting `mk8s`, `eks`, `aks`, `gke`, or `osh` will not reach a working deploy path in the current GitHub workflow.
+
+### 8. Operator PR execution is not pinned to the requested SHA
+
+Evidence:
+
+- `operator-pr-test.yaml:45-49` clones `--branch "$PR_REF"` but does not checkout `PR_SHA`.
+- `PR_SHA` is only used for the image tag at `operator-pr-test.yaml:69-75`.
+
+Impact:
+
+- If the PR branch moves after dispatch, the workflow may build and test a newer commit than the one that triggered the run.
+
+### 9. There is no equivalent "materialize PR code locally" step for `openserverless-task`
+
+Evidence:
+
+- Operator flow clones the PR repo and patches `_operator/olaris/opsroot.json`, then exports `OPS_ROOT` (`operator-pr-test.yaml:45-87`).
+- The generic tag flow in `tests.yaml` does not clone `openserverless-task`, does not checkout a PR ref/sha, and does not set `OPS_ROOT`.
+
+Impact:
+
+- Even after adding a PR trigger in `openserverless-task`, this repo still lacks the execution path required to test the actual PR contents instead of a default branch.
+
+### 10. Validation and guardrails are missing
+
+Evidence:
+
+- `platform-ci-tests.yaml:27-40` accepts raw `platform` and `tag` strings and pushes them directly as git tags.
+- `operator-pr-test.yaml:26-30` accepts raw payload fields and passes `platform` directly into the test scripts.
+
+Impact:
+
+- Unsupported `<platform>-<architecture>` combinations fail late, inside the test workflow.
+- There is no central allowlist for valid repositories or selectors.
+
+## Minimum missing pieces before the target flow can work
+
+1. A single trigger contract shared by `operator`, `task`, and `testing`:
+ - repo
+ - pr number
+ - ref
+ - sha
+ - selector `<platform>-<architecture>`
+2. A PR-trigger workflow in `nuvolaris/openserverless-task`.
+3. A task-specific workflow in `openserverless-testing` that checks out the requested task PR revision, not just a tag.
+4. Deterministic checkout by SHA for both operator and task flows.
+5. A routing layer in `openserverless-testing` that maps `<platform>-<architecture>` to supported infrastructures.
+6. A normalized parser for selectors, instead of the current mixed comment/tag/string conventions.
diff --git a/tests/1-deploy.sh b/tests/1-deploy.sh
index 2fe68fe..540de21 100755
--- a/tests/1-deploy.sh
+++ b/tests/1-deploy.sh
@@ -15,11 +15,9 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
-TYPE="${1:?test type}"
-# Strip trailing timestamp suffix (digits only) added by tag-based triggers.
-# e.g. "k3s-amd-2603041800" -> "k3s-amd", "kind-2603041800" -> "kind"
-# Clean platform names like "k3s-amd" are left unchanged.
-TYPE="$(echo $TYPE | sed 's/-[0-9]*$//')"
+. "$(dirname "$0")/lib/selector.sh"
+resolve_test_selector "${1:?test selector}"
+TYPE="$TEST_SELECTOR"
cd "$(dirname $0)"
diff --git a/tests/10-user-minio.sh b/tests/10-user-minio.sh
index 6446076..68176a5 100755
--- a/tests/10-user-minio.sh
+++ b/tests/10-user-minio.sh
@@ -15,8 +15,9 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
-TYPE="${1:?test type}"
-TYPE="$(echo $TYPE | awk -F- '{print $1}')"
+. "$(dirname "$0")/lib/selector.sh"
+resolve_test_selector "${1:?test selector}"
+TYPE="$TEST_SELECTOR"
if ops config status | grep OPERATOR_COMPONENT_MINIO=true; then
echo "MINIO ENABLED"
diff --git a/tests/12-nuv-mac.sh b/tests/12-nuv-mac.sh
index fd5b2e9..5c0dd4b 100755
--- a/tests/12-nuv-mac.sh
+++ b/tests/12-nuv-mac.sh
@@ -15,7 +15,8 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
-TYPE="${1:?test type}"
-TYPE="$(echo $TYPE | awk -F- '{print $1}')"
+. "$(dirname "$0")/lib/selector.sh"
+resolve_test_selector "${1:?test selector}"
+TYPE="$TEST_SELECTOR"
./all.sh $TYPE
diff --git a/tests/14-runtime-testing.sh b/tests/14-runtime-testing.sh
index a17be8e..329823d 100755
--- a/tests/14-runtime-testing.sh
+++ b/tests/14-runtime-testing.sh
@@ -15,8 +15,9 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
-TYPE="${1:?test type}"
-TYPE="$(echo $TYPE | awk -F- '{print $1}')"
+. "$(dirname "$0")/lib/selector.sh"
+resolve_test_selector "${1:?test selector}"
+TYPE="$TEST_SELECTOR"
user="testactionuser"
password=$(ops -random --str 12)
diff --git a/tests/2-ssl.sh b/tests/2-ssl.sh
index eecdb42..97b1256 100755
--- a/tests/2-ssl.sh
+++ b/tests/2-ssl.sh
@@ -23,7 +23,9 @@ then
fi
# TYPE="$(ops debug detect)"
-TYPE="${1:?test type}"
+. "$(dirname "$0")/lib/selector.sh"
+resolve_test_selector "${1:?test selector}"
+TYPE="$TEST_SELECTOR"
EMAIL=msciabarra@apache.org
if [ "$TYPE" = "kind" ]; then
diff --git a/tests/6-login.sh b/tests/6-login.sh
index 7e48ba4..1fa7ab7 100755
--- a/tests/6-login.sh
+++ b/tests/6-login.sh
@@ -15,8 +15,9 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
-TYPE="${1:?test type}"
-TYPE="$(echo $TYPE | awk -F- '{print $1}')"
+. "$(dirname "$0")/lib/selector.sh"
+resolve_test_selector "${1:?test selector}"
+TYPE="$TEST_SELECTOR"
# Generate a random password for the user "demo"
password=$(ops -random --str 12)
diff --git a/tests/7-static.sh b/tests/7-static.sh
index 658c8f2..c009d69 100755
--- a/tests/7-static.sh
+++ b/tests/7-static.sh
@@ -15,8 +15,9 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
-TYPE="${1:?test type}"
-TYPE="$(echo $TYPE | awk -F- '{print $1}')"
+. "$(dirname "$0")/lib/selector.sh"
+resolve_test_selector "${1:?test selector}"
+TYPE="$TEST_SELECTOR"
ops config enable --minio --static
ops update apply
diff --git a/tests/8-user-redis.sh b/tests/8-user-redis.sh
index 14e1e92..e6ef3da 100755
--- a/tests/8-user-redis.sh
+++ b/tests/8-user-redis.sh
@@ -15,8 +15,9 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
-TYPE="${1:?test type}"
-TYPE="$(echo $TYPE | awk -F- '{print $1}')"
+. "$(dirname "$0")/lib/selector.sh"
+resolve_test_selector "${1:?test selector}"
+TYPE="$TEST_SELECTOR"
if ops config status | grep OPERATOR_COMPONENT_REDIS=true; then
echo "REDIS ENABLED"
diff --git a/tests/9a-user-ferretdb.sh b/tests/9a-user-ferretdb.sh
index d055377..f1759de 100755
--- a/tests/9a-user-ferretdb.sh
+++ b/tests/9a-user-ferretdb.sh
@@ -15,8 +15,9 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
-TYPE="${1:?test type}"
-TYPE="$(echo $TYPE | awk -F- '{print $1}')"
+. "$(dirname "$0")/lib/selector.sh"
+resolve_test_selector "${1:?test selector}"
+TYPE="$TEST_SELECTOR"
if ops config status | grep OPERATOR_COMPONENT_MONGODB=true; then
echo "MONGODB ENABLED"
diff --git a/tests/9b-user-postgres.sh b/tests/9b-user-postgres.sh
index e008739..564716f 100755
--- a/tests/9b-user-postgres.sh
+++ b/tests/9b-user-postgres.sh
@@ -15,8 +15,9 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
-TYPE="${1:?test type}"
-TYPE="$(echo $TYPE | awk -F- '{print $1}')"
+. "$(dirname "$0")/lib/selector.sh"
+resolve_test_selector "${1:?test selector}"
+TYPE="$TEST_SELECTOR"
if ops config status | grep OPERATOR_COMPONENT_POSTGRES=true; then
echo "POSTGRES ENABLED"
diff --git a/tests/all.sh b/tests/all.sh
index 4fe6ec0..05bf1e5 100755
--- a/tests/all.sh
+++ b/tests/all.sh
@@ -15,10 +15,9 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
-TYPE="${1:?test type}"
-# Extract platform name: everything before the last '-'
-# e.g. "k3s-amd-test1" -> "k3s-amd", "kind-test1" -> "kind", "k8s-run3" -> "k8s"
-TYPE="$(echo $TYPE | sed 's/-[^-]*$//')"
+. "$(dirname "$0")/lib/selector.sh"
+resolve_test_selector "${1:?test selector}"
+TYPE="$TEST_SELECTOR"
# Use OPS_BRANCH from environment if set, otherwise default to main
export OPS_BRANCH="${OPS_BRANCH:-main}"
diff --git a/tests/lib/selector.sh b/tests/lib/selector.sh
new file mode 100755
index 0000000..9a55bf5
--- /dev/null
+++ b/tests/lib/selector.sh
@@ -0,0 +1,63 @@
+#!/bin/bash
+
+resolve_test_selector() {
+ local raw_selector="${1:?test selector}"
+ local selector="$raw_selector"
+
+ if [[ "$selector" =~ ^(.+)-([0-9]{6,})$ ]]; then
+ selector="${BASH_REMATCH[1]}"
+ fi
+
+ case "$selector" in
+ kind | kind-amd | kind-arm)
+ TEST_SELECTOR="kind"
+ TEST_PLATFORM="kind"
+ TEST_ARCH="${selector#kind-}"
+ ;;
+ k8s | k8s-amd | k8s-arm)
+ TEST_SELECTOR="k8s"
+ TEST_PLATFORM="k8s"
+ TEST_ARCH="${selector#k8s-}"
+ ;;
+ k3s-amd | k3s-arm)
+ TEST_SELECTOR="$selector"
+ TEST_PLATFORM="k3s"
+ TEST_ARCH="${selector#k3s-}"
+ ;;
+ mk8s | mk8s-amd | mk8s-arm)
+ TEST_SELECTOR="mk8s"
+ TEST_PLATFORM="mk8s"
+ TEST_ARCH="${selector#mk8s-}"
+ ;;
+ eks | eks-amd | eks-arm)
+ TEST_SELECTOR="eks"
+ TEST_PLATFORM="eks"
+ TEST_ARCH="${selector#eks-}"
+ ;;
+ aks | aks-amd | aks-arm)
+ TEST_SELECTOR="aks"
+ TEST_PLATFORM="aks"
+ TEST_ARCH="${selector#aks-}"
+ ;;
+ gke | gke-amd | gke-arm)
+ TEST_SELECTOR="gke"
+ TEST_PLATFORM="gke"
+ TEST_ARCH="${selector#gke-}"
+ ;;
+ osh | osh-amd | osh-arm)
+ TEST_SELECTOR="osh"
+ TEST_PLATFORM="osh"
+ TEST_ARCH="${selector#osh-}"
+ ;;
+ *)
+ echo "ERROR: unsupported test selector '$raw_selector'" >&2
+ return 1
+ ;;
+ esac
+
+ if [[ "$TEST_ARCH" == "$selector" ]]; then
+ TEST_ARCH="amd"
+ fi
+
+ export TEST_SELECTOR TEST_PLATFORM TEST_ARCH
+}
diff --git a/tests/run-gh-suite.sh b/tests/run-gh-suite.sh
new file mode 100755
index 0000000..ea8776e
--- /dev/null
+++ b/tests/run-gh-suite.sh
@@ -0,0 +1,21 @@
+#!/bin/bash
+set -euo pipefail
+
+SELECTOR="${1:?test selector}"
+
+cd "$(dirname "$0")"
+
+touch ../.secrets
+
+./1-deploy.sh "$SELECTOR"
+./3-sys-redis.sh "$SELECTOR"
+./4a-sys-ferretdb.sh "$SELECTOR"
+./4b-sys-postgres.sh "$SELECTOR"
+./5-sys-minio.sh "$SELECTOR"
+./6-login.sh "$SELECTOR"
+./7-static.sh "$SELECTOR"
+./8-user-redis.sh "$SELECTOR"
+./9a-user-ferretdb.sh "$SELECTOR"
+./9b-user-postgres.sh "$SELECTOR"
+./10-user-minio.sh "$SELECTOR"
+./14-runtime-testing.sh "$SELECTOR"
(openserverless-testing) 17/18: triggening kind for ref 27b0adf
Posted by ms...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
msciabarra pushed a commit to tag kind-469ee67
in repository https://gitbox.apache.org/repos/asf/openserverless-testing.git
commit 4f7fc79f38bbb16669f0ac84d2f55d76a1b252f1
Author: Michele Sciabarra <“msciabarra@apache.org”>
AuthorDate: Fri Mar 20 11:16:22 2026 +0000
triggening kind for ref 27b0adf
---
.github/{workflows => }/operator-pr-test.yaml | 0
.github/{workflows => }/platform-ci-tests.yaml | 0
.github/workflows/tests.yaml | 2 ++
Taskfile.yml | 11 ++++-------
4 files changed, 6 insertions(+), 7 deletions(-)
diff --git a/.github/workflows/operator-pr-test.yaml b/.github/operator-pr-test.yaml
similarity index 100%
rename from .github/workflows/operator-pr-test.yaml
rename to .github/operator-pr-test.yaml
diff --git a/.github/workflows/platform-ci-tests.yaml b/.github/platform-ci-tests.yaml
similarity index 100%
rename from .github/workflows/platform-ci-tests.yaml
rename to .github/platform-ci-tests.yaml
diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml
index 9143ed3..2de3f8e 100644
--- a/.github/workflows/tests.yaml
+++ b/.github/workflows/tests.yaml
@@ -22,6 +22,8 @@ on:
push:
tags:
- '*-*'
+ branches-ignore:
+ - '*'
env:
TEST_TAG: ${{ github.ref_name }}
diff --git a/Taskfile.yml b/Taskfile.yml
index 30c4dd7..7e5c819 100644
--- a/Taskfile.yml
+++ b/Taskfile.yml
@@ -17,20 +17,17 @@
version: "3"
-env:
- REF:
- sh: echo $(cd tasks;git rev-parse --short HEAD)
-
vars:
# CLOUD: gcp
CLOUD: azure
DOMAIN: opstest.top
+ REF:
+ sh: git rev-parse --short HEAD
dotenv:
- .env
-
includes:
aws: ./TaskfileAWS.yml
gcp: ./TaskfileGCloud.yml
@@ -265,10 +262,10 @@ tasks:
- |
git tag -d $(git tag)
git tag {{.N}}-{{.REF}}
- git push origin --tags
+ git push --tags
# OK (kind)
- d: task test-ci N=kind REF=$REF
+ d: task test-ci N=kind REF={{.REF}}
# OK (k3s)
k: task test-ci N=k3s REF=$REF
# OK (k3s-arm)
(openserverless-testing) 02/18: Document testing and image publication workflows
Posted by ms...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
msciabarra pushed a commit to tag kind-469ee67
in repository https://gitbox.apache.org/repos/asf/openserverless-testing.git
commit 4c985451ad8d192f4d7cb06d5758ddcaf76f1047
Author: miki3421 <mi...@gmail.com>
AuthorDate: Wed Mar 18 17:43:06 2026 +0100
Document testing and image publication workflows
---
workflow.md | 331 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 331 insertions(+)
diff --git a/workflow.md b/workflow.md
new file mode 100644
index 0000000..3126c09
--- /dev/null
+++ b/workflow.md
@@ -0,0 +1,331 @@
+# Workflow Notes
+
+## Repositories involved
+
+- `nuvolaris/openserverless-operator`
+- `nuvolaris/openserverless-task`
+- `nuvolaris/openserverless-testing`
+
+## Goal
+
+Enable a PR in `openserverless-operator` or `openserverless-task` to trigger the corresponding test workflow in `openserverless-testing`, using a PR label/tag shaped as:
+
+- `<platform>-<architecture>`
+
+Examples:
+
+- `k3s-amd`
+- `k3s-arm`
+- `kind-amd`
+
+## Current repositories and branches used during this analysis
+
+Implementation work was pushed to:
+
+- `feat/pr-tag-platform-arch-testing` in `openserverless-testing`
+- `feat/pr-tag-platform-arch-testing` in `openserverless-operator`
+- `feat/pr-tag-platform-arch-testing` in `openserverless-task`
+
+## Important GitHub Actions behavior
+
+### Why branch-only changes are not enough for end-to-end PR testing
+
+For the new PR-trigger flow:
+
+- source repos use `pull_request_target`
+- `pull_request_target` reads the workflow from the base branch of the PR
+- `repository_dispatch` workflows in `openserverless-testing` must also exist on the target branch used by GitHub
+
+Practical consequence:
+
+- opening a PR on `openserverless-operator` against `main` does not automatically use the new trigger logic if that logic only exists in the PR branch
+- the new flow becomes real only after the relevant workflow changes are available on the base branch, typically `main`
+
+Minimum merge set for real usage:
+
+1. merge `openserverless-testing`
+2. merge `openserverless-operator`
+3. merge `openserverless-task` if task PRs must also trigger tests
+
+## Current testing flow before the new changes
+
+### Operator
+
+Existing trigger path:
+
+1. `openserverless-operator/.github/workflows/trigger-testing.yaml`
+2. trigger came from:
+ - issue comment `/testing <platform>`
+ - manual `workflow_dispatch`
+3. workflow collected:
+ - PR number
+ - PR ref
+ - PR sha
+ - source repo
+ - platform selector
+4. workflow dispatched `repository_dispatch` to `openserverless-testing`
+5. `openserverless-testing/.github/workflows/operator-pr-test.yaml` built a temporary operator image and executed tests
+
+### Task
+
+Existing trigger path:
+
+1. `openserverless-testing/.github/workflows/platform-ci-tests.yaml` could receive `repository_dispatch`
+2. it converted payload into a git tag
+3. `openserverless-testing/.github/workflows/tests.yaml` ran tests on tag push
+
+Missing piece:
+
+- `openserverless-task` had no `.github/workflows` directory, so there was no workflow producing that dispatch from a PR
+
+## New testing flow implemented in the feature branches
+
+### Source of truth for enabling tests
+
+A PR label/tag matching one of these selectors enables the process:
+
+- `kind-amd`
+- `kind-arm`
+- `k3s-amd`
+- `k3s-arm`
+- `k8s-amd`
+- `k8s-arm`
+- `mk8s-amd`
+- `mk8s-arm`
+- `eks-amd`
+- `eks-arm`
+- `aks-amd`
+- `aks-arm`
+- `gke-amd`
+- `gke-arm`
+- `osh-amd`
+- `osh-arm`
+
+### Operator flow after the feature changes
+
+Files:
+
+- `openserverless-operator/.github/workflows/trigger-testing.yaml`
+- `openserverless-testing/.github/workflows/operator-pr-test.yaml`
+
+Flow:
+
+1. PR in `openserverless-operator` receives a valid label
+2. `pull_request_target` runs on:
+ - `labeled`
+ - `synchronize`
+ - `reopened`
+3. workflow scans PR labels and picks the first valid `<platform>-<architecture>` selector
+4. workflow fetches PR details via `gh api`
+5. workflow dispatches `operator-pr-test` to `openserverless-testing`
+6. testing workflow clones the operator PR branch
+7. testing workflow explicitly checks out the requested `PR_SHA`
+8. testing workflow builds a temporary operator image
+9. testing workflow patches `opsroot.json`
+10. testing workflow runs the test suite on the selected infrastructure
+
+### Task flow after the feature changes
+
+Files:
+
+- `openserverless-task/.github/workflows/trigger-testing.yaml`
+- `openserverless-testing/.github/workflows/task-pr-test.yaml`
+
+Flow:
+
+1. PR in `openserverless-task` receives a valid label
+2. `pull_request_target` runs on:
+ - `labeled`
+ - `synchronize`
+ - `reopened`
+3. workflow scans PR labels and picks the first valid selector
+4. workflow fetches PR details via `gh api`
+5. workflow dispatches `task-pr-test` to `openserverless-testing`
+6. testing workflow clones the task PR branch
+7. testing workflow explicitly checks out the requested `PR_SHA`
+8. testing workflow sets `OPS_ROOT` to the checked out task tree
+9. testing workflow runs the test suite on the selected infrastructure
+
+## Changes made in `openserverless-testing`
+
+### New workflows
+
+- `./.github/workflows/task-pr-test.yaml`
+
+Purpose:
+
+- dedicated repository-dispatch workflow for PR testing of `openserverless-task`
+
+### Updated workflows
+
+- `./.github/workflows/operator-pr-test.yaml`
+- `./.github/workflows/tests.yaml`
+
+Main updates:
+
+- operator PR testing now checks out the exact requested SHA
+- common test execution is centralized through `tests/run-gh-suite.sh`
+- selector is passed consistently as one input to the suite
+
+### New selector normalization
+
+Files:
+
+- `./tests/lib/selector.sh`
+- `./tests/run-gh-suite.sh`
+
+Purpose:
+
+- normalize `<platform>-<architecture>` once
+- preserve distinctions like `k3s-amd` vs `k3s-arm`
+- remove inconsistent parsing scattered across test scripts
+
+### Test scripts updated to use shared selector parsing
+
+Updated:
+
+- `./tests/1-deploy.sh`
+- `./tests/2-ssl.sh`
+- `./tests/6-login.sh`
+- `./tests/7-static.sh`
+- `./tests/8-user-redis.sh`
+- `./tests/9a-user-ferretdb.sh`
+- `./tests/9b-user-postgres.sh`
+- `./tests/10-user-minio.sh`
+- `./tests/12-nuv-mac.sh`
+- `./tests/14-runtime-testing.sh`
+- `./tests/all.sh`
+
+Why this mattered:
+
+- before the change, many scripts reduced `k3s-amd` and `k3s-arm` to `k3s`
+- deploy logic distinguished them, but later test steps did not preserve the selector consistently
+
+## Current deploy/test platform support in `openserverless-testing`
+
+Effective support in `tests/1-deploy.sh`:
+
+- `kind`
+- `k3s-amd`
+- `k3s-arm`
+- `k8s`
+
+Present but commented out in deploy path:
+
+- `mk8s`
+- `eks`
+- `aks`
+- `gke`
+- `osh`
+
+This means the label set is broader than the currently active deploy implementation. Some selectors are accepted by workflow validation, but their deploy path still depends on commented or incomplete code in `tests/1-deploy.sh`.
+
+## Operator image build and publication
+
+### Temporary image used for PR testing
+
+File:
+
+- `openserverless-testing/.github/workflows/operator-pr-test.yaml`
+
+What happens:
+
+1. testing workflow clones the operator PR
+2. builds an image from the PR source
+3. pushes it to GHCR as a temporary test image
+4. patches the task configuration to use that image during tests
+
+Destination:
+
+- `ghcr.io/<repository_owner>/openserverless-testing:pr-<PR_NUMBER>-<SHORT_SHA>`
+
+This is a testing image, not the official published operator image.
+
+### Official operator image publication
+
+Files:
+
+- `openserverless-operator/.github/workflows/image.yml`
+- `openserverless-operator/TaskfileBuild.yml`
+- `openserverless-operator/Dockerfile`
+
+Trigger:
+
+- `push.tags: [0-9]*`
+
+Important conclusion:
+
+- there is currently no automatic path from “PR tests passed” to “publish official operator image”
+- publication depends on a tag push
+
+### Where the official operator image is published
+
+Registry login in workflow:
+
+- `vars.IMAGE_REGISTRY || 'registry.hub.docker.com'`
+
+Image name:
+
+- `MY_OPERATOR_IMAGE` if set
+- otherwise default from `Dockerfile`
+
+Dockerfile default:
+
+- `registry.hub.docker.com/apache/openserverless-operator`
+
+Actual push implementation:
+
+- `task buildx-and-push`
+- which runs `docker buildx build ... --push`
+
+### How the publish tag is created today
+
+There is no workflow that automatically creates the release tag after tests or after merge.
+
+Current tag creation is manual or task-driven:
+
+- `openserverless-operator/Taskfile.yml` task `tag`
+- `openserverless-operator/Taskfile.yml` task `tag-commit-push`
+
+So the current release path is:
+
+1. someone creates or pushes a numeric version tag
+2. tag push triggers `image.yml`
+3. `image.yml` runs tests/build and then publishes the official image
+
+## Validation performed during implementation
+
+Static checks executed:
+
+- `bash -n` on updated shell scripts in `openserverless-testing`
+- YAML parsing with Ruby for modified workflows in all three repositories
+- quick selector parsing checks for:
+ - `kind-amd`
+ - `k3s-arm`
+ - `k8s-arm`
+
+Not executed:
+
+- full end-to-end GitHub Actions run on live PRs
+- real registry publication test for the final operator release image
+
+## Open points
+
+### 1. Label naming
+
+The implementation assumes GitHub PR labels are the “tag” mentioned in the process description.
+
+### 2. Multiple valid labels on the same PR
+
+Current logic picks the first matching valid selector found on the PR.
+
+### 3. Release automation
+
+If desired, a future improvement could connect:
+
+- PR test success
+- merge to `main`
+- release tag creation
+- official image publication
+
+Today these are still separate processes.
(openserverless-testing) 14/18: Fix runtime test manifest path
Posted by ms...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
msciabarra pushed a commit to tag kind-469ee67
in repository https://gitbox.apache.org/repos/asf/openserverless-testing.git
commit 4c12d4339b75250a60181541d3a136ca10dac4bd
Author: miki3421 <mi...@gmail.com>
AuthorDate: Thu Mar 19 22:22:57 2026 +0100
Fix runtime test manifest path
---
agent.md | 15 +++++++++++++++
tests/14-runtime-testing.sh | 7 ++++---
2 files changed, 19 insertions(+), 3 deletions(-)
diff --git a/agent.md b/agent.md
index 6df8caa..8279d9a 100644
--- a/agent.md
+++ b/agent.md
@@ -376,3 +376,18 @@
- `kopf.login_via_client(...)`
- `kopf.login_via_pykube(...)`
- The handler now logs which method returned credentials and raises a clearer error if all of them fail.
+
+### Follow-up failure in the runtime suite
+
+- After the operator auth fix, the `k3s-amd` run progressed through deploy, Redis, FerretDB, and Postgres checks.
+- The next failure was no longer Traefik-related. It came from `tests/14-runtime-testing.sh`, where:
+ - `ops -wsk project deploy --manifest ${PWD}/test-runtimes/manifest.yaml`
+ - resolved to `tests/test-runtimes/manifest.yaml`
+ - even though the real file lives at:
+ - `test-runtimes/manifest.yaml`
+
+### Runtime suite fix
+
+- `tests/14-runtime-testing.sh` now derives the repository root from the script location and uses:
+ - `${REPO_ROOT}/test-runtimes/manifest.yaml`
+- This makes the manifest lookup independent from the shell's current working directory.
diff --git a/tests/14-runtime-testing.sh b/tests/14-runtime-testing.sh
index a44d8fa..b465bb3 100755
--- a/tests/14-runtime-testing.sh
+++ b/tests/14-runtime-testing.sh
@@ -19,6 +19,9 @@
resolve_test_selector "${1:?test selector}"
TYPE="$TEST_SELECTOR"
PROFILE="${TEST_PROFILE:-full}"
+SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
+REPO_ROOT="$(cd "${SCRIPT_DIR}/.." && pwd)"
+MANIFEST_PATH="${REPO_ROOT}/test-runtimes/manifest.yaml"
user="testactionuser"
password=$(ops -random --str 12)
@@ -66,9 +69,7 @@ if [ "$PROFILE" = "full" ]; then
export S3_BUCKET_STATIC=$(ops -config S3_BUCKET_STATIC)
fi
-PWD=$(pwd)
-
-if ops -wsk project deploy --manifest ${PWD}/test-runtimes/manifest.yaml | grep Success
+if ops -wsk project deploy --manifest "${MANIFEST_PATH}" | grep Success
then echo SUCCESS DEPLOY PROJECT;
else echo FAIL DEPLOY PROJECT; exit 1
fi
(openserverless-testing) 07/18: Fix selector path in GitHub test runner
Posted by ms...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
msciabarra pushed a commit to tag kind-469ee67
in repository https://gitbox.apache.org/repos/asf/openserverless-testing.git
commit 8fbf16d9169722e36dc37a52002ea59ca9832178
Author: miki3421 <mi...@gmail.com>
AuthorDate: Thu Mar 19 18:36:21 2026 +0100
Fix selector path in GitHub test runner
---
tests/run-gh-suite.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tests/run-gh-suite.sh b/tests/run-gh-suite.sh
index bcee7e7..cc45011 100755
--- a/tests/run-gh-suite.sh
+++ b/tests/run-gh-suite.sh
@@ -5,7 +5,7 @@ TEST_INPUT="${1:?test selector}"
cd "$(dirname "$0")"
-. "$(dirname "$0")/lib/selector.sh"
+. ./lib/selector.sh
resolve_test_selector "$TEST_INPUT"
export OPS_BRANCH=main