-
-
Notifications
You must be signed in to change notification settings - Fork 217
Description
Bug Report
After upgrading from RC2 to v2.0.1, running moon run :install in CI produces:
CAUTION
No tasks found. Unable to execute action pipeline.
For targets :install.
The install task is defined as:
install:
command: pnpm install
toolchains:
- node
type: run
args:
- --frozen-lockfile
- --prefer-offlineRoot Cause
Commit b1a6939c2 ("fix: Audit 02/13 #2354") changed the CI check logic in two ways:
-
Flag inversion:
ci_checkchanged from opt-in (--only-ci-tasks, defaultfalse) to opt-out (--ignore-ci-checks, defaulttrue), meaning CI checks are now always applied. -
Removed
reqs.ciguard: The old conditionreqs.ci && reqs.ci_check && !task.should_run_in_ci()was changed toreqs.ci_check && !task.should_run(reqs.ci), removing the requirement that CI checks only apply when explicitly requested.
The old code had a comment explaining the intended behavior:
// Only apply checks when requested. This applies to `moon ci`,
// but not `moon run`, since the latter should be able to
// manually run local tasks in CI (deploys, etc).Since should_run(in_ci=true) returns false for type: run tasks (only build and test are considered runnable in CI by default), all type: run tasks are now silently filtered out when using moon run in a CI environment.
Expected Behavior
moon run should be able to run any task type in CI, as was the case before v2.0.0. The CI filtering should only apply to moon ci.
Workaround
- Add
--ignore-ci-checksflag:moon run --ignore-ci-checks :install - Or set
runInCI: alwayson the task
Environment
- moon v2.0.1
- Worked in RC2, broken since v2.0.0