Skip to content

Silence load balancing from backtrace also for FOSS

Peter Leitzen requested to merge pl-silence-load-balancer-backtrace-foss into master

What does this MR do and why?

When running specs with FOSS_ONLY=1 load balancing code re-appeared in backtraces.

!71259 (merged)

Screenshots

FOSS_ONLY=1 bin/rspec spec/models/project_spec.rb -e fails and tail -f log/test.log | grep load_balancing

Before After
Screenshot_from_2021-11-18_12-08-23 Screenshot_from_2021-11-18_12-10-18

How to set up and validate locally

  • Create a failing spec
diff --git a/spec/models/project_spec.rb b/spec/models/project_spec.rb
index 3a8768ff463..3ab4f933f80 100644
--- a/spec/models/project_spec.rb
+++ b/spec/models/project_spec.rb
@@ -11,6 +11,10 @@
 
   let_it_be(:namespace) { create_default(:namespace).freeze }
 
+  it 'fails' do
+    Project.create!
+  end
+
   it_behaves_like 'having unique enum values'
 
   describe 'associations' do
  • Tail test.log and filter for load_balancing via tail -f log/test.log | grep load_balancing

  • Run failing spec in FOSS mode via FOSS_ONLY=1 bin/rspec spec/models/project_spec.rb -e fails and confirm that output of test.log is empty

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Peter Leitzen

Merge request reports

Loading