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

Address psych flaky test #4144

Closed
wants to merge 2 commits into from

Conversation

sarahchen6
Copy link
Contributor

@sarahchen6 sarahchen6 commented Nov 21, 2024

What does this PR do?
This PR adds the psych gem to the cucumber loading script and uninstalls psych before the script runs.

Motivation:
The goal of this PR is to address a flaky test caused by the psych gem double loading. @p-datadog includes details in #4130. Per Oleg's findings, the built-in psych gem attempts to override the local/bundle gem. The error is caused when lib/psych/class_loader.rb is loaded for the second time. This solution first uninstalls psych before reinstalling it in the cucumber loading script in order to avoid the double-load error; however, it does not address the original gem load.

Change log entry
No change log entry.

Additional Notes:
This PR addresses the @DataDog/ruby-guild issue here.

How to test the change?
Given the nature of flakiness, I am testing the change through a Green CI and following up to confirm that no more flaky tests related to the psych gem double-loading occur throughout the repo.

@github-actions github-actions bot added the dev/testing Involves testing processes (e.g. RSpec) label Nov 21, 2024
@pr-commenter
Copy link

pr-commenter bot commented Nov 21, 2024

Benchmarks

Benchmark execution time: 2024-11-21 19:52:42

Comparing candidate commit 0cdba56 in PR branch sarahchen6/address-psych-flaky-test with baseline commit 7a345da in branch master.

Found 0 performance improvements and 0 performance regressions! Performance is the same for 31 metrics, 2 unstable metrics.

@codecov-commenter
Copy link

Codecov Report

Attention: Patch coverage is 50.00000% with 1 line in your changes missing coverage. Please review.

Project coverage is 97.77%. Comparing base (7a345da) to head (5e55750).

Files with missing lines Patch % Lines
spec/datadog/core/environment/execution_spec.rb 50.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##           master    #4144   +/-   ##
=======================================
  Coverage   97.77%   97.77%           
=======================================
  Files        1350     1350           
  Lines       81322    81322           
  Branches     4107     4107           
=======================================
+ Hits        79515    79516    +1     
+ Misses       1807     1806    -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.


🚨 Try these New Features:

@sarahchen6 sarahchen6 changed the title [WIP] Address psych flaky test Address psych flaky test Nov 21, 2024
@sarahchen6 sarahchen6 closed this Nov 23, 2024
@sarahchen6
Copy link
Contributor Author

Improved by #4145!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dev/testing Involves testing processes (e.g. RSpec)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants