Skip to content

Conversation

@dasJ
Copy link
Member

@dasJ dasJ commented Jan 4, 2026

We actually already ask git for the short revision, so we might as well persist it to DB and render it on the frontend. To persist it, this change includes a database migraton. For older jobsetevals, we fall back on truncating the revision on 12 characters.

This logic should allow nixpkgs to scale to an infinite number of commits without any more Hydra adjustments.

Closes #1245

@dasJ dasJ requested review from mweinelt and vcunat January 4, 2026 14:28
@dasJ dasJ force-pushed the fix/hashlengths branch from 3c7c0cd to 1de39b6 Compare January 4, 2026 14:28
@SuperSandro2000
Copy link
Member

Could short shas not become invalid over time because they are no longer "long" enough to be displayed by GitHub?

@dasJ
Copy link
Member Author

dasJ commented Jan 4, 2026

Damn.

@vcunat
Copy link
Member

vcunat commented Jan 4, 2026

Though I don't expect it would happen so commonly.

@dasJ dasJ force-pushed the fix/hashlengths branch from 1de39b6 to 61dae58 Compare January 4, 2026 17:56
@dasJ
Copy link
Member Author

dasJ commented Jan 4, 2026

Think I found a solution. We just store the hash length we have seen for each URI and select the longest one

@dasJ dasJ force-pushed the fix/hashlengths branch from 61dae58 to 2db62e8 Compare January 4, 2026 18:01
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

Successfully merging this pull request may close these issues.

Invalid truncation of git hashes

3 participants