Thank you for your interest in contributing to our project. Whether it's a bug report, new feature, correction, or additional documentation, we greatly value feedback and contributions from our community.
Please read through this document before submitting any issues or pull requests to ensure we have all the necessary information to effectively respond to your bug report or contribution.
We welcome you to use the GitHub issue tracker to report bugs or suggest features.
When filing an issue, please check existing open, or recently closed, issues to make sure somebody else hasn't already reported the issue. Please try to include as much information as you can. Details like these are incredibly useful:
- A reproducible test case or series of steps
- The version of our code being used
- Any modifications you've made relevant to the bug
- Anything unusual about your environment or deployment
Contributions via pull requests are much appreciated. Before sending us a pull request, please ensure that:
- You are working against the latest source on the main branch.
- You check existing open, and recently merged, pull requests to make sure someone else hasn't addressed the problem already.
- You open an issue to discuss any significant work, we would hate for your time to be wasted.
To send us a pull request, please:
- Fork the repository.
- Modify the source; please focus on the specific change you are contributing. If you also reformat all the code, it will be hard for us to focus on your change.
- Ensure local tests pass.
- Commit to your fork using clear commit messages and ensure any Rust source files have been formatted with the rustfmt tool
- Send us a pull request, answering any default questions in the pull request interface.
- Pay attention to any automated CI failures reported in the pull request, and stay involved in the conversation.
GitHub provides additional document on forking a repository and creating a pull request.
Looking at the existing issues is a great way to find something to contribute on. As our projects, by default, use the default GitHub issue labels (enhancement/bug/duplicate/help wanted/invalid/question/wontfix), looking at any 'help wanted' issues is a great place to start.
Within-workspace crate dependencies are managed centrally in the root Cargo.toml under [workspace.dependencies], with both a path and a version:
# root Cargo.toml
[workspace.dependencies]
dial9-trace-format = { version = "0.3.2", path = "dial9-trace-format" }Crates then reference these with workspace = true:
# dial9-tokio-telemetry/Cargo.toml
[dependencies]
dial9-trace-format = { workspace = true, features = ["serde"] }The version in the workspace dependency is required for publishing. release-plz updates these versions automatically during releases.
Dev-dependencies on workspace crates should not include a version to avoid chicken-and-egg problems when publishing (since release-plz might update the version to the one you are currently publishing):
[dev-dependencies]
dial9-tokio-telemetry = { path = ".", features = ["analysis"] }
dial9-utils = { path = "../dial9-utils", features = ["tracing-layer"] }Some tests will only run with the shuttle cfg enabled. There is a script to run these: scripts/test-shuttle.sh.
For other tests, cargo nextest run will run all of the normal tests.
node must be on PATH. Some Rust integration tests drive the JavaScript trace
tooling as a subprocess (dial9-tokio-telemetry/tests/js_parser.rs and the
skill-unpack tests in dial9-viewer/tests/server_test.rs), and they fail rather
than skip when node is missing: skipping would let them pass while the
behaviour they cover is broken.
Releases are human-initiated, not automatic. There are two kinds of release:
- Mainline releases cut from
main— the normal path for shipping new work. - Maintenance releases cut from a long-lived
release-*branch (e.g.release-0.3.x) — for backporting fixes to an older release series without pulling in everything that has since landed onmain.
Both use the same two-part shape (a release PR that bumps versions + updates the changelog, then a manual publish), and both publish to crates.io via trusted publishing, so no tokens need to be managed. The differences are called out below.
- Release PR (automatic): On every push to
main, therelease-pr.ymlworkflow runsrelease-plz release-pr, which creates/updates a PR with version bumps and changelog entries based on conventional commits. This PR accumulates over time — you can merge many feature PRs before releasing. - Review the changelog and version bumps. To force a bump (e.g. a major), edit
the
Cargo.tomlversions in the release PR before merging. - Trigger CI: The release PR is created by
GITHUB_TOKEN, so GitHub won't automatically run CI on it. Before merging, close and reopen the PR to trigger CI, and wait for theCI Passcheck to go green. - Merge the release PR.
- Publish: Go to Actions → "Publish release" → Run workflow, set
release_branchtomain, and run. Adial9-maintainersmember then approves the deployment in thereleaseenvironment before publishing proceeds.
Use this when you need to ship a fix on an older series (e.g. patch 0.3.x
while main is on 0.4.x). The mechanics are the same, with a few
branch-specific wrinkles.
-
Create the branch (once per series), if it doesn't exist. Branch off the latest tag of that series and push it, e.g.:
git branch release-0.3.x dial9-tokio-telemetry-v0.3.13 git push origin release-0.3.x
release-*branches are protected the same asmain(PR review +CI Passrequired, no direct pushes), and creating one is restricted to repo admins by a branch-protection ruleset, so no disabling of protection is needed — an admin just pushes the new branch. -
Backport your fix via a PR into the release branch. Cherry-pick or re-implement the change with
release-0.3.xas the PR base (notmain). Keep changes API-compatible for the series where possible;cargo-semver-checksin CI compares against the PR's base branch, so it will flag breaking changes for that series specifically. -
Generate the release PR. The
release-pr.ymlautomation only runs onmain, so for a release branch you run release-plz yourself from a checkout of the branch:git checkout release-0.3.x && git pull GIT_TOKEN="$(gh auth token)" release-plz release-pr --git-token "$(gh auth token)"
This opens a version-bump/changelog PR against
release-0.3.x. Review and merge it as usual (close/reopen to trigger CI, wait forCI Pass). -
Publish: Actions → "Publish release" → Run workflow, set
release_branchto the release branch (e.g.release-0.3.x), and run. As withmain, adial9-maintainersmember approves thereleaseenvironment deployment.
Why
release_branchis an input.workflow_dispatchruns the copy of a workflow that lives on the dispatched ref, which would otherwise mean everyrelease-*branch carried (and drifted) its own copy ofrelease.yml. The publish workflow instead always runs frommain's copy and takes the target branch as a required input, so the release logic has a single source of truth. Avalidate-branchstep rejects any input that isn'tmainorrelease-*.
Note on
pr_branch_prefix. release-plz opens its release PR from an ephemeral branch.mainuses therelease-plz/prefix and each maintenance branch uses its own (e.g.release-plz-0.3/), configured viapr_branch_prefixinrelease-plz.toml. Two things depend on this: the prefix must not collide with therelease-*protection glob (the trailing slash keeps it exempt), and it must differ per series — release-plz closes any open PR sharing its configured prefix, so a shared prefix would let amainrelease run close a release branch's PR (and vice versa).
cargo-semver-checks runs on every PR as an advisory check. It won't block merge, but if it reports breaking changes, ensure the release PR reflects a major version bump before publishing.
You can freely merge breaking changes to main. The release PR will accumulate them. Before publishing, verify that release-plz has bumped the major version (it runs semver_check = true and should do this automatically). If it hasn't, manually adjust the version in the release PR.
trusted publishing is unable to publish new crates. If you want to add a new crate to the dial9 family, you should:
-
create a branch that contains the crate you are publishing (it should be in the root
Cargo.toml'sworkspace.members, and in a publishable state). -
add the package name to the
changelog_includelist in the[[package]] name = "dial9"entry inrelease-plz.toml. -
run
cargo publish -p <package> --dry-run -
get a temporary crates.io token just for the publishing
-
run
cargo loginwith that token -
run
cargo publish -p <package> -
set up trusted publishing via the crates.io WebUI to the following state:
Publisher: Github Repository: dial9-rs/dial9 Workflow: release.yml Environment: release -
revoke the temporary crates.io token
Further publishing should happen via release-plz, without needing to manually work with tokens.
See the LICENSE file for our project's licensing.