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

Check that vendoring patch is correct #1474

Open
dagood opened this issue Jan 9, 2025 · 0 comments
Open

Check that vendoring patch is correct #1474

dagood opened this issue Jan 9, 2025 · 0 comments

Comments

@dagood
Copy link
Member

dagood commented Jan 9, 2025

It's easy for a mistake in the vendoring patch to slip through. There are a few types of test we could add:

  • Make sure the patch only modifies files under src/vendor/.
  • Make sure the patch matches the result of a freshly performed go mod vendor exactly. (Not just the repo state, the patch itself--no extraneous adds.)

A tricky part of an approach that actually applies patches is identifying the commit in the repo associated with the vendoring patch. Matching against the commit title could work, but might be fragile. Something more stable could be to use a patch number 50 command to get a fixed number, then CI uses that number to selectively apply pre-vendor patch files and also the vendor patch individually.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant