Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Setting Branch Protection from lakectl fails #7589

Closed
itaiad200 opened this issue Mar 22, 2024 · 0 comments · Fixed by #7590
Closed

[Bug]: Setting Branch Protection from lakectl fails #7589

itaiad200 opened this issue Mar 22, 2024 · 0 comments · Fixed by #7590
Assignees
Labels
bug Something isn't working contributor

Comments

@itaiad200
Copy link
Contributor

What happened?

What actually happened, including error codes if applies.

Steps to Reproduce:

  1. Create a new repo.
  2. use lakectl to create branch protection rule: lakectl branch-protect add lakefs://test main

You'll get a 400 bad response result. It works from the UI.
If a branch protection rules exist prior to the operation, then lakectl branch protection rule creation works.

Root Cause: lakectl first tries to fetch the rules and then uses Etag (checksum) for an atomic update. If no rule exists, then the value is an empty string which is forbidden. The Swagger API declares allowEmptyValue: true which is misleading. It allows for the header If-Match with no value, not an empty string value.

Expected behavior

The command should create a branch protection rule successfuly.

lakeFS version

latest

How lakeFS is installed

all

Affected clients

lakectl

Relevant log output

No response

Contact details

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working contributor
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant