From 3f4ea2c35b06f4537e1bfc10bf576ba03b88c9f6 Mon Sep 17 00:00:00 2001 From: Joe Rafaniello Date: Mon, 3 Feb 2020 14:36:14 -0500 Subject: [PATCH] Guard against hitting const_missing from within const_missing If MiqAeServiceModelBase is not yet defined, we could hit const_missing recursively, leading to a stack level too deep. Fixes https://github.com/ManageIQ/manageiq/issues/19618 --- lib/miq_automation_engine/engine/miq_ae_method_service.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/miq_automation_engine/engine/miq_ae_method_service.rb b/lib/miq_automation_engine/engine/miq_ae_method_service.rb index e10c490a4..b0f668a1e 100644 --- a/lib/miq_automation_engine/engine/miq_ae_method_service.rb +++ b/lib/miq_automation_engine/engine/miq_ae_method_service.rb @@ -1,5 +1,7 @@ module MiqAeMethodService def self.const_missing(name) + super unless defined?(MiqAeServiceModelBase) + MiqAeServiceModelBase.create_service_model_from_name(name) || super end end