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

UTF-8 undecodable files checked in breaks commands #915

Closed
BadLiveware opened this issue May 22, 2024 · 4 comments
Closed

UTF-8 undecodable files checked in breaks commands #915

BadLiveware opened this issue May 22, 2024 · 4 comments

Comments

@BadLiveware
Copy link

BadLiveware commented May 22, 2024

Certain commands break when the change contains UTF-8 undecodable files, specifically gzipped tar archives in this case.

/describe, /review break completely while /improve still works but will log warnings(likely not a problem)

Running 0.22-gitlab_webhook

Cannot decode file kubernetes/base/applications/geo/prod/charts/app-0.0.1.tgz or kubernetes/base/applications/geo/prod/charts/app-0.0.1.tgz in merge request 24149

Failed to generate prediction with gpt-4: Traceback (most recent call last):
  File "/app/pr_agent/algo/pr_processing.py", line 272, in retry_with_fallback_models
    return await f(model)
  File "/app/pr_agent/tools/pr_description.py", line 167, in _prepare_prediction
    self.patches_diff = get_pr_diff(self.git_provider, self.token_handler, model)
  File "/app/pr_agent/algo/pr_processing.py", line 78, in get_pr_diff
    patches_extended, total_tokens, patches_extended_tokens = pr_generate_extended_diff(
  File "/app/pr_agent/algo/pr_processing.py", line 148, in pr_generate_extended_diff
    extended_patch = extend_patch(original_file_content_str, patch, num_lines=patch_extra_lines)
  File "/app/pr_agent/algo/git_patch_processing.py", line 26, in extend_patch
    original_file_str = original_file_str.decode('utf-8')
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x8b in position 1: invalid start byte
@mrT23
Copy link
Collaborator

mrT23 commented May 22, 2024

Thanks @BadLiveware

we will look into that

@mrT23
Copy link
Collaborator

mrT23 commented May 22, 2024

this should solved the issue:
#918

try again against the latest docker

codiumai/pr-agent:gitlab_webhook

@mrT23 mrT23 added the Bug fix label May 22, 2024
@BadLiveware
Copy link
Author

It does work on codiumai/pr-agent:gitlab_webhook

@mrT23
Copy link
Collaborator

mrT23 commented May 23, 2024

great

@mrT23 mrT23 added the solved label May 23, 2024
@mrT23 mrT23 closed this as completed May 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants