fix(gen): document the customer flavour in --help and expand the flavours docs - #2107
Open
TheoBrigitte wants to merge 1 commit into
Open
fix(gen): document the customer flavour in --help and expand the flavours docs#2107TheoBrigitte wants to merge 1 commit into
TheoBrigitte wants to merge 1 commit into
Conversation
The flavour reference only named the repository types. A user picking a flavour could not tell which files it would produce, nor that --flavour and --language are two independent axes that must be chosen together. Each flavour now lists its generated files per gen command, alongside a selection table, the flavour/language interaction (including the cli requires go rule), and the flags that look like flavours but are not.
TheoBrigitte
force-pushed
the
fix-flavour-help-list
branch
from
July 31, 2026 12:31
fee5688 to
f0b41b2
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
devctl gen makefile --helpanddevctl gen workflows --helpprint the supported--flavourvalues twice, from two different sources that had drifted apart:gen.AllFlavours(), so always complete (7 values).cmd/gen/{makefile,workflows}/command.go, listing only 6.When
FlavourCustomerwas added topkg/gen/flavour.go, the flag line picked it up automatically and the prose lists did not. The result:customeris a perfectly valid flavour that does something real (it adds the Add issue to general customer board workflow,cmd/gen/workflows/runner.go:109), but reading the command description you'd conclude it isn't supported. Nothing tied the prose to the constants and no test compared them, so the drift was invisible.Before:
Change
pkg/gen/flavour.go: addflavourDescriptions(one entry per flavour) andFlavourDescriptionList(), which renders the bullet list fromAllFlavours().cmd/gen/{makefile,workflows}/command.go: drop the hand-typed lists; buildlongDescriptionfromgen.FlavourDescriptionList()(const→var, since it's now computed).pkg/gen/flavour_test.go: fail if anyAllFlavours()entry lacks a description, if a described flavour isn't valid, or if a flavour is missing from the rendered list.Both lists now come from one source and render in the same order, so adding a flavour can't silently leave the help behind.
The
customerwording is derived from what the flavour actually does — happy to reword.Follow-up:
docs/flavours.mdFixing the help text surfaced the same gap one level up.
docs/flavours.mdnamed each repository type but never said what picking it does, and never mentioned that--flavourand--languageare two axes you choose together. A one-line "an app, by the definition of the app platform" doesn't help someone decide betweenappandapp,cluster-app.The doc now carries, for each flavour, the files it actually generates per
gencommand:appMakefile.gen.app.mk,zz_generated.check_values_schema.yaml, the CircleCIbuild-chart/push-to-app-catalogjobscluster-appMakefile.gen.cluster_app.mk,zz_generated.documentation_validation.yaml,zz_generated.json_schema_validation.yaml,zz_generated.diff_helm_render_templates.yamlclipackage-*targets inMakefile.gen.go.mk,.github/zz_generated.windows-code-signing.sh, the six-archgo-build+upload-release-assetsjobsk8sapiMakefile.gen.k8sapi.mk,hack/boilerplate.go.txtfleetzz_generated.cluster_app_values_validation_schema.yamlcustomerzz_generated.add_customer_board_automation.yamlgenericPlus a "which flavour do I need" table, a
--languagesection (go,node,python,generic,kyverno-policyand what each emits), theclirequiresgorule, and a table of common pairings (-f app,k8sapi -l gofor an operator,-f app,cluster-appfor a cluster app, …).It also records three things that are easy to get wrong:
gen makefileandgen circlecivalidate--languageagainst the enum.gen workflows,gen llmandgen precommittake a plain string, so-l golangsilently drops the language-specific output rather than erroring.gen renovate --languageis a different list — Renovate ecosystems (go,docker), not this enum.gen precommit --flavors(US spelling,bash/md/helmchart) is an unrelated flag that selects extra checkers.Every path and constraint in the doc was read out of the generators rather than inferred.
One thing found while writing it, not changed here:
create_release.go:28passesIsFlavourCLIinto the template, butcreate_release.yaml.templatenever reads it. Dead template data — thecliflavour has no effect on the release workflow. The doc reflects the real behaviour; happy to drop the unused param in a separate PR.🤖 Generated with Claude Code