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

build: replace kit with task #11928

Draft
wants to merge 8 commits into
base: main
Choose a base branch
from

Commits on Oct 2, 2023

  1. build: replace kit with task

    - Task is a very popular, well-maintained, Go-based task runner with a nearly identical spec to `kit`, as can be seen in the diff
      - basically can do virtually all of the same things and a good number of other things, with lots of docs and active maintenances
    
    - intentionally made this commit have as few changes as possible to reduce the diff and make it look very familiar
      - used one-line arrays instead of multi-line to be similar to `kit`'s `make`-like task dep list
      - used singular `cmd` syntax instead of the usual plural `cmds` syntax
    
    Signed-off-by: Anton Gilgur <[email protected]>
    agilgur5 committed Oct 2, 2023
    Configuration menu
    Copy the full SHA
    75ebacc View commit details
    Browse the repository at this point in the history
  2. build: rename tasks.yaml -> Taskfile.yml

    - required name change
      - convention to use capital for the first letter: https://taskfile.dev/styleguide/#use-taskfileyml-and-not-taskfileyml
    
    Signed-off-by: Anton Gilgur <[email protected]>
    agilgur5 committed Oct 2, 2023
    Configuration menu
    Copy the full SHA
    1e9d3c5 View commit details
    Browse the repository at this point in the history
  3. chore: follow Taskfile styleguide

    - new lines between tasks: https://taskfile.dev/styleguide/#add-spaces-between-tasks
    - consistent ordering of keywords: https://taskfile.dev/styleguide/#use-the-correct-order-of-keywords
      - strangely it doesn't mention keywords _within_ tasks, but I did `cmd` -> `dir` -> `deps` -> `sources` -> `env` consistently
        - similar to how I ordered the GH Actions keywords too
    
    Signed-off-by: Anton Gilgur <[email protected]>
    agilgur5 committed Oct 2, 2023
    Configuration menu
    Copy the full SHA
    7937cbb View commit details
    Browse the repository at this point in the history

Commits on Oct 3, 2023

  1. build: replace all installation and usage of kit with task

    - following the installation guide: https://taskfile.dev/installation/
      - use `npm` for the `Makefile` install as it's compatible on different OSes and matches some of our existing tools (like `mdspell`, `markdownlint`, etc)
        - NOTE: this does still need adding to the Nix dir
    
    - replace `kit` in `Makefile`, `pre-build.sh`, and `ci-build.yaml` with `task`
    
    Signed-off-by: Anton Gilgur <[email protected]>
    agilgur5 committed Oct 3, 2023
    Configuration menu
    Copy the full SHA
    3040183 View commit details
    Browse the repository at this point in the history
  2. add task checksums to gitignore

    Signed-off-by: Anton Gilgur <[email protected]>
    agilgur5 committed Oct 3, 2023
    Configuration menu
    Copy the full SHA
    6aaf99e View commit details
    Browse the repository at this point in the history
  3. add back ./hack/port-forward.sh to ci-build.yaml

    - it was removed when `goreman` was replaced by `kit` in 05e1318
      - add it back since `task` does not do port-forwarding
    
    - should hopefully fix all the CI issues in E2E tests
    
    Signed-off-by: Anton Gilgur <[email protected]>
    agilgur5 committed Oct 3, 2023
    Configuration menu
    Copy the full SHA
    bf07cea View commit details
    Browse the repository at this point in the history
  4. properly background continuous tasks

    - i.e. `controller`, `server`, and `ui`, which all just run forever
      - previously `task` was waiting for these to complete as `deps`, but that would never happen because they run forever
    
    Signed-off-by: Anton Gilgur <[email protected]>
    agilgur5 committed Oct 3, 2023
    Configuration menu
    Copy the full SHA
    26d51fe View commit details
    Browse the repository at this point in the history
  5. optimize ui-deps task to not rerun unnecessarily

    - it was running all the time before in `kit` and now `task`, but it should only run when there are dep changes
    
    Signed-off-by: Anton Gilgur <[email protected]>
    agilgur5 committed Oct 3, 2023
    Configuration menu
    Copy the full SHA
    8a1c81f View commit details
    Browse the repository at this point in the history