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

Problem with Restyler Job #4056510 #228

Closed
Damian-Nordic opened this issue Feb 5, 2024 · 1 comment
Closed

Problem with Restyler Job #4056510 #228

Damian-Nordic opened this issue Feb 5, 2024 · 1 comment

Comments

@Damian-Nordic
Copy link

Hi there-

I'm having a problem with a Restyled Job

What I expected to happen:
The job to succeed like for other PRs in this repo.

What happened instead:

debug    fatal: bad object b8c5761f4599867de69022705b8d16ac765cd2ae
error    Exception:
git "diff" "--name-only" "b8c5761f4599867de69022705b8d16ac765cd2ae" (exit 128): failed error={description:"internal error",exitCode:99,severity:"critical",tag:"unknown"}

Configuration (if applicable):
N/A (it works or used to work on other changes)

@pbrisbin
Copy link
Member

pbrisbin commented Feb 5, 2024

Hi there- thanks for the report.

This is an issue that can sometimes occur with force-pushes. Git(Hub) is an eventually-consistent system, so when there is a force-push, we may clone faster than Git(Hub) has made the new commit available on the /pull/:number ref. The clone still succeeds (it just gets a previous state), but then we call the git diff --name-only <pr head sha> to see if we've made any restylings, with the <pr head sha> that we got from the GitHub API, which is more up to date than what we cloned, it says the commit does not exist (bad object).

There are a number of reasons that Restyled is impacted by this and other operations on the PR are not -- maybe they're silently happy to operate with a stale state (that seems bad), maybe they don't rely on the /pull/:number ref, or maybe operations within the GitHub ecosystem see git updates faster than the rest of us. Or, maybe they've implemented some kind of retry or other special handling.

I'm unlikely to work on fixing this right now, but would be happy to accept any patches for it. In the meantime I will write up a note in the wiki.

@pbrisbin pbrisbin closed this as completed Feb 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants