Skip to content

"Invalid git branch: main" when using piperider compare #866

@DaveFlynn

Description

@DaveFlynn

When using the piperider compare function, you may come across the following error message:

Error: Invalid git branch: main

This is caused because PipeRider expects the name of the default/base branch to be main. This may not always be the case, and another common alternative is master.

To workaround this issue, you should create a default compare 'recipe' and specify the actual name of your default/base branch.

For instance, if your default branch is called master, you should create the following file in .piperider/compare/default.yml

base:
  branch: master
  dbt:
    commands:
    - dbt deps
    - dbt build
  piperider:
    command: piperider run
target:
  dbt:
    commands:
    - dbt deps
    - dbt build --select state:modified+ --state <DBT_STATE_PATH>
  piperider:
    command: piperider run

After creating this file, specifying the correct base branch name, you should be able run piperider compare

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