Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: ignore Cargo.toml files under target/ when scanning for eligible crates in check-features #492

Merged
merged 1 commit into from
Feb 11, 2025

Conversation

tobz
Copy link
Member

@tobz tobz commented Feb 11, 2025

Summary

When running make check-features locally, it will pick up crates under target/ based on how the find command is constructed. This shows up as a single error message early on in the command because one of our crates -- saluki-metrics -- uses a specific crate for testing (trybuild) that outputs a temporary crate under target/tests/ used for testing macros.

This crate is then found when running make check-features, and spits out an error, because when we try to then execute cargo hack check on it, Cargo doesn't know about it: it's not part of the workspace. The error looks like this:

❯ make check-features
[*] Checking feature flag compatibility matrix...
info: running `cargo check --tests --quiet --no-default-features` on agent-data-plane (1/4)

...

error: package ID specification `saluki-metrics-tests` matched no packages

...

info: running `cargo check --tests --quiet --no-default-features --features ddsketch_extended` on ddsketch-agent (2/4)

info: running `cargo check --tests --quiet --no-default-features --features serde` on ddsketch-agent (3/4)

This PR simply excludes target/ entirely from find in the first place.

Change Type

  • Bug fix
  • New feature
  • Non-functional (chore, refactoring, docs)
  • Performance

How did you test this PR?

  • Checked out main and ran cargo clean to remove the existing artifacts under target/.
  • Ran make check-features and observed that no error shows up: we haven't ran the test that generates the spurious crate yet.
  • Run make test-all to prime the target/ directory with the spurious crate.
  • Run make check-features again and observe, early on, the following error: error: package ID specification saluki-metrics-tests matched no packages
  • Repeat the same steps, but check out this branch instead of main.
  • Observe that the previous error no longer shows up.

I did this both on Linux and macOS just to make sure we weren't using any specific flags of find that have differences between the GNU and BSD variants.

References

N/A

@tobz tobz requested a review from a team as a code owner February 11, 2025 16:54
@pr-commenter
Copy link

pr-commenter bot commented Feb 11, 2025

Regression Detector (DogStatsD)

Regression Detector Results

Run ID: fd6fb8d0-7f8c-40bc-a10f-14c7f442cde0

Baseline: 7.63.0-rc.2
Comparison: 7.63.0-rc.2

Optimization Goals: ✅ No significant changes detected

Fine details of change detection per experiment

perf experiment goal Δ mean % Δ mean % CI trials links
dsd_uds_500mb_3k_contexts ingress throughput +1.07 [+0.96, +1.19] 1
dsd_uds_40mb_12k_contexts_40_senders ingress throughput +0.00 [-0.00, +0.00] 1
dsd_uds_1mb_50k_contexts ingress throughput +0.00 [-0.00, +0.00] 1
dsd_uds_512kb_3k_contexts ingress throughput +0.00 [-0.01, +0.01] 1
dsd_uds_1mb_50k_contexts_memlimit ingress throughput +0.00 [-0.00, +0.00] 1
dsd_uds_1mb_3k_contexts ingress throughput +0.00 [-0.00, +0.00] 1
dsd_uds_100mb_250k_contexts ingress throughput +0.00 [-0.00, +0.00] 1
dsd_uds_1mb_3k_contexts_dualship ingress throughput -0.00 [-0.00, +0.00] 1
dsd_uds_10mb_3k_contexts ingress throughput -0.00 [-0.00, +0.00] 1
dsd_uds_100mb_3k_contexts ingress throughput -0.02 [-0.05, +0.02] 1
dsd_uds_100mb_3k_contexts_distributions_only memory utilization -0.03 [-0.18, +0.12] 1
quality_gates_idle_rss memory utilization -0.77 [-0.86, -0.68] 1

Bounds Checks: ❌ Failed

perf experiment bounds_check_name replicates_passed links
quality_gates_idle_rss memory_usage 0/10

Explanation

Confidence level: 90.00%
Effect size tolerance: |Δ mean %| ≥ 5.00%

Performance changes are noted in the perf column of each table:

  • ✅ = significantly better comparison variant performance
  • ❌ = significantly worse comparison variant performance
  • ➖ = no significant change in performance

A regression test is an A/B test of target performance in a repeatable rig, where "performance" is measured as "comparison variant minus baseline variant" for an optimization goal (e.g., ingress throughput). Due to intrinsic variability in measuring that goal, we can only estimate its mean value for each experiment; we report uncertainty in that value as a 90.00% confidence interval denoted "Δ mean % CI".

For each experiment, we decide whether a change in performance is a "regression" -- a change worth investigating further -- if all of the following criteria are true:

  1. Its estimated |Δ mean %| ≥ 5.00%, indicating the change is big enough to merit a closer look.

  2. Its 90.00% confidence interval "Δ mean % CI" does not contain zero, indicating that if our statistical model is accurate, there is at least a 90.00% chance there is a difference in performance between baseline and comparison variants.

  3. Its configuration does not mark it "erratic".

@tobz tobz merged commit 697e050 into main Feb 11, 2025
18 of 20 checks passed
@tobz tobz deleted the tobz/fix-check-features-find-command branch February 11, 2025 17:01
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