Skip to content

[Bug]: branch revert returns 'no changes' error despite actual differences between commits #9802

@daniel-leicht

Description

@daniel-leicht

What happened?

Description

When attempting to revert a branch to a previous commit/tag using lakectl branch revert, the command fails with
a "no changes" error (400 Bad Request), even though there are confirmed differences between the current branch
state and the target commit.

Steps to Reproduce

  1. Have a repository with a branch (e.g., main) that has progressed beyond a tagged commit
  2. Attempt to revert the branch to the tag:
    lakectl branch revert lakefs://deltalake-tables/main before-rerun -y
    

Expected Behavior

The revert operation should succeed and create a new commit that undoes the changes, reverting the branch state to
match the specified tag/commit.

Actual Behavior

The command fails with:

Branch: lakefs://deltalake-tables/main
update branch: no changes
400 Bad Request

This occurs despite there being many actual changes between the current branch state and the target tag.

Environment

  • lakeFS Server Version: 1.73.0 (Official Docker container)
  • lakectl Version: 1.70.1 (Windows)
    Using Minio as S3 backend.

Additional Context

The "no changes" detection appears to be incorrect in this scenario. The branch has progressed significantly from
the tagged commit, so the revert should detect and reverse those changes."
Create GitHub issue for lakeFS bug

Also, when attempting to see the diff, it comes back empty:

lakectl diff "lakefs://deltalake-tables/main" "lakefs://deltalake-tables/before-rerun"
Left ref: lakefs://deltalake-tables/main
Right ref: lakefs://deltalake-tables/before-rerun
  • There are over 10 commits between the last commit to the commit tagged "before-rerun". I even added a new file via the Web UI and committed, still I get the same result.
  • The issue also happens when entering the commit id instead of the tag name.
  • --allow-empty-commit in the revert command doesn't help and the revert command doesn't fail but still doesn't do the actual expected revert.

Just a guess: it seems that the LakeFS server cannot see the diff between these commits and this is the root cause for the issue.

lakeFS version

1.73.0

How lakeFS is installed

Docker container

Affected clients

lakectl 1.70.0 and (lakefs==0.14.0, lakefs-sdk==1.72.0 for Python)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions