Skip to content

ci: add mirror-sync workflow + empty fork-ci/ overlay (symmetric to storage#12)#25

Merged
entlein merged 1 commit intomainfrom
ci/mirror-sync-proposal
Apr 24, 2026
Merged

ci: add mirror-sync workflow + empty fork-ci/ overlay (symmetric to storage#12)#25
entlein merged 1 commit intomainfrom
ci/mirror-sync-proposal

Conversation

@entlein
Copy link
Copy Markdown

@entlein entlein commented Apr 24, 2026

Summary

Node-agent counterpart to k8sstormcenter/storage#12.

Adds .github/workflows/mirror-sync.yaml + an empty-but-documented fork-ci/ directory. On every push to upstream-pr/**, the workflow force-updates test-mirror/<same-topic> with fork-ci/ overlaid onto the tree. This lets internal CI exercise upstream-bound branches without ever polluting the upstream PR diff with fork-only workflow files.

fork-ci/ is intentionally empty here beyond a README: node-agent's current build.yaml + component-tests.yaml already behave correctly when dispatched on any ref, so today's mirror is byte-identical to the source. The machinery is in place so that the moment a fork-only tweak is needed (test-mirror push trigger, different image registry, etc.), it has a non-leaky home.

Why this shape (identical to storage)

  • Single mental model across both forks: same directory name, same workflow name, same behavior.
  • When a future fork-only tweak is needed, the path is obvious.
  • Failsafe refuses to run on non-upstream-pr/* branches, so nothing else on the fork can accidentally mirror itself.

Prerequisite to merge

A repo secret CROSS_REPO_PAT with contents:write on this fork (same secret pattern we use on storage). Without it, the workflow will fail to force-push refs/heads/test-mirror/**.

Test plan

  • Merge
  • Add / confirm CROSS_REPO_PAT secret on k8sstormcenter/node-agent
  • Push the existing upstream-pr/analyzer-perf-harness branch (or any trivial amend) and verify test-mirror/upstream-pr/analyzer-perf-harness appears and build.yaml runs against it
  • Confirm the diff between upstream-pr/... and test-mirror/upstream-pr/... is empty today (empty fork-ci/ = no overlay)

Symmetric to k8sstormcenter/storage#12. Reacts to every push on
upstream-pr/** by force-updating test-mirror/<same-topic> with the
working tree overlaid from fork-ci/ on main. This lets our internal CI
exercise upstream-bound branches without polluting the upstream diff
with fork-only workflow files.

fork-ci/ is intentionally empty beyond a README today: node-agent's
existing build.yaml + component-tests.yaml already behave correctly on
any ref. The machinery is in place so that the moment a fork-only
workflow tweak is needed (e.g. a push trigger including test-mirror/**
or a different image registry), it has a home that will not leak into
the upstream PR diff.

Requires a CROSS_REPO_PAT secret with contents:write on the fork so the
workflow can force-push refs/heads/test-mirror/**.

Signed-off-by: Entlein <eineintlein@gmail.com>
@entlein entlein merged commit a7b7bb8 into main Apr 24, 2026
1 of 3 checks passed
@entlein entlein deleted the ci/mirror-sync-proposal branch April 24, 2026 11:32
entlein pushed a commit that referenced this pull request May 1, 2026
Pulls in the full PR-kubescape#316 review fix set that just landed on storage main:
proper splitPath-based trailing-* anchoring, DefaultCollapseConfigs()
defensive-copy accessor, FindConfigForPath value-return, splitEndpoint
defensive guard, plus the BenchmarkCompareDynamic baseline.
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