Skip to content

Commit

Permalink
Merge pull request MaterializeInc#24045 from def-/pr-depends-on-fix
Browse files Browse the repository at this point in the history
buildkite: Fix depends_on
  • Loading branch information
def- committed Dec 20, 2023
2 parents 35a534c + 80b9fae commit 0a2678e
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 7 deletions.
21 changes: 17 additions & 4 deletions ci/mkpipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ def visit(step: dict[str, Any]) -> None:

add_test_selection_block(pipeline, args.pipeline)

add_depends_on(pipeline, args.pipeline)
check_depends_on(pipeline, args.pipeline)

# Remove the Materialize-specific keys from the configuration that are
# only used to inform how to trim the pipeline and for coverage runs.
Expand Down Expand Up @@ -207,12 +207,25 @@ def visit(config: Any) -> None:
visit(config)


def add_depends_on(pipeline: Any, pipeline_name: str) -> None:
if pipeline_name != "tests":
def check_depends_on(pipeline: Any, pipeline_name: str) -> None:
if pipeline_name != "test":
return

def visit(step: dict[str, Any]) -> None:
if "depends_on" not in step:
# From buildkite documentation:
# Note that a step with an explicit dependency specified with the
# depends_on attribute will run immediately after the dependency step
# has completed, without waiting for block or wait steps unless those
# are also explicit dependencies.
if step.get("id") in ("analyze", "deploy", "coverage-pr-analyze"):
return

if (
"depends_on" not in step
and "prompt" not in step
and "wait" not in step
and "group" not in step
):
raise UIError(
f"Every step should have an explicit depends_on value, missing in: {step}"
)
Expand Down
3 changes: 0 additions & 3 deletions ci/test/pipeline.template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -687,7 +687,6 @@ steps:
timeout_in_minutes: 20
command: bin/ci-builder run stable ci/test/coverage_report.sh
inputs: ["*"]
depends_on: []
priority: 1
agents:
queue: builder-linux-x86_64
Expand All @@ -700,7 +699,6 @@ steps:
label: Analyze tests
timeout_in_minutes: 15
inputs: ["*"]
depends_on: []
plugins:
- junit-annotate#v2.0.2:
artifacts: "*junit_*.xml"
Expand All @@ -714,7 +712,6 @@ steps:
- id: deploy
label: Deploy
trigger: deploy
depends_on: []
async: true
branches: "main v*.*"
build:
Expand Down

0 comments on commit 0a2678e

Please sign in to comment.