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 corrupted patch #1

Open
jgrisham opened this issue Nov 29, 2021 · 3 comments
Open

Fix corrupted patch #1

jgrisham opened this issue Nov 29, 2021 · 3 comments

Comments

@jgrisham
Copy link
Owner

jgrisham commented Nov 29, 2021

Chain of events:

  1. Inadvertently closed upstream PR when renaming linked ‘patch-1’
  2. Clicked “restore branch” in PR
  3. Reopened PR

Results:

There are now two branches in my fork, including the one linked to the PR, which…

A. cannot be downloaded using git (command-line or official app)
B. GitHub.com reports an ‘Error 500’ page when attempting to view either patch in my fork.

  1. patch-1 <— broken with HTTP Error 500 page <— [x] (fixed)
  2. patch_nov2021-err500-stillbroke <— broken with HTTP Error 500 page <— [x] (fixed)

Current most recent revision: https://github.com/jgrisham/pi-hole/blob/c93cf2781df7fa21059a0c4bb5d9bbf11647c7fb/manpages/pihole-FTL.conf.5

@jgrisham
Copy link
Owner Author

jgrisham commented Nov 29, 2021

Original (renamed) patch:

A. Name: patch_nov2021-err500-stillbroke
B. URL: https://github.com/jgrisham/pi-hole/tree/patch_nov2021-err500-stillbroke
C. Commit hash (”HEAD”): c93cf27
D. Parent commit hash: 2 parents 52020c3 + b5e0f14
E. Tree hash: b108e9080aece8611205b61f954034c3fe4ba5a0


Restored patch:

A. Name: patch-1
B. URL: https://github.com/jgrisham/pi-hole/patch-1
C. Commit hash (”HEAD”): c93cf27
D. Parent commit hash: 2 parents 52020c3 + b5e0f14
E. Tree hash: b108e9080aece8611205b61f954034c3fe4ba5a0


Commits:

(API commit listing for entire repository)

Details…

A. jgrisham committed on Mar 14: 1 parent cbfb58f commit 131b365

  1. Commit message:
    a. Commit API URL: https://api.github.com/repos/jgrisham/pi-hole/commits/131b365cc45207237e8377ae28e2826b58abf850
  2. BLOB: 7d4f1426346f951befd7d6cc94f40a86c54e27fc
    a. File URL: https://github.com/jgrisham/pi-hole/blob/131b365cc45207237e8377ae28e2826b58abf850/manpages/pihole-FTL.conf.5
  3. Tree: ae86527b32778cf7ea292a9050c48c8ac5775c81
    a. Tree URL: https://github.com/jgrisham/pi-hole/tree/131b365cc45207237e8377ae28e2826b58abf850
    b. Tree URL: https://github.com/jgrisham/pi-hole/tree/ae86527b32778cf7ea292a9050c48c8ac5775c81
    c. Tree API URL: https://api.github.com/repos/jgrisham/pi-hole/git/trees/ae86527b32778cf7ea292a9050c48c8ac5775c81

B. PromoFaux committed on Sep 29: 2 parents 2673c2c + 841222f commit dad6247
C. PromoFaux committed on Oct 23: 2 parents dad6247 + 8713135 commit b5e0f14

D. jgrisham committed 22 hours ago: 1 parent 131b365 commit 1ddd244

  1. Commit message:
    a. Commit API URL: https://api.github.com/repos/jgrisham/pi-hole/commits/1ddd24480e13eb046b3b54a0a0f8081c46d363a7
  2. BLOB: ba79c67fb97b7f3a127cab883cd9372a754bcb8b
    a. File URL: https://github.com/jgrisham/pi-hole/blob/1ddd24480e13eb046b3b54a0a0f8081c46d363a7/manpages/pihole-FTL.conf.5
  3. Tree: 1c4e040bc8a1a547c2d8264ce5f48ac3b08c87db
    a. Tree URL: https://github.com/jgrisham/pi-hole/tree/1ddd24480e13eb046b3b54a0a0f8081c46d363a7

E. jgrisham committed 21 hours ago: 1 parent 1ddd244 commit 52020c3

  1. Commit message:
    a. Commit API URL: https://api.github.com/repos/jgrisham/pi-hole/commits/52020c393bb755daa20fdf55f278b68e00b9269e
  2. BLOB: b4bda9f255fed969e93f20dcda51782c692fb2b8
    a. File URL: https://github.com/jgrisham/pi-hole/blob/52020c393bb755daa20fdf55f278b68e00b9269e/manpages/pihole-FTL.conf.5
  3. Tree: 17a77ce60552c2b08cde8bd37297c272f415a56b
    a. Tree URL: https://github.com/jgrisham/pi-hole/tree/52020c393bb755daa20fdf55f278b68e00b9269e

F. jgrisham committed 21 hours ago: 2 parents 52020c3 + b5e0f14 commit c93cf27

  1. Commit message: Merge branch 'pi-hole:master' into patch-1
    a. Commit API URL: https://api.github.com/repos/jgrisham/pi-hole/commits/c93cf2781df7fa21059a0c4bb5d9bbf11647c7fb
  2. Tree: b108e9080aece8611205b61f954034c3fe4ba5a0 (corrupt or missing??)
    a. Tree URL: https://github.com/jgrisham/pi-hole/tree/c93cf2781df7fa21059a0c4bb5d9bbf11647c7fb

Trees:

O. cbfb58f Tree: f805a1e5645fb77a94ab22b10bf569e2b3661eb1 (API URL | recursive) (Web URL via commit hash)

  1. ./Manpages subtree: cc8efafc5c7792b06198f4e6a9488be8af85f322 (API URL | recursive)
    a. pihole-FTL.conf.5 BLOB: 42405436246e60c85ebbac66d9f9a75b27b6e171 (API URL)

A. 131b365 Tree: ae86527b32778cf7ea292a9050c48c8ac5775c81 (API URL | recursive) (Web URL via commit hash)

  1. ./Manpages subtree: 8819904fad40452b903c7206851a42d729453be6 (API URL)
    a. pihole-FTL.conf.5 BLOB: 7d4f1426346f951befd7d6cc94f40a86c54e27fc (API URL)

B. dad6247 Tree: 54df1e19fd37fb6888d7e3d31b7cb8164fce9926 (API URL | recursive) (Web URL via commit hash)

  1. ./Manpages subtree: d638503515ebd11cce6925d5f5c86fdce3c2e9dc (API URL)
    a. pihole-FTL.conf.5 BLOB: 42405436246e60c85ebbac66d9f9a75b27b6e171 (API URL)

C. b5e0f14 Tree: ff104d2503ea781db9f01653b39acfb448934921 (API URL | recursive) (Web URL via commit hash)

  1. ./Manpages subtree: d638503515ebd11cce6925d5f5c86fdce3c2e9dc (API URL)
    a. pihole-FTL.conf.5 BLOB: 42405436246e60c85ebbac66d9f9a75b27b6e171 (API URL)

D. 1ddd244 Tree: 1c4e040bc8a1a547c2d8264ce5f48ac3b08c87db (API URL | recursive) (Web URL via commit hash)

  1. ./Manpages subtree: a4cd53449d1fb4086be6c452c76c6e055af90cdc (API URL)
    a. pihole-FTL.conf.5 BLOB: ba79c67fb97b7f3a127cab883cd9372a754bcb8b (API URL)

E. 52020c3 Tree: 17a77ce60552c2b08cde8bd37297c272f415a56b (API URL | recursive) (Web URL via commit hash)

  1. ./Manpages subtree: 7d0929ce4188c20d966cdd8729fa9f9de267a7a4 (API URL)
    a. pihole-FTL.conf.5 BLOB: b4bda9f255fed969e93f20dcda51782c692fb2b8 (API URL)

F. c93cf27 Tree: b108e9080aece8611205b61f954034c3fe4ba5a0 (API URL <— seems okay? | recursive <— returns blank page!!) (Web URL via commit hash <— broken with HTTP Error 500!!)

  1. ./Manpages subtree: 25de2540b8426753e5c3dbfcc94bd708638b6f14 (API URL)
    a. pihole-FTL.conf.5 BLOB: b4bda9f255fed969e93f20dcda51782c692fb2b8 (API URL)

Files:

O. cbfb58f BLOB: 42405436246e60c85ebbac66d9f9a75b27b6e171
A. 131b365 BLOB: 7d4f1426346f951befd7d6cc94f40a86c54e27fc
B. dad6247 BLOB: 42405436246e60c85ebbac66d9f9a75b27b6e171
C. b5e0f14 BLOB: 42405436246e60c85ebbac66d9f9a75b27b6e171
D. 1ddd244 BLOB: ba79c67fb97b7f3a127cab883cd9372a754bcb8b
E. 52020c3 BLOB: b4bda9f255fed969e93f20dcda51782c692fb2b8
F. c93cf27 BLOB: b4bda9f255fed969e93f20dcda51782c692fb2b8

Refs:

(git ‘refs’ listing for entire repository)

Details for the two affected branches…
  {
    "ref": "refs/heads/patch_nov2021-err500-stillbroke",
    "node_id": "MDM6UmVmMzQ3NzIyMjY2OnJlZnMvaGVhZHMvcGF0Y2hfbm92MjAyMS1lcnI1MDAtc3RpbGxicm9rZQ==",
    "url": "https://api.github.com/repos/jgrisham/pi-hole/git/refs/heads/patch_nov2021-err500-stillbroke",
    "object": {
      "sha": "c93cf2781df7fa21059a0c4bb5d9bbf11647c7fb",
      "type": "commit",
      "url": "https://api.github.com/repos/jgrisham/pi-hole/git/commits/c93cf2781df7fa21059a0c4bb5d9bbf11647c7fb"
    }
  },
  {
    "ref": "refs/heads/patch-1",
    "node_id": "MDM6UmVmMzQ3NzIyMjY2OnJlZnMvaGVhZHMvcGF0Y2gtMQ==",
    "url": "https://api.github.com/repos/jgrisham/pi-hole/git/refs/heads/patch-1",
    "object": {
      "sha": "c93cf2781df7fa21059a0c4bb5d9bbf11647c7fb",
      "type": "commit",
      "url": "https://api.github.com/repos/jgrisham/pi-hole/git/commits/c93cf2781df7fa21059a0c4bb5d9bbf11647c7fb"
    }
  },

A. Original (renamed)

  1. refs/heads/patch_nov2021-err500-stillbroke (API URL) (ref)
    a. Commit: c93cf27 (API URL)
    b. Node ID: MDM6UmVmMzQ3NzIyMjY2OnJlZnMvaGVhZHMvcGF0Y2hfbm92MjAyMS1lcnI1MDAtc3RpbGxicm9rZQ==
    c. Node ID (common portion): MDM6UmVmMzQ3NzIyMjY2OnJlZnMvaGVhZHMvcGF0Y2
    d. Node ID (unique portion): hfbm92MjAyMS1lcnI1MDAtc3RpbGxicm9rZQ==
    e. Node ID (decoded from Base64): 03:Ref347722266:refs/heads/patch_nov2021-err500-stillbroke

B. Restored

  1. refs/heads/patch-1 (API URL)
    a. Commit: c93cf27 (API URL)
    b. Node ID: MDM6UmVmMzQ3NzIyMjY2OnJlZnMvaGVhZHMvcGF0Y2gtMQ==
    c. Node ID (common portion): MDM6UmVmMzQ3NzIyMjY2OnJlZnMvaGVhZHMvcGF0Y2
    d. Node ID (unique portion): gtMQ==
    e. Node ID (decoded from Base64): 03:Ref347722266:refs/heads/patch-1

@jgrisham
Copy link
Owner Author

jgrisham commented Nov 29, 2021

Questions:

  1. It seems the PR refers to the branch by name and not by commit hash. Is this correct?
    a. The GitHub API also appears to use a NodeID for Commits and Files/BLOBs, but not for trees… could this be contributing to the problem?
  2. If the answer to 1 is yes, will the PR work properly once the 500 error is resolved?
  3. Can I just create a new branch (manually, with tree, commit, and file hashes?) and keep the existing PR?

References:

  1. https://docs.github.com/en/rest/guides/getting-started-with-the-git-database-api
  • Update the reference of your branch to point to the new commit SHA

@jgrisham
Copy link
Owner Author

jgrisham commented Nov 29, 2021

Mitigation:

  • Try reverting / deleting commit c93cf27?
    (that would remove commits B, C, and F from the list above)
  • Opened a GitHub support ticket, since I’m tired and don’t want this info to die with me.
Support ticket details

Description

Two branches in a my fork of a public project point to the same commit, and with either branch:

  1. I cannot download or operate on those specific branches using the official GitHub app for Windows or via git on Linux
  2. attempting to view the branch pages or the tree page (via the commit page) on GitHub.com results in an HTTP Error 500 page.
  3. attempting to view the tree using an API link does work

More information (including my notes thus far) can be seen at:

Tl;dr: this is not an emergency for me, but it may cause data loss or reposition corruption for other folks, so I wanted to make sure someone was aware that the problem exists.


Reproduction Steps

I haven’t yet tried to reproduce - I am still attempting to recover from the initial occurrence (a bit less than 24 hours ago)

All actions leading up to this occurred on Github.com; my fork of this repository was never used as a local copy using the GitHub desktop or mobile app or command-line git tools.

The steps leading up to this, as best as I recall:

  1. I updated a branch (rebased with no merge conflicts, I think?), using the GitHub.com website
    a. That branch was linked to an existing and open PR from last spring
  2. I then renamed the branch to have a more descriptive name than “patch-1” (forgetting that would result in the PR auto-closing)
  3. In the PR, I saw that my branch “patch-1” was deleted and the PR had been auto-closed
  4. I clicked the “Restore branch” button on the PR, and then clicked “Re-open branch”
    On the surface the PR appears fine, but
    a. the branch cannot be checked out by (at least some of) the project’s GitHub Actions CI tools
    b. HTTP ‘Error 500’ pages appear on certain related pages (as well as the other symptoms noted in the previous section)

Please see details at: #1


Fault Type

  • Intermittent - Occurring irregularly

Blocking?

  • Blocking

Last working date

  • 28 November

Logs

I don’t have any handy at this time. If I am able to collect them, I will add them to the issues page linked above.

  • Update: 30 Nov 2021 at 0122 UTC - Thanks, GitHub! Not sure how, but you seem to have fixed the broken links noted above, and in less than an hour (after I wasted 12+ hours being stubborn)! (If I ever figure out how you did it, I will try to remember to post here so others may benefit)

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

1 participant