-
Notifications
You must be signed in to change notification settings - Fork 13
Workaround in order to fix flaky tests #1106
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
base: main
Are you sure you want to change the base?
Conversation
BenchmarksComparisonBenchmark execution time: 2025-06-13 17:06:26 Comparing candidate commit 49e8bfc in PR branch Found 0 performance improvements and 0 performance regressions! Performance is the same for 52 metrics, 2 unstable metrics. CandidateCandidate benchmark detailsGroup 1
Group 2
Group 3
Group 4
Group 5
Group 6
Group 7
Group 8
Group 9
Group 10
Group 11
Group 12
Group 13
BaselineOmitted due to size. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1106 +/- ##
=========================================
+ Coverage 0 71.00% +71.00%
=========================================
Files 0 335 +335
Lines 0 51174 +51174
=========================================
+ Hits 0 36337 +36337
- Misses 0 14837 +14837
🚀 New features to boost your workflow:
|
Artifact Size Benchmark Reportaarch64-alpine-linux-musl
aarch64-unknown-linux-gnu
libdatadog-x64-windows
libdatadog-x86-windows
x86_64-alpine-linux-musl
x86_64-unknown-linux-gnu
|
|
||
use anyhow::Context; | ||
use bin_tests::{build_artifacts, ArtifactType, ArtifactsBuild, BuildProfile}; | ||
use serde_json::Value; | ||
|
||
const CHECK_TIMEOUT_MS: u64 = 20_000; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How was this number selected? Does it need to stay in sync with anything else?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I left that value because it was the one Gregory was using in his tests but, thinking it through, it should be probably in sync with const TEST_COLLECTOR_TIMEOUT_MS: u32 = 10_000;
. WDYT?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've just moved the constant to a new module so they can be shared across the tests. @danielsn let me know if it better that way.
@@ -2,7 +2,7 @@ variables: | |||
# These are gitlab variables so that it's easier to do a manual deploy | |||
# If these are set witih value and description, then it gives you UI elements | |||
DOWNSTREAM_BRANCH: | |||
value: "main" | |||
value: "julio/trigger-release-pr" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I assume this should be fixed before merge?
// Copyright 2025-Present Datadog, Inc. https://www.datadoghq.com/ | ||
// SPDX-License-Identifier: Apache-2.0 | ||
// | ||
pub const TEST_COLLECTOR_TIMEOUT_MS: u32 = 10_000; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is later used as a duration. Just make it one here, and avoid the conversion later
@@ -184,6 +207,11 @@ fn test_crash_tracking_bin( | |||
); | |||
assert_eq!(Ok(""), String::from_utf8(stdout).as_deref()); | |||
|
|||
assert!(check_file_existence( | |||
fixtures.crash_profile_path.as_path(), | |||
Duration::from_secs(TEST_COLLECTOR_TIMEOUT_MS as u64) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
see comment above about making TEST_COLLECTOR_TIMEOUT_MS
a Duration
pub mod modes; | ||
|
||
pub use constants::*; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't really care either way, but any reason that modes
is pub mod
, while constants
is pub use *
?
// Copyright 2025-Present Datadog, Inc. https://www.datadoghq.com/ | ||
// SPDX-License-Identifier: Apache-2.0 | ||
// | ||
pub const TEST_COLLECTOR_TIMEOUT_MS: u32 = 10_000; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Comment explaining how this value was chosen
What does this PR do?
Check the file system entry before the file is parsed.
Motivation
Flaky tests on macos runners.
Additional Notes
Since macos tests are disabled on regular merges this PR sets a test branch for the gitlab workflow so the macos runners are triggered. Once the fix is validated the changes in workflow should be reverted.