Skip to content

begin cargo make docs#395

Draft
ala-mode wants to merge 4 commits intodevfrom
cargo_make_documentation
Draft

begin cargo make docs#395
ala-mode wants to merge 4 commits intodevfrom
cargo_make_documentation

Conversation

@ala-mode
Copy link
Contributor

WIP, cargo-make documentation

@ala-mode ala-mode requested review from AloeareV, nachog00 and zancas June 24, 2025 02:34

You can run `cargo make help` for a list of commands available.

`cargo make compute-image tag`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo: missing "-" between "image" and "tag". Not a big deal, but if people copy and run int, it wont work

using `./utils/get-ci-image-tag.sh`, formats what's found in the checked-in `.env.testing-artifacts` file (based on commits of `zcahsd`, `zebrad`, and Rust version) into a docker image tag, prints them to stdout and makes the CARGO_MAKE_IMAGE_TAG environment variable.

`cargo make test`
Runs integration tests in a docker container, defined from `Dockerfile.ci`, and mounts the local Zaino directory on the host system.
Copy link
Contributor

@nachog00 nachog00 Jun 24, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wording is a bit off here (i think). I would say the volumes are mounted on the container.
Also, maybe listing all the volumes would be good? it mounts the zaino source code (the repo clone), the target directory and a .cargo that isn't the global one, but a dedicated location to avoid messing with your global cargo stuff.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would also explain the flow followed by this command to get your image:

  1. it gets the image tag described in cargo make compute-image-tag
  2. it checks if the local docker daemon has that image available
  3. if not, it tries to pull the image from Dockerhub
  4. if not available there either, it builds it (using the build-image) task
  5. after all that (or just some of that, if any step finds the image already), it runs:
cargo nextest run --profile ci

User can pass in extra arguments too, for example

cargo make test zebrad::get::address

will result in the container running

cargo nextest run --profile ci zebrad::get::address


`base-script`
sources `helpers.sh`
runs tests with appropriate image,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i would'nt say that base script runs tests. It just sources the helpers and computes the TAG

@nachog00
Copy link
Contributor

This current setup is a bit limiting since it only makes it easy to do cargo nextest run commands with the container, but we probably want to extend it so people can start the container, keep it running and pass whatever nextest command they want, and maybe even regular cargo commands too.

@zancas zancas added the Low Priority Low priority issues that are not currently on our roadmap label Jun 27, 2025
@zancas zancas requested review from nachog00 and removed request for AloeareV, nachog00 and zancas June 27, 2025 21:21
@zancas
Copy link
Member

zancas commented Jun 27, 2025

Because the makers tooling is so new, and so many changes are incoming, I have marked this low-priority.. we should circle back to documentation when we onboard someone new AND more than 4 weeks have passed.

@zancas
Copy link
Member

zancas commented Nov 13, 2025

I think this PR has likely been superceded. Is it still providing relevant documentation @ala-mode ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Low Priority Low priority issues that are not currently on our roadmap

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants