Skip to content

Bug: Gerrit Upload Swallowing Errors #8568

@lecafard

Description

@lecafard

Description

Steps to Reproduce the Problem

  1. Create a change.
  2. Push to a non existent branch using jj gerrit upload -r @ -b non-existent-branch

Expected Behavior

The gerrit upload should fail and show an error message indicating that it failed. This is the output
I get when using git directly.

> git push origin c7307b5c:refs/for/non-existent-branch
Enumerating objects: 5, done.
Counting objects: 100% (5/5), done.
Delta compression using up to 24 threads
Compressing objects: 100% (3/3), done.
Writing objects: 100% (3/3), 333 bytes | 333.00 KiB/s, done.
Total 3 (delta 1), reused 0 (delta 0), pack-reused 0 (from 0)
remote: Resolving deltas: 100% (1/1)
remote: Processing changes: refs: 1, done    
To ssh://gerit.example.com:29418/repo
 ! [remote rejected] c7307b5c -> refs/for/non-existent-branch (branch non-existent-branch not found)
error: failed to push some refs to 'ssh://gerrit.example.com:29418/repo`

Actual Behavior

> jj gerrit upload -r @ -b non-existent-branch         
Found 1 heads to push to Gerrit (remote 'origin'), target branch 'non-existent-branch'
Pushing qolnzvzl c7307b5c this should fail
remote: Resolving deltas: 100% (1/1)
remote: Processing changes: refs: 1, done

> $?
zsh: command not found: 0

Specifications

  • Platform: Linux
  • Version: v0.37.0

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