Skip to content

flaky_tests: Skip requeuing known flaky tests#42

Merged
eliu-figma merged 7 commits intomasterfrom
eliu/skip-known-flaky-test-retries
Sep 11, 2025
Merged

flaky_tests: Skip requeuing known flaky tests#42
eliu-figma merged 7 commits intomasterfrom
eliu/skip-known-flaky-test-retries

Conversation

@eliu-figma
Copy link
Contributor

@eliu-figma eliu-figma commented Sep 9, 2025

This PR enables skipping requeues for known flaky tests.

When the queue is created, it reads the known flaky tests filepath from the ENV. This file stores a list of known flaky tests. These known flakes are stored in the queue configuration

Whenever there is a failure, we check whether the test is in the known flakes list and skip requeuing if it is.

test

I added unit tests. I also modified the github action to make sure that the test ran properly.

I don't know why the python tests are failing - I didn't touch the python library at all, and it looks like they were already failing on master

I tested the updated ci-queue implementation by pinning the commit SHA in a figma/figma branch and saw things ran as expected: https://github.com/figma/figma/pull/571339

  • Saw no requeues for flaky tests in the build

deploy

After merging to master, take the commit SHA and pin it in the sinatra Gemfile in figma/figma

@eliu-figma eliu-figma force-pushed the eliu/skip-known-flaky-test-retries branch from abb2526 to c7d7ef3 Compare September 9, 2025 19:45
gemspec

gem 'activesupport'
gem 'rexml'
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This was blocking the unit tests from running

@eliu-figma eliu-figma force-pushed the eliu/skip-known-flaky-test-retries branch from 2b15676 to ce09d23 Compare September 9, 2025 20:30
@eliu-figma eliu-figma force-pushed the eliu/skip-known-flaky-test-retries branch from ce09d23 to faf2b0d Compare September 9, 2025 20:32
end
EOF
# Add require to test_helper
sed -i '5i require_relative "minitest_compat"' ruby/test/test_helper.rb
Copy link
Contributor Author

@eliu-figma eliu-figma Sep 9, 2025

Choose a reason for hiding this comment

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

The github action tests on this PR were failing because only the modern MiniTest version was present in the environment.

It looks like the most recent commit reverted a change that renamed all MiniTest to Minitest so I didn't want to modify it in the library. Instead, I added a compatibility patch to support Minitest when running these tests in the github action

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@eliu-figma eliu-figma force-pushed the eliu/skip-known-flaky-test-retries branch 5 times, most recently from 683d34c to c7b9dd3 Compare September 9, 2025 21:04
@eliu-figma eliu-figma force-pushed the eliu/skip-known-flaky-test-retries branch from c7b9dd3 to 0b34336 Compare September 9, 2025 21:10
env:
SUITE: ruby
REDIS_HOST: localhost
RUBYOPT: "-W0"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

this suppresses warnings in the test environment because this test was giving a warning which did not match the expected output

  test_utf8_tests_and_marshal                                     FAIL (0.71s)
        Expected "/opt/hostedtoolcache/Ruby/3.3.0/x64/lib/ruby/gems/3.3.0/gems/activesupport-5.2.8.1/lib/active_support/notifications/fanout.rb:3: warning: mutex_m was loaded from the standard library, but will no longer be part of the default gems since Ruby 3.4.0. Add mutex_m to your Gemfile or gemspec. Also contact author of activesupport-5.2.8.1 to add mutex_m into its gemspec.\n/opt/hostedtoolcache/Ruby/3.3.0/x64/lib/ruby/gems/3.3.0/gems/activesupport-5.2.8.1/lib/active_support/xml_mini.rb:4: warning: base64 was loaded from the standard library, but will no longer be part of the default gems since Ruby 3.4.0. Add base64 to your Gemfile or gemspec. Also contact author of activesupport-5.2.8.1 to add base64 into its gemspec.\n/opt/hostedtoolcache/Ruby/3.3.0/x64/lib/ruby/gems/3.3.0/gems/activesupport-5.2.8.1/lib/active_support/xml_mini.rb:5: warning: bigdecimal was loaded from the standard library, but will no longer be part of the default gems since Ruby 3.4.0. Add bigdecimal to your Gemfile or gemspec. Also contact author of activesupport-5.2.8.1 to add bigdecimal into its gemspec.\n" to be empty.
        /home/runner/work/ci-queue/ci-queue/ruby/test/integration/minitest_redis_test.rb:730:in `test_utf8_tests_and_marshal'

@eliu-figma eliu-figma force-pushed the eliu/skip-known-flaky-test-retries branch 8 times, most recently from ee45fc0 to 0f59d14 Compare September 10, 2025 21:40
@eliu-figma eliu-figma force-pushed the eliu/skip-known-flaky-test-retries branch from 0f59d14 to fcb1a03 Compare September 10, 2025 22:09
@eliu-figma eliu-figma marked this pull request as ready for review September 11, 2025 17:29
@eliu-figma eliu-figma requested a review from ebarajas September 11, 2025 17:30
@eliu-figma eliu-figma requested a review from weeyum September 11, 2025 17:30
@eliu-figma eliu-figma merged commit 9c7bbbf into master Sep 11, 2025
5 of 11 checks passed
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