-
Notifications
You must be signed in to change notification settings - Fork 75
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Investigate replacing require_relative
with require_dependency
#418
Comments
I'm looking at this now as the issue in #415 (comment) indicates the reloading of code in dev mode isn't properly reloading |
@pkomanek I'm going to do some testing here and let you know what I find. So far, it looks like either the #415 change was incomplete OR that when rails reloads code, it fails to load it correctly, or both. Either way, after reload
|
@gmcculloug this is as far as @d-m-u and I could get: master...jrafanie:try_to_support_dev_reload_in_automate Personally, I think much of the difficulty is that the service models aren't in their own namespace. Because of this, we had to do horrible things like this whitelist of constants within the MiqAeMethodService namespace that were not service models: https://github.com/jrafanie/manageiq-automation_engine/blob/299bf01a5d2c002f20840f71d954c090136d8ff3/lib/miq_automation_engine/engine/miq_ae_method_service.rb#L9-L23 I believe we want Note, we then tried to use require_dependency in that branch above but again, because we don't have proper directory structures or namespaces, I couldn't just use the constant name and rely on autoload, I had to use require_dependency. Finally, even with the changes above, I still cannot get development mode reload working for automate and feel it's too big of a project to do on the side. Note, @d-m-u helped me get this recreated in development mode in rails console using this script below:Restore the mbu database. Note, we found that this is the ruby method that was returning empty and what we converted to the code below: Start rails server in dev mode in one terminal Start In rails console in another terminal:
Now, make a change to a controller/ui file in manageiq-api
Now try to run the large block of code above again. |
cc @pkomanek see above ^ |
Note, here is where we got to... after
The logging of constants show this:
I believe it's getting "stuck" here: Line 122 in 358772c
|
@jrafanie It sounds like the real problem is that .const_missing is defined at |
This issue has been automatically marked as stale because it has not been updated for at least 3 months. If you can still reproduce this issue on the current release or on Thank you for all your contributions! More information about the ManageIQ triage process can be found in the triage process documentation. |
Based on work from #415
Guard against hitting const_missing from within const_missing
See #415 (comment)
The text was updated successfully, but these errors were encountered: