Validate output of `make generate` in a presubmit to make sure it is run
- Dominant language
- Go
- Stars
- 2.1k
- Forks
- 328
- Avg merge
- 1d 4h
- Merged PRs (30d)
- 9
Description
Add a presubmit to validate output of `make generate` when creating the generated code in the `api` package. Right now, we just have a suggestion to remind the user to do this manually, but adding a presubmit ensures that code won't get merged unless this target is run.
https://github.com/aws/eks-anywhere/blob/f454a4acff5c1daf7246bd2ac379c5d2c6cfa4a9/pkg/api/v1alpha1/tinkerbelldatacenterconfig_types.go#L11
https://github.com/aws/eks-anywhere/blob/f5a58040f7a35f56806c8840f71cc788d8292d52/Makefile#L363-L364
Contributor guide
Research direction
Start with the linked Makefile lines 363-364 and the generated file pkg/api/v1alpha1/tinkerbelldatacenterconfig_types.go to understand the existing make generate target and reminder. Then find the repository's presubmit configuration and make it validate that generated output is up to date; done means presubmit fails when generation is skipped and passes after make generate.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- build-system, ci-cd
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100