-
Notifications
You must be signed in to change notification settings - Fork 23
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
Fixing docsh dependency #138
Conversation
Why? 🤔 |
'prod' is a default name for target so renaming it into 'demo', so test scenarios won't be included in a release when amoc is used as a dependecy
bccbc5d
to
bbe7d7c
Compare
unfortunately rebar3 doesn't copy any source files from the directories other than 'src' into release denysgonchar@Administrators-MacBook-Pro amoc % find . -name amoc_controller.erl ./_build/demo/rel/amoc/lib/amoc-2.2.0+build.788.refbccbc5d/src/amoc_controller.erl ./src/amoc_controller.erl denysgonchar@Administrators-MacBook-Pro amoc % find . -name parallel_throttle_test.erl ./scenarios/parallel_throttle_test.erl and source code file is required for fetching edoc description for scenario. So currently, we are not able to get 'doc' field of scenario info, when running amoc inside a container. when we try to fetch info for parallel_throttle_test scenario: http://localhost:4000/scenarios/info/parallel_throttle_test we get: { "doc": "no documentation found", "parameters": { ... and at the same time the error is logger in amoc console: Attempt to process operation: 'ScenariosInfoIdGet' Source file for parallel_throttle_test is not available. If you try to check manually the source file location using docsh_beam module, you get the following: (amoc@5441117ebf5d)1> {ok, B1} = docsh_beam:from_loaded_module(parallel_throttle_test). {ok,{docsh_beam,parallel_throttle_test, "/home/amoc/amoc/lib/amoc-2.2.0+build.789.ref26c2eb1/ebin/parallel_throttle_test.beam", false}} (amoc@5441117ebf5d)2> {ok, B2} = docsh_beam:from_loaded_module(amoc_controller). {ok,{docsh_beam,amoc_controller, "/home/amoc/amoc/lib/amoc-2.2.0+build.789.reff907221/ebin/amoc_controller.beam", "/home/amoc/amoc/lib/amoc-2.2.0+build.789.reff907221/src/amoc_controller.erl"}} however, it's working fine if we preserve source files in the original location: (amoc@5441117ebf5d)1> {ok,B} = docsh_beam:from_loaded_module(parallel_throttle_test). {ok,{docsh_beam,parallel_throttle_test, "/home/amoc/amoc/lib/amoc-2.2.0+build.789.reff907221/ebin/parallel_throttle_test.beam", "/amoc_build/scenarios/parallel_throttle_test.erl"}}
26c2eb1
to
84ad5ea
Compare
Because when we use amoc (or any other app) as a dependency, we expect it to have a proper list of its own dependencies. Previously we were only including docsh in amoc release, which is now can be used solely for demo purposes. But amoc-arsenal-release didn't have it, and attempts to extract edoc during scenario/info REST calls were crashing. BTW, there are also some issues in parsing edoc for some uploaded scenarios, but I haven't investigated that yet. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
minor fixes