Skip to content

Add task submodule and PR-triggered integration testing#86

Closed
luigidematteis wants to merge 7 commits intoapache:mainfrom
luigidematteis:main
Closed

Add task submodule and PR-triggered integration testing#86
luigidematteis wants to merge 7 commits intoapache:mainfrom
luigidematteis:main

Conversation

@luigidematteis
Copy link
Contributor

Description

This PR adds openserverless-task as a git submodule at olaris/ and introduces a workflow that lets maintainers trigger the full acceptance test suite directly from an operator PR.

Task submodule (olaris/)

The operator now carries its own task definitions via a submodule pointing to apache/openserverless-task. When the testing pipeline clones an operator PR branch with --recurse-submodules, it gets the operator code and task definitions in a single checkout.

This enables:

  • Testing operator changes against a specific task version in one PR
  • Pointing the submodule to a custom task branch when cross-component changes are needed
  • No manual branch coordination between repos

Trigger workflow (trigger-testing.yaml)

A new workflow that dispatches operator-pr-test events to openserverless-testing when a maintainer comments /testing <platform> on a PR.

Triggers:

  • issue_comment: parses /testing <platform> from PR comments
  • workflow_dispatch: manual trigger with pr_number and platform inputs

Guards:

  • Only runs for comments from MEMBER, OWNER, or COLLABORATOR (@msciabarra let's understand together if we need a more strict rule)
  • Adds a rocket reaction to the comment as acknowledgment

Dispatches a repository_dispatch event to <owner>/openserverless-testing with:

  • pr_number, pr_ref, pr_sha — identifies the PR branch
  • operator_repo — the fork/repo where the PR lives
  • platform — the target test platform (e.g. k3s-amd)

Uses ${{ github.repository_owner }} for the dispatch target, so the same workflow works on forks and upstream.

Secret required

Secret Purpose
OPENSERVERLESS_TESTING_PAT GitHub PAT with repo scope on the testing repo, used to fire repository_dispatch events

Companion PR

This PR works together with a PR on openserverless-testing that adds:

  • operator-pr-test.yaml workflow (receives the dispatch, builds the image, runs tests)

apache/openserverless-testing#4

How to change the submodule pointer

# Follow main (default)
cd olaris && git checkout main && git pull && cd .. && git add olaris

# Point to a custom task branch
cd olaris && git fetch <remote> <branch> && git checkout FETCH_HEAD && cd .. && git add olaris

luigidematteis and others added 7 commits March 4, 2026 22:08
The .gitmodules file uses git config syntax which does not support
license headers.
flatdict 4.0.1 only ships as a source tarball. Building it requires
pkg_resources (setuptools), removed from Python 3.12 virtual environments.
Version 4.1.0 ships a pre-built wheel, bypassing the build step entirely.

Also update Dockerfile Poetry from 1.8.5 to 2.3.2 to match the
lock-version 2.1 format already in use.
…orkflow

 Add task submodule and PR-triggered integration testing
  Allow forks to push operator images to ghcr.io by setting the IMAGE_REGISTRY
  repository variable, without requiring Docker Hub credentials.

  Defaults to registry.hub.docker.com for backward compatibility with the
  Apache upstream. When DOCKERHUB_USER/DOCKERHUB_TOKEN secrets are not set,
  credentials fall back to github.actor/GITHUB_TOKEN automatically.
Same fix as testing repo: branches-ignore under push was causing
spurious workflow runs on branch pushes. With only tags filter
present, branch pushes are already excluded.
@luigidematteis luigidematteis marked this pull request as ready for review March 10, 2026 14:28
@luigidematteis
Copy link
Contributor Author

The CI passes TAG="$IMG_TAG" to task build-and-load, but all three Taskfiles (TaskfileBuild.yml, TaskfileTest.yml, TaskfileDev.yml) independently compute OPERATOR_TAG via git describe --tags and ignore the passed TAG.
I will close this PR, fix that issue and then I'll reopen it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant