Skip to content

With default fetch flags, the if_changed logic will fail for merge bases or default branches that have not been fetched. #3602

@jtszalay

Description

@jtszalay

With the default flags (https://buildkite.com/docs/agent/v3/configuration#git-fetch-flags):

buildkite-agent pipeline upload .buildkite/upload-steps/unit-tests.yml
Reading pipeline configs from [".buildkite/upload-steps/unit-tests.yml"]
Updating BUILDKITE_COMMIT to "d9ad0ec59b9247d59e1f13ef2a65e8da7d05e952"
ERROR  Couldn't determine git diff from upstream, not skipping any pipeline steps: git rev-parse "origin/bk-if-changed": exit status 128
ERROR  git: fatal: ambiguous argument 'origin/bk-if-changed': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
This could be because "origin/bk-if-changed" might not be a commit in the repository.
You may need to change the --git-diff-base flag or BUILDKITE_GIT_DIFF_BASE env var.
Successfully parsed and uploaded pipeline #1 from "unit-tests.yml"

Is there a recommended set of fetch flags to use?

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