Skip to content

Add pre-commit hooks to improve developer experience #44039

@joestringer

Description

@joestringer

We have a bunch of automation in the tree to ensure that the committed files can be directly used in documentation, Helm charts, and so on. This is useful, but in order to ensure they're up to date, we force developers to run extra commands when preparing their changes. For instance:

  • Update Helm charts
  • Update documentation command reference
  • Update spelling list

@mliner suggests in this PR discussion to add pre-commit hooks to catch some of these things.

Perhaps for some of these we could look at common filepath changes that cause the updates to be required, then auto-trigger some of these commands on commit.

Note it would be important to minimize disruption to developers with this; it's not enough to run all these commands every time someone commits something. We commit or amend very frequently as part of regular Cilium development practices, so we should minimize the delay introduced by running any such commands. Particularly for the command reference, this involves compiling each command in the tree so maybe that can be excluded.

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/cfpCilium Feature ProposalstaleThe stale bot thinks this issue is old. Add "pinned" label to prevent this from becoming stale.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions