[arvados] updated: 2.5.0-177-ge03ebe77c
git repository hosting
git at public.arvados.org
Mon Feb 20 19:54:26 UTC 2023
Summary of changes:
services/api/config/initializers/reload_config.rb | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
via e03ebe77c257e44645c64c8cd71e5e7c115991ef (commit)
from 94dcdefbf8fe264daa28c5b15f68b304c683e390 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
commit e03ebe77c257e44645c64c8cd71e5e7c115991ef
Author: Brett Smith <brett.smith at curii.com>
Date: Mon Feb 20 14:46:41 2023 -0500
20137: Fix incorrect keyword in RailsAPI config reload loop
The reason rails_restart_test.go has been racey is because the code
under test is actually buggy. If the configuration reload loop ever
encounters a condition where it wants to restart (probably
`hash == hash_lastload`), it tries to call a nonexistent method
`continue`, the thread crashes, the configuration never gets reloaded,
and the test fails.
Use the intended Ruby keyword `next` instead.
Closes #20137.
Arvados-DCO-1.1-Signed-off-by: Brett Smith <brett.smith at curii.com>
diff --git a/services/api/config/initializers/reload_config.rb b/services/api/config/initializers/reload_config.rb
index 1582855bf..bdc815099 100644
--- a/services/api/config/initializers/reload_config.rb
+++ b/services/api/config/initializers/reload_config.rb
@@ -35,13 +35,13 @@ else
rescue => e
Rails.logger.info("reload_config: config file updated but could not be loaded: #{e}")
t_lastload = t
- continue
+ next
end
if hash == hash_lastload
# If we reloaded a new or updated file, but the content is
# identical, keep polling instead of restarting.
t_lastload = t
- continue
+ next
end
restartfile = Rails.root.join('tmp', 'restart.txt')
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list