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

Fix: Git package error handling #8345

Merged
merged 1 commit into from
Nov 5, 2024

Conversation

N-o-Z
Copy link
Member

@N-o-Z N-o-Z commented Nov 4, 2024

Closes #8086

Change Description

Background

Parsing git shell commands response to classify into comprehensible errors, seems like some FS return different strings for the same errors.

Bug Fix

The bug resulted from difference in output when not a git repository

The fix was to lowercase the out put before comparison

Testing Details

Added unit test

Breaking Change?

No

@N-o-Z N-o-Z added bug Something isn't working area/lakectl Issues related to lakeFS' command line interface (lakectl) include-changelog PR description should be included in next release changelog labels Nov 4, 2024
@N-o-Z N-o-Z requested a review from a team November 4, 2024 20:54
@N-o-Z N-o-Z self-assigned this Nov 4, 2024
Copy link

github-actions bot commented Nov 4, 2024

E2E Test Results - Quickstart

11 passed

Copy link

github-actions bot commented Nov 4, 2024

E2E Test Results - DynamoDB Local - Local Block Adapter

13 passed

Copy link
Contributor

@arielshaqed arielshaqed left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is of course cool, but also unpleasant. E.g. this code still breaks because

❯ LANGUAGE=sv   git status
På grenen docs/getting-started-on-the-project
inget att checka in, arbetskatalogen ren

will happen in some places in Northern Europe.

Perhaps open an issue to discover a proper way to run Git plumbing?

case strings.Contains(lowerOut, "remote not found"):
return "", errors.ErrRemoteNotFound
default:
return "", fmt.Errorf("%s: %w", out, err)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Odd: This error has a different format, it includes out.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the only place where the output has any relevance

@N-o-Z
Copy link
Member Author

N-o-Z commented Nov 5, 2024

This is of course cool, but also unpleasant. E.g. this code still breaks because

❯ LANGUAGE=sv   git status
På grenen docs/getting-started-on-the-project
inget att checka in, arbetskatalogen ren

will happen in some places in Northern Europe.

Perhaps open an issue to discover a proper way to run Git plumbing?

Opened #8348

@N-o-Z N-o-Z merged commit a39c444 into master Nov 5, 2024
44 checks passed
@N-o-Z N-o-Z deleted the fix/lakectl-local-git-error-handling-8086 branch November 5, 2024 14:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/lakectl Issues related to lakeFS' command line interface (lakectl) bug Something isn't working include-changelog PR description should be included in next release changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

lakectl local init on a branch used for the same purpose with another user fails with git error
2 participants