-
Notifications
You must be signed in to change notification settings - Fork 60
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
Attempt to reduce test flakiness on Windows #1845
Conversation
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.
Just curious, Why is this only a problem on windows? Indeed it does not seem to happen on macs (ran the test 1000 times on my machine).
@shreyas-goenka It is possible the goroutines for stdout and stderr are woken up at the same time on Windows due to some interactions at the I/O notification level. I expect that on other platforms they are woken up sequentially (due to the tiny sleep in the Python code). |
New features for Databricks Asset Bundles: This release adds support for managing AI/BI dashboards as part of your bundle configuration. The `bundle generate` command is updated to support producing dashboard bundle configuration as well as dashboard payloads. You can find an example configuration and walkthrough at https://github.com/databricks/bundle-examples/tree/main/knowledge_base/dashboard_nyc_taxi Bundles: * Add support for AI/BI dashboards ([#1743](#1743)). * Added validator for folder permissions ([#1824](#1824)). * Add bundle generate variant for dashboards ([#1847](#1847)). * Use SetPermissions instead of UpdatePermissions when setting folder permissions based on top-level ones ([#1822](#1822)). Internal: * Attempt to reduce test flakiness on Windows ([#1845](#1845)). * Reuse resource resolution code for the run command ([#1858](#1858)). * [Internal] Automatically trigger integration tests on PR ([#1857](#1857)). * Add privacy notice to README ([#1841](#1841)). * [Internal] Add test instructions for external contributors ([#1863](#1863)). * Add `libs/dyn/jsonsaver` ([#1862](#1862)). Dependency updates: * Bump github.com/fatih/color from 1.17.0 to 1.18.0 ([#1861](#1861)).
**New features for Databricks Asset Bundles:** This release adds support for managing AI/BI dashboards as part of your bundle configuration. The `bundle generate` command is updated to support producing dashboard bundle configuration as well as a serialized JSON representation of the dashboard. You can find an example configuration and walkthrough at https://github.com/databricks/bundle-examples/tree/main/knowledge_base/dashboard_nyc_taxi CLI: * Add privacy notice to README ([#1841](#1841)). Bundles: * Add support for AI/BI dashboards ([#1743](#1743)). * Added validator for folder permissions ([#1824](#1824)). * Add bundle generate variant for dashboards ([#1847](#1847)). * Use SetPermissions instead of UpdatePermissions when setting folder permissions based on top-level ones ([#1822](#1822)). Internal: * Attempt to reduce test flakiness on Windows ([#1845](#1845)). * Reuse resource resolution code for the run command ([#1858](#1858)). * [Internal] Automatically trigger integration tests on PR ([#1857](#1857)). * [Internal] Add test instructions for external contributors ([#1863](#1863)). * Add `libs/dyn/jsonsaver` ([#1862](#1862)). Dependency updates: * Bump github.com/fatih/color from 1.17.0 to 1.18.0 ([#1861](#1861)). --------- Co-authored-by: Pieter Noordhuis <pieter.noordhuis@databricks.com>
Changes
Test failures indicate that both stdout and stderr are consumed, yet the content of stdout doesn't end up in the intended output. This can happen if the goroutines responsible for writing to the combined output buffer attempt to write to the same underlying buffer concurrently.
Example failure:
With the test body:
cli/libs/process/background_test.go
Lines 48 to 66 in ca45e53
With the implementation of
WithCombinedOutput
:cli/libs/process/opts.go
Lines 72 to 78 in ca45e53
Notice that
c.Stdout
does get the "2", or the test failure would have included the relevant assertion error. This leads me to believe that there is a race on writing tobuf
from the two goroutines writing toc.Stdout
andc.Stderr
.Tests
The test passes. If this PR has the intended effect remains to be seen...