Skip to content

CI: Double compute performance, halve build jobs - #150

Merged
OpsBotPrime merged 9 commits into
masterfrom
reinier/share-dependencies
Jul 28, 2026
Merged

CI: Double compute performance, halve build jobs#150
OpsBotPrime merged 9 commits into
masterfrom
reinier/share-dependencies

Conversation

@ReinierMaas

Copy link
Copy Markdown
Contributor

More effective caching between the Nix builds by running in the same job.
Share feature flags between Rust builds by using cargo hakari.

@ReinierMaas ReinierMaas self-assigned this Jul 23, 2026
@ReinierMaas
ReinierMaas force-pushed the reinier/share-dependencies branch 2 times, most recently from f6c9b42 to fbb75f3 Compare July 24, 2026 10:56

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

The Nix provided sqlite3 library is of a slightly different version that the one bundled with libsqlite-sys crate, which causes some small differences in the explanation of the query plans.

Comment thread Cargo.lock

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Here you can spot the reduction in dependencies! But the workspace hack still makes sense because that consolidates the feature selection as well, which also reduces the amount of recompiles of the same (transitive) dependency.

@ReinierMaas
ReinierMaas marked this pull request as ready for review July 24, 2026 13:31

@radekchannable radekchannable left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Some more suggestions but I understand if not all of them are wanted, actionable right now or at all.

Comment thread Cargo.toml Outdated
Comment thread Cargo.toml
tracing = { version = "0.1.41", features = ["log"] }
tracing-opentelemetry = { version = "0.33.0" }
tracing-subscriber = { version = "0.3", features = ["std", "env-filter", "fmt"] }
url = { version = "2.5.2" }

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

By pinning idna_adapter to 1.1.0 this will use unicode-rs instead of ICU4X for working with Unicode domains, which should build much faster. I think we only use this for talking to GCS, Opsqueue server, and Sentry, none of which are hosted on Unicode domains, so we could even disable Unicode domain support entirely. See https://docs.rs/crate/idna_adapter/latest.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

ICU4X as the default

I think this indicates that the ICU4X2.2 is indeed used.

opsqueue/Cargo.lock

Lines 1402 to 1410 in fbb75f3

[[package]]
name = "idna_adapter"
version = "1.2.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cb68373c0d6620ef8105e855e7745e18b0d00d3bdb07fb532e434244cdb9a714"
dependencies = [
"icu_normalizer",
"icu_properties",
]

I switched to idna_adapter = v1.1 to use unicode.rs.

Comment thread Cargo.toml
pyo3-async-runtimes = { version = "0.28.0", features = ["tokio-runtime", "unstable-streams"] }
pyo3-log = { version = "0.13.3" }
rand = { version = "0.10.1" }
reqwest = { version = "0.13.2", default-features = false, features = ["json"] }

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

If we use curl instead of reqwest for talking to GCS, Opsqueue server, and Sentry that would save a lot of build time.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I am not changing the internal guts in this PR. The development experience when using libcurl from Rust is also worse.

@ReinierMaas

Copy link
Copy Markdown
Contributor Author

@OpsBotPrime merge!

@OpsBotPrime

Copy link
Copy Markdown
Contributor

Rebased as c239da7, waiting for CI …

@OpsBotPrime

Copy link
Copy Markdown
Contributor

CI job 🟡 started.

@OpsBotPrime
OpsBotPrime force-pushed the reinier/share-dependencies branch from 888ff06 to c239da7 Compare July 28, 2026 12:47
@OpsBotPrime
OpsBotPrime merged commit c239da7 into master Jul 28, 2026
6 of 7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants