Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,12 @@ jobs:
- name: Setup environment variables
run: |
echo "RUSTFLAGS=--remap-path-prefix=${GITHUB_WORKSPACE}=/builds/dfinity" >> $GITHUB_ENV
# Remove pre-installed stable toolchain so it doesn't pollute the
# rust-cache environment hash. macOS (and sometimes Linux) runner
# images ship with varying stable versions, making the hash
# non-deterministic and causing constant cache misses.
- name: Remove pre-installed Rust stable toolchain
run: rustup toolchain remove stable 2>/dev/null || true
# This step also handles Rust-specific caching
- name: Install Rust toolchain
uses: actions-rust-lang/setup-rust-toolchain@v1
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,12 @@ jobs:

steps:
- uses: actions/checkout@v6

# Remove pre-installed stable toolchain so it doesn't pollute the
# rust-cache environment hash. macOS (and sometimes Linux) runner
# images ship with varying stable versions, making the hash
# non-deterministic and causing constant cache misses.
- name: Remove pre-installed Rust stable toolchain
run: rustup toolchain remove stable 2>/dev/null || true
# This step also handles Rust-specific caching
- name: Install Rust toolchain
uses: actions-rust-lang/setup-rust-toolchain@v1
Expand Down
7 changes: 7 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,13 @@ jobs:
echo "TARBALL_2_FILENAME=dfx-${{ matrix.target }}.tar.gz" >> $GITHUB_ENV
echo "SHA256_2_FILENAME=dfx-${{ matrix.target }}.tar.gz.sha256" >> $GITHUB_ENV

# Remove pre-installed stable toolchain so it doesn't pollute the
# rust-cache environment hash. macOS (and sometimes Linux) runner
# images ship with varying stable versions, making the hash
# non-deterministic and causing constant cache misses.
- name: Remove pre-installed Rust stable toolchain
run: rustup toolchain remove stable 2>/dev/null || true

# This step also handles Rust-specific caching
- name: Install Rust toolchain
uses: actions-rust-lang/setup-rust-toolchain@v1
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/unit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,12 @@ jobs:
os: [ ubuntu-24.04, ubuntu-24.04-arm, macos-15 ]
steps:
- uses: actions/checkout@v6
# Remove pre-installed stable toolchain so it doesn't pollute the
# rust-cache environment hash. macOS (and sometimes Linux) runner
# images ship with varying stable versions, making the hash
# non-deterministic and causing constant cache misses.
- name: Remove pre-installed Rust stable toolchain
run: rustup toolchain remove stable 2>/dev/null || true
# This step also handles Rust-specific caching
- name: Install Rust toolchain
uses: actions-rust-lang/setup-rust-toolchain@v1
Expand Down
2 changes: 1 addition & 1 deletion src/canisters/frontend/icx-asset/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ fn style() -> Styles {
async fn main() -> anyhow::Result<()> {
let opts: Opts = Opts::parse();

let logger = support::new_logger(opts.log_level.into());
let (logger, _async_guard) = support::new_logger(opts.log_level.into());

let agent = Agent::builder()
.with_url(&opts.replica)
Expand Down
9 changes: 6 additions & 3 deletions src/canisters/frontend/icx-asset/src/support.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,13 @@ impl<D: slog_term::Decorator> slog::Drain for TermLogFormat<D> {
}
}

pub(crate) fn new_logger(level: Level) -> Logger {
pub(crate) fn new_logger(level: Level) -> (Logger, slog_async::AsyncGuard) {
let decorator = slog_term::TermDecorator::new().build();
let drain = TermLogFormat::new(decorator).fuse();
let drain = slog::LevelFilter::new(drain, level).fuse();
let drain = slog_async::Async::new(drain).build().fuse();
Logger::root(drain, slog::o!())
let (drain, guard) = slog_async::Async::new(drain)
.overflow_strategy(slog_async::OverflowStrategy::Block)
.build_with_guard();
let drain = drain.fuse();
(Logger::root(drain, slog::o!()), guard)
}
Loading