Skip to content

Support macos walltime without profiling in codspeed-runner#287

Open
GuillaumeLagrange wants to merge 7 commits intomainfrom
cod-2459-be-able-to-run-all-integrations-on-macos
Open

Support macos walltime without profiling in codspeed-runner#287
GuillaumeLagrange wants to merge 7 commits intomainfrom
cod-2459-be-able-to-run-all-integrations-on-macos

Conversation

@GuillaumeLagrange
Copy link
Copy Markdown
Contributor

No description provided.

On macos a symlink breaks the existing test creating an infinite loop
where `instropected_go` detects itself as the real `go` executable.

Fixed by changing the behavior to what instrospected_node does.
@GuillaumeLagrange GuillaumeLagrange force-pushed the cod-2459-be-able-to-run-all-integrations-on-macos branch 2 times, most recently from 8a9d9bd to 407c55c Compare April 13, 2026 13:01
@codspeed-hq
Copy link
Copy Markdown

codspeed-hq bot commented Apr 13, 2026

Merging this PR will not alter performance

✅ 4 untouched benchmarks


Comparing cod-2459-be-able-to-run-all-integrations-on-macos (8b7c20c) with main (fe49a28)

Open in CodSpeed

@GuillaumeLagrange GuillaumeLagrange force-pushed the cod-2459-be-able-to-run-all-integrations-on-macos branch 4 times, most recently from f95953f to bba9e90 Compare April 13, 2026 15:12
@GuillaumeLagrange GuillaumeLagrange marked this pull request as ready for review April 13, 2026 15:12
@GuillaumeLagrange GuillaumeLagrange force-pushed the cod-2459-be-able-to-run-all-integrations-on-macos branch 6 times, most recently from c07e0c6 to dc2a772 Compare April 13, 2026 16:07
…tor support gates

Replaces the loose `os` + `os_version` strings on `SystemInfo` with an
`Os` enum.

Adds `Executor::support_level(&Os)` so each executor declares
its own OS matrix: `run_executor` bails on `Unsupported`, skips `setup()`
on `RequiresManualSetup`, and runs it on `FullySupported`.
These tests panic on macOS, and for now are not relevant since we do not
support profiling on macOS.
When we do support it, we should have os-specific tests
@GuillaumeLagrange GuillaumeLagrange force-pushed the cod-2459-be-able-to-run-all-integrations-on-macos branch from dc2a772 to 8b7c20c Compare April 13, 2026 16:10
@GuillaumeLagrange GuillaumeLagrange changed the title Be able to run all integrations on macos Support macos walltime without profiling in codspeed-runner Apr 14, 2026
Copy link
Copy Markdown
Member

@not-matthias not-matthias left a comment

Choose a reason for hiding this comment

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

It's important to consider everything unsupported by default. e.g. if someone runs on a system we haven't considered (e.g. Windows) we shouldn't even try to continue running with best-effort.

Logic could be implemented like this:

  • Tool support: Get Os struct, check version + distro
  • Executor: Check each OS, e.g. on Linux: is_debian FullySupported; else RequireManualInstallation; Mac/Windows: Unsupported
  • General (check_system): We could refactor this to just iterate over all executors and see if any are supported.

#[allow(clippy::enum_variant_names)]
MacOs { version: String },
/// Any other os we don't explicitly target. Executors may still work but the user is responsible for installing tooling themselves.
Other { name: String, version: String },
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Isn't this kind of dangerous? For example, does Windows fall into this category? How about NixOS?

Running on Windows should fail, while NixOS should work. We shouldn't merge both into one category.

Comment on lines +70 to +74
/// Linux distributions that support auto-install of CodSpeed tooling and are explicitly targeted by our executors
SupportedLinux {
distro: SupportedLinuxDistro,
version: String,
},
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

How about renaming this to Linux, and including NixOS? We could have a is_debian_based() func on the LinuxDistro struct.

/// - Ubuntu 22.04 x86_64 and aarch64
/// - Debian 11 x86_64
/// - Debian 12 x86_64
pub fn check_system(system_info: &SystemInfo) -> Result<()> {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

We could remove this file entirely and create Os::is_supported, or maybe have a SupportLevel (supported, best-effort, unsupported)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Actually, it might be better to iterate over all executors and see if any are supported.


fn support_level(&self, os: &Os) -> ExecutorSupport {
match os {
Os::SupportedLinux { .. } => ExecutorSupport::FullySupported,
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Shouldn't we check the version here since we have this download logic:

    let (deb_ubuntu_version, architecture) =
        match (distro, version.as_str(), system_info.arch.as_str()) {
            (SupportedLinuxDistro::Ubuntu, "22.04", "x86_64")
            | (SupportedLinuxDistro::Debian, "12", "x86_64") => ("22.04", "amd64"),
            (SupportedLinuxDistro::Ubuntu, "24.04", "x86_64") => ("24.04", "amd64"),
            (SupportedLinuxDistro::Ubuntu, "22.04", "aarch64")
            | (SupportedLinuxDistro::Debian, "12", "aarch64") => ("22.04", "arm64"),
            (SupportedLinuxDistro::Ubuntu, "24.04", "aarch64") => ("24.04", "arm64"),
            _ => bail!("Unsupported system"),
        };

/// Build an [`Os`] from the raw `(os, version)` strings reported by `sysinfo`.
///
/// Unknown Linux-ish distro ids fall into [`Os::OtherLinux`]; only OSes we know we cannot run
/// on (today: Windows) map to [`Os::Unsupported`].
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Os::Unsupported and Os::OtherLinux dont exist

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.

2 participants