Skip to content
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

Merged
merged 4 commits into from
Jul 19, 2021
Merged

Fixing docsh dependency #138

merged 4 commits into from
Jul 19, 2021

Commits on Jul 17, 2021

  1. Configuration menu
    Copy the full SHA
    5afcf6d View commit details
    Browse the repository at this point in the history
  2. renaming 'prod' target into 'demo'

    '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
    DenysGonchar committed Jul 17, 2021
    Configuration menu
    Copy the full SHA
    bbe7d7c View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    f907221 View commit details
    Browse the repository at this point in the history

Commits on Jul 18, 2021

  1. preserving original location of amoc scenarios source code files.

    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"}}
    DenysGonchar committed Jul 18, 2021
    Configuration menu
    Copy the full SHA
    84ad5ea View commit details
    Browse the repository at this point in the history