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"}}