Skip to content
This repository was archived by the owner on Jul 7, 2025. It is now read-only.
This repository was archived by the owner on Jul 7, 2025. It is now read-only.

Replacement of skipped steps should transfer dependencies to dependents  #157

@dominics

Description

@dominics

Example setup:

# pipeline.a.yml
steps:
  - key: a
    command: # does something with side effects

# pipeline.b.yml
monorepo:
  produces: b.tar.gz
steps:
  - key: b
    depends_on: a
    command: # creates b.tar.gz

# pipeline.c.yml
monorepo:
  expects: b.tar.gz
steps:
  - key: c
    depends_on: b
    command: # uses b.tar.gz, and relies on side-effects of `a` happening first

If b has no matches and is skipped, currently we:

  • Create the artifact step
  • Add a dependency to any steps that depended on the skipped step (in this case c), for the artifact step (so that b.tar.gz is guaranteed to exist before step c runs).

This is fine logic, however depending on the nature of the different steps, some builds may have ordering concerns between a and c. Such builds might be relying on the transitive nature of depends_on (as they should be able to) so that their pipeline is simple. In our specific example, a = node_modules, b = typescript, and c = some tests.

Just running c after the replacement of b isn't enough. Instead, it has to run after all of b's depends_ons, if they're still in the build.

Result: if b is skipped, c's depends_on should be [artifact step + (depends on of b) + (depends on of c)].filter(still in build), for a result of: [artifact step, a]

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingenhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions