Skip to content

argocd-pr-env-deploy: dispatch the env's mindshub_services stack - #68

Merged
hamishfagg merged 2 commits into
mainfrom
feat/pr-env-dispatch-stacks
Sep 25, 2026
Merged

hamishfagg merged 2 commits into
mainfrom
feat/pr-env-dispatch-stacks

Conversation

@hamishfagg

@hamishfagg hamishfagg commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

What

After argocd app set and before argocd app wait, the action POSTs a workflow_dispatch for mindsdb/mindshub_services/.github/workflows/pr-env-stacks.yml with only=<parent app>. The env's SAM stack then builds while the env rolls out, for every anchor repo, with nothing to add per repo.

Best-effort: a refused dispatch prints a warning and the reconciler's 10-minute schedule deploys the stack instead. Skipped when the anchor is mindshub_services itself (its CI calls the workflow locally so the workflow under test is the one that runs).

New optional input stacks-dispatch-token, defaulting to gh-token. The dispatch needs actions: write on mindshub_services; if GH_PULL_REQUEST_READ_TOKEN is read-only, pass a token that has it.

Depends on

mindsdb/mindshub_services#227 reaching main (the dispatched workflow must be on the default branch). Until then every dispatch is refused and warns.

🤖 Generated with Claude Code

Also in this PR

The anchor-side revision-only handling (is_revision_only_repo): #67 merged before that commit reached its branch, so main still fails a mindshub_services anchor on the own-image ECR check (seen on mindshub_services#227: ECR image mindsdb-mindshub-services:development-... not found). Cherry-picked here.

Right after `argocd app set`, dispatch mindsdb/mindshub_services'
pr-env-stacks.yml for this env so the SAM stack builds while the env
rolls out, for every anchor, with no per-repo job. Best-effort: a
refused dispatch is a warning and the workflow's schedule catches up.
mindshub_services' own CI calls the workflow directly, so it is skipped.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@hamishfagg
hamishfagg requested a review from a team as a code owner September 25, 2026 03:09
mindshub_services is now a PR-env anchor. When it is the anchor, set
revisions.mindshub_services to the PR head and skip the ECR check, the
same treatment its `Deploys:` links already get.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
(cherry picked from commit 818844c)
@hamishfagg
hamishfagg merged commit 57322a0 into main Sep 25, 2026
6 checks passed
@hamishfagg
hamishfagg deleted the feat/pr-env-dispatch-stacks branch September 25, 2026 03:15
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.

2 participants