Closed kbrock closed 8 months ago
So the caching issue is an existing issue. Not sure if it will be an issue but want to wait until I get a reproducer.
The load
is the only part I need. I'll change this refactoring to do that.
update:
We can probably fix this changing the way zeitwerk is implemented, but I was hoping to get this minimal change in first
I'm good with merging this as is to get rid of the stack overflow.
Backported to quinteros
in commit 5f47ecbf645fa57224aad614ae651a901e5b6492.
commit 5f47ecbf645fa57224aad614ae651a901e5b6492
Author: Jason Frey <fryguy9@gmail.com>
Date: Fri Dec 8 16:02:15 2023 -0500
Merge pull request #536 from kbrock/const_get
Const get
(cherry picked from commit 9e3f656946fa5995fc77705ef7609363a77b4f48)
Before
When development reloads classes,
MiqAeService
models run into an issue.MiqAeMethodService.const_missing
MiqAeServiceModelBase.create_service_model_from_name
MiqAeServiceModelBase.create_service_model
require file_name
HEREIf rails reloads a class, it unloads the service models, but since the file is still marked as required, the
require
does nothing. So the workflow changes as follows:requre
is a no-opMiqAeMethodService.const_missing
To display the dialog for provisioning a Vm, automate is called inline in the webserver, so the webserver starts crashing with stack overflow errors.
After