Skip to content

feat(reusable): add run-batch-command for selective PR runs - #36

Merged
Gabrymi93 merged 2 commits into
mainfrom
feat/reusable-run-batch-command
Sep 29, 2026
Merged

Gabrymi93 merged 2 commits into
mainfrom
feat/reusable-run-batch-command

Conversation

@Gabrymi93

Copy link
Copy Markdown
Member

Summary

Aggiunge l'input opzionale run-batch-command alla reusable workflow pipeline-reusable.yml.

Problema

Quando un repo chiama la reusable con run-command: make run-all, il pipeline runna tutti i dataset ad ogni post-merge, anche se solo uno è cambiato nella PR. I repo con make run-all ignorano il batch.txt generato dal detect.

Soluzione

Nuovo input run-batch-command: se fornito, su PR con batch.txt non vuoto, usa quello al posto di run-command. Su schedule/dispatch rimane run-command (full refresh).

# Esempio caller
run-command: make run-all
run-batch-command: make run-batch  # toolkit run --batch batch.txt

Effetto

  • PR post-merge: solo i dataset toccati (via batch)
  • Schedule/dispatch: tutti i dataset (come prima)
  • Backward compat: se run-batch-command non è fornito, nulla cambia

Checklist

  • Backward compatible: input con default vuoto, nessun cambio per i caller esistenti
  • La logica di skip (nessun dataset cambiato) è preservata

New optional input 'run-batch-command' enables repos to use a different
command (e.g. toolkit run --batch batch.txt) when a PR triggers the
pipeline and batch.txt has content. Falls back to run-command otherwise.

This lets repos with make run-all switch to batch mode on PRs without
changing their schedule/dispatch behavior.
The drift-check script was looking for infra/agent-context-builder/
dataciviclab.config.yml locally, which doesn't exist in CI (separate repo).
Now fetches from GitHub API by default, falls back to local file if
--config is explicitly passed.
@Gabrymi93
Gabrymi93 merged commit 7a06c6e into main Sep 29, 2026
2 checks passed
@Gabrymi93
Gabrymi93 deleted the feat/reusable-run-batch-command branch September 29, 2026 13:07
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