ci: deploy cippkvupn-proc in lockstep with cippkvupn - #4
Merged
Merged
Conversation
cippkvupn-proc is the offload (processor) node for cippkvupn, but it had no CI/CD at all - it was hand-deployed once. CIPP only dispatches timers to an offload node whose version EXACTLY matches the main app's, so any drift silently drops the node and makes both apps run the processor timers. Add a second Azure/functions-action step to the existing deploy job so the same checkout is pushed to both apps in one run. No second checkout and no rebuild, so the two apps cannot skew. The existing cippkvupn step is untouched and still runs first. Action ref is pinned to the same commit SHA already used for the main app, per the convention from "ci: pin our deploy workflow's action refs". Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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.
What
Adds a second
Azure/functions-actionstep to the existingmaster_cippkvupn.ymldeploy job so thatcippkvupn-procis deployed from the same workflow run, from the same checkout, ascippkvupn.cippkvupn-proc(Y1 Consumption, plancipp-srv-kvupnproc) is the offload/processor node forcippkvupn. It was created and hand-deployed manually and had no CI/CD at all — itsscmTypewasNone. Without this, it silently rots at whatever version was last hand-pushed.Why this matters — version lockstep
CIPP only dispatches timers to an offload node when that node's version is an exact match for the main app's. From
Modules/CIPPCore/Public/Get-CIPPTimerFunctions.ps1:If the versions drift there is no error and no warning — the node just disappears from
$AvailableNodes. The failure mode is worse than "offloading stops":With zero available nodes, the main app keeps
$RunOnProcessor = $trueand runs the processor timers itself — whilecippkvupn-proc(which hasCIPP_PROCESSOR=true) also still runs them. Both apps then dispatch the same background timers against every live tenant simultaneously.That makes "these two apps are on the same build" a correctness requirement, not a nice-to-have.
How
One job, one checkout, two deploy steps — not a matrix and not a second build.
The existing workflow has no build phase at all:
package: '.'hands the checked-out repo root straight toAzure/functions-action. So the strongest available guarantee is to reuse the same working directory rather than re-checking-out. A matrix would re-clone the same SHA into a second runner — almost certainly identical, but it reintroduces a "two independent packaging operations" step that this approach removes entirely.Ordering is deliberate:
cippkvupndeploys first, unchanged, and still runs first. A failure in the newly-added proc step cannot prevent production from deploying.if: always(). If the main deploy fails, the proc deploy is skipped, so both apps stay together on the previous version — still in lockstep.Action ref is pinned to
Azure/functions-action@c5060b3b8bb1ebbcb531abd00c822ecbaa8ea656 # v1.5.7— the same SHA already in use for the main app, per the convention set in "ci: pin our deploy workflow's action refs" (#3). CRLF line endings preserved, same as that PR.Auth
Publish profile, matching the existing mechanism for this app (this workflow does not use OIDC; only the upstream
dev_api.ymldoes).A new repo secret
AZUREAPPSERVICE_PUBLISHPROFILE_CIPPKVUPN_PROChas already been created fromaz webapp deployment list-publishing-profiles -g cipp -n cippkvupn-proc --xml. SCM basic auth is enabled on the app, so the profile is valid. No Azure resources were modified.Risk / notes
.github/workflows/is gitignored in this fork (upstream does this so the sync bot leaves fork workflows alone), so this file needsgit add -f. Noting it so the next editor is not surprised.master.🤖 Generated with Claude Code