News for hackers. Stuff that matters.
Re:We Put Half a Million Files in One Git Repository, Here’s... by cnity on Thursday June 16, 2022 @04:26AM (#31763680)
One alternative that enables you to keep generated files out but still feel like there's an explicit human check in place is to add a gated confirmation step in CI to confirm that the changes to the generated spec match expectations.

Something like: "This change will result in the following new API endpoints: ... do you wish to continue?"

Re:We Put Half a Million Files in One Git Repository, Here’s... by tasn on Thursday June 16, 2022 @08:20AM (#31765176)
Hm... An interesting thought!

What does it compare against though? Need to add more state to the CI? We kinda like the interface be part of the version control and having an audit chain that's part of the code.

Re:We Put Half a Million Files in One Git Repository, Here’s... by cnity on Friday June 17, 2022 @06:27AM (#31776234)
Yeah either you'd have to maintain the generated spec as a versioned artifact hosted wherever is most convenient for you, or the CI could actually generate the before and after specs based on the PR diff. If the calculation of the spec is computationally expensive (it shouldn't be) then the latter approach could be a problem.
Re:We Put Half a Million Files in One Git Repository, Here’s... by cmcconomy on Thursday June 16, 2022 @12:27PM (#31767939)
you could put it in the pre-commit githook
Re:We Put Half a Million Files in One Git Repository, Here’s... by tasn on Sunday June 19, 2022 @04:16AM (#31797338)
That's not enforced centrally (or visible by the reviewer) so hard to trust it that everyone will remember having it.

Though even without that, I'm not sure how it'll even mechanically work.