aws / aws/eks-anywhere

Validate output of `make generate` in a presubmit to make sure it is run

Open
#2,734 0 comments 0 reactions 0 assignees View on GitHub
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

Open the contributing 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.