Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replacement of skipped steps should transfer dependencies to dependents #157

Open
dominics opened this issue Nov 6, 2020 · 0 comments
Open
Assignees
Labels
bug Something isn't working enhancement New feature or request

Comments

@dominics
Copy link
Contributor

dominics commented Nov 6, 2020

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]

@dominics dominics self-assigned this Nov 6, 2020
@dominics dominics added bug Something isn't working enhancement New feature or request labels Nov 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Development

No branches or pull requests

1 participant