# Step Dependencies and block

**URL:** https://forum.buildkite.community/t/step-dependencies-and-block/862
**Category:** General
**Created:** [January 14, 2020, 11:05pm UTC](https://forum.buildkite.community/t/step-dependencies-and-block/862 "2020-01-14T23:05:27Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![xiaket](https://avatars.discourse-cdn.com/v4/letter/x/7feea3/32.png) [@xiaket](https://forum.buildkite.community/u/xiaket)
#### Post date: [January 14, 2020, 11:05pm UTC](https://forum.buildkite.community/t/step-dependencies-and-block/862/1 "2020-01-14T23:05:27Z")

</div>

I bumped into an issue when I was working with the step dependencies. I have a pipeline that looks like this:

```auto
  - label: ':aws: Deploy'
    trigger: 'deploy'
    key: "dev-deploy"

  - block

  - label: ':docker: Test'
    depends_on: "dev-deploy"
    plugins:
      - docker-compose#v3.0.3:
          run: tesst
          command: ["run", "tests/index.js"]

```

I would expect that the pipeline will pause after the deploy step and will wait for human input, however, block was skipped and the pipeline just continues with the test step.

Looking back at the doc I realized that block was not treated as wait and this is somehow expected behaviour. However, I must say this is very counter-intuitive and would possibly lead to confusions and all that.

Regards,  
Kai

---

<div class="post-metadata">

### Author: ![sj26](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.buildkite.community/sj26/32/17_2.png) [@sj26](https://forum.buildkite.community/u/sj26)
#### Post date: [March 6, 2020, 3:24am UTC](https://forum.buildkite.community/t/step-dependencies-and-block/862/2 "2020-03-06T03:24:37Z")

</div>

Hi @xiaket!

Yeah, this is a bit tricky. Because you’ve added an explicit `depends_on` to that later step, it’s assuming that the step _only_ depends on what you’ve listed. To get the desired behaviour, you’ll need to be explicit about all of your dependencies:

```auto
  - label: ':aws: Deploy'
    trigger: 'deploy'
    key: "dev-deploy"

  - block: "Deploy to Test"
    key: "block-test-deploy"
    depends_on: "dev-deploy"

  - label: ':docker: Test'
    key: "test-deploy"
    depends_on: "block-test-deploy"
    plugins:
      - docker-compose#v3.0.3:
          run: tesst
          command: ["run", "tests/index.js"]

```

Or, for this simple example, you could just switch back to implicit dependencies:

```auto
  - label: ':aws: Deploy'
    trigger: 'deploy'

  - block

  - label: ':docker: Test'
    plugins:
      - docker-compose#v3.0.3:
          run: tesst
          command: ["run", "tests/index.js"]

```

There’s some more information about implicit and explicit dependencies in the documentation here:

> **[Managing Step Dependencies](https://buildkite.com/docs/pipelines/dependencies)**
>
> Automate your team’s software development processes, from testing through to delivery, no matter the language, environment or toolchain.
