cirruslabs / cirruslabs/cirrus-cli
Separate definition of task dependencies
- Dominant language
- Go
- Stars
- 285
- Forks
- 34
- PR merge metrics
- No merged PRs in 30d
Description
Right now for very large `.cirrus.yml` configurations there is a problem of dependency definition. All the `depends_on` are sparsed across all the task definition and it might be hard to wrap your head around it. What if we'll introduce a new way to define the execution graph via a top-level `dependecies` definition?
Here is a configuration example of a continious deployment:
```yaml
# .cirrus.yml
dependencies:
Deploy:
only_if: $CIRRUS_BRANCH == "main"
requires:
- Check Incidents
- Push
task:
name: Push
task:
name: Check Incidents
script: ... # checks that there is no active incident
task:
name: Deploy
```
In case `dependencies` is used, parser will error if `depends_on` or `only_if` are used on tasks so there is strictly two different options to specify dependencies without combining them. This way with the new `dependencies` we can change behaviour slightly. For example, treat `requires` as a strict `depends_on`.
Creating this ticket as a brain dump and a conversation starter.
Contributor guide
No contributing guide indexed for this repository
Research direction
No source files or tests are named. Start by locating the .cirrus.yml parser and existing handling for task-level depends_on and only_if; define the top-level dependencies syntax, validation rules, and strict requires behavior, then add coverage for the new configuration and parser errors.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- ci-cd
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100