| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
|
Thanks @LuisUrrutia for tackling this ❤️! |
Sorry, something went wrong.
There was a problem hiding this comment.
This looks great @LuisUrrutia.
I wouldn't have ever thought that this would ever occur!
Quick question though, Did you give this a test? 🤔
Cc @smorrisods
Sorry, something went wrong.
I also didn’t expect to run into an issue like this. It’s hard to know how to reliably reproduce an issue like this. However, even without being able to reproduce it, the tool runs normally in a "standard" repository. I also noticed that @smorrisods had this issue here: but then, in the following release (after including the patch using a 12 chars SHA) it appears to have been resolved: Also, I think GraphQL specification does not impose a specific character limit on aliases, so we could also use the full hash. |
Sorry, something went wrong.
Our repository has two cases of SHA collisions at 6 char prefixes. The first collision happened after a few years, the send one happened during a heavy commit phase recently within a few weeks of each other. I was shocked myself because the SHA space is so big it seems highly unlikely to happen within the same release period, but our repo is an example.
Upon increasing the prefix character length to 12 (and I would have gone longer but I wasn't sure if there was an overall GraphQL rate limit that inspired the original truncation) everything worked as expected in our release, as @LuisUrrutia has surfaced here.
When I looked into the original change the 6 character prefix limit showed up out of nowhere as part of a refactoring from using the REST API to use the GraphQL API. I'm not sure why they didn't choose to go with the full SHA. |
Sorry, something went wrong.
Sorry, something went wrong.
|
🎉 This PR is included in version 12.0.3 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Sorry, something went wrong.
The GraphQL alias collision fix (slice(0, 6) → slice(0, 12)) that our patch applied to lib/success.js was upstreamed in @semantic-release/github v12.0.3 via semantic-release/github#1134 (commit ea6386d). Since Renovate has bumped us to v12.0.8, the patch is no longer needed. Ref: semantic-release/github#1134 Ref: semantic-release/github@ea6386d
The GraphQL alias collision fix (`slice(0, 6)` → `slice(0, 12)`) that our patch applied to `lib/success.js` was upstreamed in `@semantic-release/github` v12.0.3 via semantic-release/github#1134 (commit `ea6386d`). Since Renovate has bumped us to v12.0.8, the patch is no longer needed. Ref: semantic-release/github#1134 Ref: semantic-release/github@ea6386d
| Back | FazBrowse Home | New Git URL |
Summary
Fixes #1116
Problem
The buildAssociatedPRsQuery function creates GraphQL aliases using only the first 6 characters of commit SHAs:
When two commits share the same 6-character prefix (e.g., 429fa60a84f7b59f... and 429fa667b462b60b...), both resolve to alias commit429fa6, causing GraphQL to reject the query:
Error: Field 'commit429fa6' has an argument conflict: {oid:"429fa60a84f7b59f9e4a20bfbea6b0fa977a1e1e"} or {oid:"429fa667b462b60b31769e5268cfbc6835793c14"}Collision probability increases significantly as repositories grow.
Solution
Extend the SHA prefix from 6 to 12 characters:
We chose 12 characters because:
Credits to @smorrisods