Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
c582706
feat(plugin): add optional summary and category to manifest
JeroenSoeters Apr 22, 2026
c4c9baf
feat(config): add artifacts.repositories, deprecate flat url/username…
JeroenSoeters Apr 22, 2026
ffffa31
feat(api): add plugin request/response types and error codes
JeroenSoeters Apr 22, 2026
c8cca92
feat(config): mirror artifacts.repositories in Go config types
JeroenSoeters Apr 22, 2026
cea3bf0
feat(config): emit deprecation warnings for legacy artifacts fields
JeroenSoeters Apr 22, 2026
831e4e3
refactor(opsmgr): support multi-repo config with type filtering
JeroenSoeters Apr 22, 2026
30bfca5
feat(plugin_manager): add package skeleton with constructor
JeroenSoeters Apr 22, 2026
e596181
feat(plugin_manager): implement List/Available/Info/Install/Uninstall…
JeroenSoeters Apr 23, 2026
cc4f463
feat(api): add plugin management REST endpoints
JeroenSoeters Apr 23, 2026
a67098d
feat(api): extend client with plugin operations and CLI error renderers
JeroenSoeters Apr 23, 2026
b9819f2
feat(cli/plugin): add local orbital wrapper for auth dual-install
JeroenSoeters Apr 23, 2026
2813d8e
feat(cli/plugin): add list/search/info commands with renderers
JeroenSoeters Apr 23, 2026
7e8efc5
feat(cli/plugin): add install/uninstall/upgrade commands with auth du…
JeroenSoeters Apr 23, 2026
af33628
feat(cli/plugin): wire all new subcommands into plugin root
JeroenSoeters Apr 23, 2026
812796d
ci: stage e2e plugins via setup-test-plugins.sh
JeroenSoeters Apr 25, 2026
4fe35db
license: add SPDX header to plugin_test.go
JeroenSoeters Apr 25, 2026
90153a6
lint: clear pre-existing lint issues on the branch
JeroenSoeters Apr 25, 2026
a13d388
fix(pkl): bind ArtifactConfig.Repositories as []*Repository
JeroenSoeters Apr 25, 2026
6cdeb5b
fix(pkl): gofmt ArtifactConfig alignment after Repository type change
JeroenSoeters Apr 25, 2026
6c971c8
ci: stage auth-basic plugin so the agent boots in e2e
JeroenSoeters Apr 25, 2026
101e4e0
test(e2e): wire FORMAE_PLUGIN_DIR through to agent config
JeroenSoeters Apr 25, 2026
76f48a7
chore(build): remove external plugin bundling targets (rebase redo)
JeroenSoeters Apr 25, 2026
c056b73
test(e2e): honor FORMAE_PLUGIN_DIR in CLI lookups, stage sftp
JeroenSoeters Apr 25, 2026
3adb0cc
fix(extract): config-driven plugin dir; reuse target PklProject deps
JeroenSoeters Apr 26, 2026
9c82392
fix(cli): default PluginDir; pass --config to project init e2e helper
JeroenSoeters Apr 26, 2026
fbf28f5
fix(cli): add --plugin-dir flag to project init; decouple from config
JeroenSoeters Apr 26, 2026
765548a
chore(deps): bump orbital to v0.1.38
JeroenSoeters Apr 27, 2026
b663225
feat(plugin-manager): channel routing, metadata-driven filter, fail-f…
JeroenSoeters Apr 27, 2026
3744302
feat(cli/plugin): channel flags, bundle rendering, dedup + trailing n…
JeroenSoeters Apr 27, 2026
2bce2de
feat(packaging): install plugins via standard metapackage
JeroenSoeters Apr 27, 2026
634537b
test(blackbox): seed orbital tree marker so embedded agent passes Rea…
JeroenSoeters Apr 27, 2026
3b91368
test(e2e): stage formae binary in installer-shaped tree
JeroenSoeters Apr 27, 2026
d580bb4
ci(e2e): install plugins via orbital instead of cloning from source
JeroenSoeters Apr 28, 2026
5744558
ci(e2e): warm orbital cache before plugin install
JeroenSoeters Apr 28, 2026
23ceb53
fix(plugin-manager): refresh orbital cache on agent startup
JeroenSoeters Apr 28, 2026
a9c6567
fix(e2e): make setup_pkl.sh tolerant of partial plugin sets
JeroenSoeters Apr 28, 2026
866b73c
fix(e2e+migrate): stop overriding test agent pluginDir; guard migrati…
JeroenSoeters Apr 28, 2026
1ba280f
ci(e2e): TestProjectInit needs both aws and azure
JeroenSoeters Apr 28, 2026
ccbb9c9
fix(e2e): re-mirror FORMAE_PLUGIN_DIR into test agent pluginDir
JeroenSoeters Apr 28, 2026
f3646b6
fix(cli): query agent for installed plugin versions in extract + proj…
JeroenSoeters Apr 28, 2026
cb2dc3c
fix(cli): add --config flag to `formae project init`
JeroenSoeters Apr 28, 2026
79063e5
fix(cli): query agent for installed plugin versions in eval
JeroenSoeters Apr 28, 2026
97e6eaa
chore(pkl): remove unused HasRemotePackages
JeroenSoeters Apr 28, 2026
1bb8a93
test(e2e): add eval + schema-location tests (red)
JeroenSoeters Apr 28, 2026
cb25fd6
test(e2e): place fixture before --config in Eval helper
JeroenSoeters Apr 28, 2026
7fcc0a8
test(e2e): assert Stacks (plural) not Stack in eval output
JeroenSoeters Apr 29, 2026
be7782e
feat(cli): --schema-location flag for eval and extract
JeroenSoeters Apr 29, 2026
b096b32
test(e2e): assert aws-specific local import, allow remote formae core
JeroenSoeters Apr 29, 2026
233c579
fix(cli): remove dead buildRemoteDependencyStrings
JeroenSoeters Apr 29, 2026
1146ddd
fix(cli): gofmt — drop double blank line after buildDependencyStrings
JeroenSoeters Apr 29, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
146 changes: 106 additions & 40 deletions .github/workflows/e2e-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,6 @@ name: formae-e2e-tests

on:
workflow_dispatch:
inputs:
plugin_refs:
description: >-
Plugin ref overrides as comma-separated name=ref pairs
(e.g., aws=feat/msgpack,azure=feat/msgpack). Leave empty for main.
required: false
default: ''
pull_request:
branches: [ "main" ]

Expand Down Expand Up @@ -85,23 +78,45 @@ jobs:
strategy:
fail-fast: false
matrix:
test:
- TestReconcileApply
- TestPatchApply
- TestDiscovery
- TestSoftReconcile
- TestHardReconcile
- TestReplace
- TestAutoReconcile
- TestTTL
- TestCancelCommand
- TestCascadeDelete
- TestTargetResolvable
- TestProjectInit
- TestSimulateApply
- TestExtractAndReapply
- TestAuthBasic
- TestPluginConfig
include:
- test: TestReconcileApply
plugins: aws azure
- test: TestPatchApply
plugins: aws azure
- test: TestDiscovery
plugins: aws azure
- test: TestSoftReconcile
plugins: aws azure
- test: TestHardReconcile
plugins: aws azure
- test: TestReplace
plugins: aws azure
- test: TestAutoReconcile
plugins: aws
- test: TestTTL
plugins: aws
- test: TestCancelCommand
plugins: aws
- test: TestCascadeDelete
plugins: aws
- test: TestTargetResolvable
plugins: compose grafana
- test: TestProjectInit
plugins: aws azure
- test: TestSimulateApply
plugins: aws
- test: TestExtractAndReapply
plugins: aws
- test: TestEvalDefault
plugins: aws
- test: TestEvalSchemaLocationLocal
plugins: aws
- test: TestExtractSchemaLocationLocal
plugins: aws
- test: TestAuthBasic
plugins: auth-basic
- test: TestPluginConfig
plugins: sftp

steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -155,33 +170,84 @@ jobs:
tenant-id: ${{ secrets.AZURE_TENANT_ID }}
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}

- name: Build plugin repo list with ref overrides
- name: Install plugins via orbital
run: |
# Start with default repos from Makefile
REPOS="$(grep -A 20 '^EXTERNAL_PLUGIN_REPOS' Makefile | grep '\.git' | sed 's/\\$//' | xargs)"

# Apply ref overrides from input (e.g., "aws=feat/msgpack,azure=feat/msgpack")
REFS="${{ github.event.inputs.plugin_refs }}"
if [ -n "$REFS" ]; then
IFS=',' read -ra PAIRS <<< "$REFS"
for pair in "${PAIRS[@]}"; do
name="${pair%%=*}"
ref="${pair##*=}"
REPOS=$(echo "$REPOS" | sed "s|formae-plugin-${name}.git\(@[^ ]*\)\{0,1\}|formae-plugin-${name}.git@${ref}|g")
echo "Pinning ${name} to ref: ${ref}"
done
set -euo pipefail

# Build the formae binary and stage it in an installer-shaped tree
# so orbital (in Embedded mode, derives treeRoot from binary path)
# uses dist/e2e/ as the install root. The bootstrap agent below
# installs plugins through the same orbital tree the test agents
# will later read from (via the SystemPluginDir scan added in
# the multi-source plugin discovery refactor).
make build
mkdir -p dist/e2e/bin dist/e2e/.ops
cp formae dist/e2e/bin/formae

# Minimal bootstrap config — uses the default artifacts.repositories
# (pel#stable + community#stable), no auth, no discovery, no sync.
cat > /tmp/bootstrap.conf.pkl <<'EOF'
amends "formae:/Config.pkl"

agent {
server { port = 49684 }
datastore {
datastoreType = "sqlite"
sqlite { filePath = "/tmp/bootstrap.db" }
}
synchronization { enabled = false }
discovery { enabled = false }
logging { consoleLogLevel = "info" }
}

cli {
api { port = 49684 }
disableUsageReporting = true
}
EOF

# Start the bootstrap agent in the background.
FORMAE_PID_FILE=/tmp/bootstrap.pid \
dist/e2e/bin/formae agent start --config /tmp/bootstrap.conf.pkl \
> /tmp/bootstrap-agent.log 2>&1 &
AGENT_PID=$!

# Wait up to 30s for the agent to come up.
for i in $(seq 1 30); do
if curl -sf http://localhost:49684/api/v1/health >/dev/null 2>&1; then
echo "Bootstrap agent ready after ${i}s"
break
fi
sleep 1
done
if ! curl -sf http://localhost:49684/api/v1/health >/dev/null 2>&1; then
echo "::error::Bootstrap agent did not become healthy"
cat /tmp/bootstrap-agent.log || true
exit 1
fi

echo "EXTERNAL_PLUGIN_REPOS=${REPOS}" >> "$GITHUB_ENV"
# Install only the plugins this test needs. The agent refreshes
# orbital's repository cache at startup, so the install candidate
# solver has fresh metadata to work with.
dist/e2e/bin/formae plugin install ${{ matrix.plugins }} --channel stable

# Stop the bootstrap agent so the test harness can spawn its own.
kill -TERM "$AGENT_PID" || true
wait "$AGENT_PID" 2>/dev/null || true
rm -f /tmp/bootstrap.pid /tmp/bootstrap.db /tmp/bootstrap.conf.pkl

- name: Running ${{ matrix.test }}
env:
AWS_PROFILE: e2e-test
AZURE_SUBSCRIPTION_ID: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
# Point setup_pkl.sh at the orbital-installed plugins. The agent's
# own multi-source discovery already finds them via the binary's
# SystemPluginDir, but setup_pkl.sh is a shell script that needs
# an explicit dir to read PklProject manifests from.
FORMAE_PLUGIN_DIR: ${{ github.workspace }}/dist/e2e/formae/plugins
run: >-
make test-e2e
E2E_RUN_FLAGS="-run ${{ matrix.test }}"
EXTERNAL_PLUGIN_REPOS="${EXTERNAL_PLUGIN_REPOS}"

cleanup:
runs-on: ubuntu-latest
Expand Down
6 changes: 0 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -139,12 +139,6 @@ jobs:
- name: Publish core PKL schema to S3
run: make publish-pkl

- name: Package external plugin PKL schemas
run: make pkg-external-pkl

- name: Publish external plugin PKL schemas to S3
run: make publish-external-pkl

pkg_opkg:
uses: "./.github/workflows/package.yml"
secrets: inherit
Expand Down
7 changes: 6 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,14 @@ RUN if [ -z "$VERSION" ]; then echo "VERSION is required"; exit 1; fi
ENV PATH=/opt/pel/bin:$PATH

RUN useradd -m -s /bin/bash pel

# Install formae + the standard metapackage. The metapackage's `requires`
# resolve at install time and pull in the curated default plugin set
# (aws, azure, gcp, oci, ovh, auth-basic) — replacing the legacy bundled-
# plugins-from-binary extraction step.
RUN apt-get update && \
apt-get install -y jq curl && \
HOME=/home/pel /bin/bash -e -c "$(curl -fsSL https://hub.platform.engineering/get/setup.sh)" -- install --yes --channel ${CHANNEL} formae@${VERSION} && \
HOME=/home/pel /bin/bash -e -c "$(curl -fsSL https://hub.platform.engineering/get/setup.sh)" -- install --yes --channel ${CHANNEL} formae@${VERSION} standard && \
apt-get remove -y jq curl && \
apt-get autoremove -y --purge && \
apt-get clean && \
Expand Down
Loading
Loading