Skip to content

Conversation

@squadgazzz
Copy link
Contributor

Description

This is a follow-up to #3950, where the deploy CI job now supports builds with tokio-console enabled. Also, improves the CI UI, which now includes a list of options and an additional field with custom features, which should be helpful for future development.

Copilot AI review requested due to automatic review settings December 9, 2025 16:31
@squadgazzz squadgazzz requested a review from a team as a code owner December 9, 2025 16:31
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds support for the tokio-console feature in the Deploy CI job, following up on #3950. It improves the CI workflow UI by introducing a predefined feature dropdown and a custom features input field for better flexibility in future development.

Key changes:

  • Updated GitHub workflow to support predefined feature selection (None, mimalloc-allocator, tokio-console) with an additional custom features field
  • Added RUSTFLAGS build argument to Dockerfile with proper tokio_unstable flag handling for tokio-console
  • Added tokio-console feature definitions to multiple crate Cargo.toml files (alerter, autopilot, driver, orderbook, refunder, solvers)
  • Updated playground/Dockerfile to use the simplified tokio-console feature flag instead of observe/tokio-console

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
.github/workflows/deploy.yaml Enhanced workflow inputs with predefined feature dropdown and custom features field; added logic to prepare build features and set RUSTFLAGS for tokio-console
Dockerfile Added RUSTFLAGS build argument and passed it to cargo build command
playground/Dockerfile Changed feature flag from observe/tokio-console to tokio-console for all package builds
crates/alerter/Cargo.toml Added tokio-console feature that enables observe/tokio-console
crates/autopilot/Cargo.toml Added tokio-console feature that enables observe/tokio-console
crates/driver/Cargo.toml Added tokio-console feature that enables observe/tokio-console
crates/orderbook/Cargo.toml Added tokio-console feature that enables observe/tokio-console
crates/refunder/Cargo.toml Added tokio-console feature that enables observe/tokio-console
crates/solvers/Cargo.toml Added tokio-console feature that enables observe/tokio-console

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

COPY ./crates/observe/ ./crates/observe
COPY ./crates/order-validation/ ./crates/order-validation
RUN CARGO_PROFILE_RELEASE_DEBUG=1 cargo build --release --features observe/tokio-console --package shared
RUN CARGO_PROFILE_RELEASE_DEBUG=1 cargo build --release --features tokio-console --package shared
Copy link

Copilot AI Dec 9, 2025

Choose a reason for hiding this comment

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

The shared crate does not have a tokio-console feature defined in its Cargo.toml. Building with --features tokio-console --package shared will fail because this feature doesn't exist for the shared package.

You need to add the following to crates/shared/Cargo.toml:

[features]
# ... existing features ...
tokio-console = ["observe/tokio-console"]

Copilot uses AI. Check for mistakes.
Copy link
Contributor

@jmg-duarte jmg-duarte left a comment

Choose a reason for hiding this comment

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

LGTM but I'm worried about the custom field

Copy link
Contributor

@MartinquaXD MartinquaXD left a comment

Choose a reason for hiding this comment

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

Looks reasonable to me. I'd just like to see if new code in the action can be reduced a bit. Fine to merge if my understanding is not correct and this is indeed not possible (i.e. would lead to undesired outcomes).

if [ -n "${{ github.event.inputs.custom_features }}" ]; then
if [ -n "$FEATURES" ]; then
FEATURES="$FEATURES ${{ github.event.inputs.custom_features }}"
Copy link
Contributor

Choose a reason for hiding this comment

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

This is also the right thing to do if FEATURES is empty, no? I believe we don't need the inner if and just do that unconditionally.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I didn't get your comment. It appends custom features to the features if they are not empty.

Copy link
Contributor

Choose a reason for hiding this comment

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

I mean if FEATURES is empty the line FEATURES="$FEATURES ${{ github.event.inputs.custom_features }}" would also do the desired thing (of making FEATURES equal to github.event.inputs.custom_features). So from my understanding this should be sufficient:

          if [ -n "${{ github.event.inputs.custom_features }}" ]; then
              FEATURES="$FEATURES ${{ github.event.inputs.custom_features }}"
          fi

Actually applying the same logic just doing this (without any ifs) should also be fine:

              FEATURES="$FEATURES ${{ github.event.inputs.custom_features }}"

If FEATURES is empty we prepend an empty string => no harm done. If github.event.inputs.custom_features is empty we append and empty string => no harm done.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Your suggestion can end up with features being just a space, then "--features " will be passed to the Dockerfile.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Claude suggested a shorter version. Updated the code b3387e6 (#3958)

@squadgazzz squadgazzz added this pull request to the merge queue Dec 11, 2025
Merged via the queue into main with commit 77301c2 Dec 11, 2025
18 checks passed
@squadgazzz squadgazzz deleted the tokio-console-feature-ci branch December 11, 2025 10:43
@github-actions github-actions bot locked and limited conversation to collaborators Dec 11, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants