Add FOG_VERSION drift-check backstop (migrated from fogproject#921) - #2
Merged
Merged
Conversation
Ports the version-drift detection logic from fogproject PR #921 (FOGProject/fogproject#921) as a workflow_call reusable workflow, mirroring how stable-releases.yml already owns fogproject's release automation from outside that repo. A thin push-triggered stub in fogproject delegates to this via `uses:` since GitHub Actions has no native cross-repo push trigger. Differences from PR #921: `stable` is dropped entirely (its version is already owned by stable-releases.yml's release flow), and a detected drift is committed straight to the branch instead of opening a review PR, since these are the same mechanical fixes the local pre-commit hook already makes without review.
…ches check-fog-version.yml's push trigger only fires on a branch that already has the stub committed to it. A branch cut from dev-branch after dev-branch has the stub inherits it for free, but a branch created any other way (or before dev-branch had it) would silently go unwatched. This reusable workflow, called from a new create-triggered stub in fogproject, copies the canonical stub - whatever's currently committed on dev-branch - onto any newly created working-1.6/dev-branch/rc-*/ feature-* branch that doesn't already have it. stable and anything outside those patterns are left untouched.
…stable GitHub only resolves a create-event workflow from a repo's default branch, which for fogproject is stable - so a create-triggered stub there was rejected in favor of a scheduled sweep that stays entirely in this repo. bootstrap-fog-version-check-stub-sweep.yml runs daily, lists fogproject branches, filters to the ones check-fog-version.yml watches, and hands off any missing the stub to the existing single-branch worker (now also runnable by hand via workflow_dispatch).
check-fog-version.yml now also accepts workflow_dispatch directly (single branch, for manual runs/testing) alongside workflow_call. New check-fog-version-sweep.yml runs daily plus workflow_dispatch, listing every branch check-fog-version.yml watches and running the real check-and-fix logic against each one - a catch-all for anything the push-triggered stub in fogproject might miss (missed webhook delivery, an Actions outage during the original push, a branch whose stub wasn't bootstrapped yet, etc), independent of whether the stub is even present on that branch.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
FOGProject/fogprojectPR #921 into this repo as a reusable (workflow_call) workflow,check-fog-version.yml, matching howstable-releases.ymlalready owns this project's release automation from outsidefogproject.stableis excluded (owned bystable-releases.yml's release flow), and detected drift is committed directly to the branch instead of opening a review PR.fogproject(separate PRs: fogproject#922, #923, #924, #925, #926) that delegates to this workflow viauses:— GitHub Actions has no native cross-repopushtrigger, so something has to live there to react to pushes/merges.bootstrap-fog-version-check-stub.yml+bootstrap-fog-version-check-stub-sweep.yml: a daily sweep that finds any fogproject branch matching the watched patterns but missing the push stub (e.g. a branch not descended fromdev-branch) and adds it directly — no new trigger needed in fogproject'sstablebranch, which stays untouched.check-fog-version-sweep.yml: a second daily sweep, this one running the actual version check-and-fix against every watched branch regardless of whether the push stub is present — a failsafe catch-all for anything the push trigger might miss (missed webhook delivery, an Actions outage during the original push, etc). Bothcheck-fog-version.ymlandbootstrap-fog-version-check-stub.ymlare now also directlyworkflow_dispatch-able against a single branch for manual runs/testing.Open risk
The reusable workflow needs the same GH App token
stable-releases.ymluses (vars.FOG_WORKFLOWS_APPID/secrets.FOG_WORKFLOWS_PRIVATE_KEY). If those are scoped to this repo only rather than theFOGProjectorg, the fogproject-side stub call won't be able to inherit them viasecrets: inherit— first real trigger will confirm either way.Test plan
working-1.6's known drift (per #921's description) gets fixed via a direct commit.workflow_dispatch) correctly identifies branches missing the push stub and adds it.workflow_dispatch) runs against every watched branch and fixes any drift found.stable.