Skip to content

Error when using "notify" key in steps within a group #112

@aelindeman

Description

@aelindeman

The monorepo-diff plugin fails to parse the given pipeline config when there are notify keys in steps in a group. E.g. given this valid pipeline configuration:

steps:
  - label: ":pipeline:"
    plugins:
      - monorepo-diff#v1.5.1:
          watch:
            - path:
                - foo/**
              config:
                group: "Foo"
                steps:
                  - command: ./scripts/a.sh
                    label: "Run A"
                    notify:
                      - github_commit_status:
                          context: "buildkite/foo/a"
                  - command: ./scripts/b.sh
                    label: "Run B"
                    notify:
                      - github_commit_status:
                          context: "buildkite/foo/b"

Running the pipeline results in an error (with Buildkite agent v3.107.2):

DEBU[2025-10-28T14:34:56Z]
command = 'buildkite-agent',
args = '[pipeline upload /tmp/bmrd-2550478102 --no-interpolation]',
error = '2025-10-28 14:34:55 INFO   Reading pipeline configs from ["/tmp/bmrd-2550478102"]
2025-10-28 14:34:56 ERROR  Unrecoverable error, skipping retries
buildkite-agent: fatal: Failed to upload and process pipeline: Pipeline upload rejected: `rawnotify` is not a valid property on the `command` step, perhaps you meant `notify`?
'
FATA[2025-10-28T14:34:56Z] +++ failed to upload pipeline: command `buildkite-agent` failed: exit status 1
🚨 Error: The command exited with status 1

This seems to be because the part of the plugin that parses the config object changes the notify keys to rawnotify:

DEBU[2025-10-28T14:34:55Z] Output from diff:
.buildkite/pipeline.yaml
Generated Pipeline:
steps:
    - group: 'Foo'
      steps:
        - label: 'Run A'
          command: ./scripts/a.sh
          rawnotify:
            - github_commit_status:
                context: buildkite/foo/a
        - label: 'Run B'
          command: ./scripts/b.sh
          rawnotify:
            - github_commit_status:
                context: buildkite/foo/b

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions