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

Regression: errors out if no indy #1237

Closed
dbluhm opened this issue Jun 10, 2021 · 5 comments · Fixed by #1236
Closed

Regression: errors out if no indy #1237

dbluhm opened this issue Jun 10, 2021 · 5 comments · Fixed by #1236

Comments

@dbluhm
Copy link
Contributor

dbluhm commented Jun 10, 2021

We've inadvertently made indy a requirement again with recent changes. Using the following dockerfile:

FROM bcgovimages/von-image:py36-1.16-0
RUN pip install git+https://github.com/hyperledger/aries-cloudagent-python@main
RUN yes | pip uninstall python3-indy

ENTRYPOINT ["/bin/bash", "-c", "aca-py \"$@\"", "--"]

CMD ["start", "-it", "http", "0.0.0.0", "3000", "-ot", "http", "-e", "http://localhost:3000", "--admin", "0.0.0.0", "3001", "--admin-insecure-mode", "--no-ledger"]

The following error occurs:

Traceback (most recent call last):
  File "/home/indy/.pyenv/versions/3.6.13/lib/python3.6/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/home/indy/.pyenv/versions/3.6.13/lib/python3.6/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/home/indy/.pyenv/versions/3.6.13/lib/python3.6/site-packages/aries_cloudagent/__main__.py", line 74, in <module>
    main(sys.argv)
  File "/home/indy/.pyenv/versions/3.6.13/lib/python3.6/site-packages/aries_cloudagent/__main__.py", line 71, in main
    run(args)
  File "/home/indy/.pyenv/versions/3.6.13/lib/python3.6/site-packages/aries_cloudagent/__main__.py", line 64, in run
    run_command(command, args)
  File "/home/indy/.pyenv/versions/3.6.13/lib/python3.6/site-packages/aries_cloudagent/commands/__init__.py", line 36, in run_command
    module = load_command(command) or load_command("help")
  File "/home/indy/.pyenv/versions/3.6.13/lib/python3.6/site-packages/aries_cloudagent/commands/__init__.py", line 31, in load_command
    return import_module(module_path)
  File "/home/indy/.pyenv/versions/3.6.13/lib/python3.6/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 994, in _gcd_import
  File "<frozen importlib._bootstrap>", line 971, in _find_and_load
  File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 665, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 678, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/home/indy/.pyenv/versions/3.6.13/lib/python3.6/site-packages/aries_cloudagent/commands/start.py", line 16, in <module>
    from ..core.conductor import Conductor
  File "/home/indy/.pyenv/versions/3.6.13/lib/python3.6/site-packages/aries_cloudagent/core/conductor.py", line 35, in <module>
    from ..protocols.out_of_band.v1_0.manager import OutOfBandManager
  File "/home/indy/.pyenv/versions/3.6.13/lib/python3.6/site-packages/aries_cloudagent/protocols/out_of_band/v1_0/manager.py", line 16, in <module>
    from ....indy.models.xform import indy_proof_req_preview2indy_requested_creds
  File "/home/indy/.pyenv/versions/3.6.13/lib/python3.6/site-packages/aries_cloudagent/indy/models/xform.py", line 5, in <module>
    from .pres_preview import IndyPresPreview
  File "/home/indy/.pyenv/versions/3.6.13/lib/python3.6/site-packages/aries_cloudagent/indy/models/pres_preview.py", line 9, in <module>
    from ...ledger.indy import IndySdkLedger
  File "/home/indy/.pyenv/versions/3.6.13/lib/python3.6/site-packages/aries_cloudagent/ledger/indy.py", line 14, in <module>
    import indy.ledger
ModuleNotFoundError: No module named 'indy'

I believe this might have been introduced with #1125 @shaangill025

@dbluhm
Copy link
Contributor Author

dbluhm commented Jun 10, 2021

@Luis-GA related to the issue we were seeing from acapy-resolver-universal

@TimoGlastra
Copy link
Contributor

Maybe good to add a Github Action script that builds and start ACA-Py using the above docker script?

@dbluhm
Copy link
Contributor Author

dbluhm commented Jun 10, 2021

@TimoGlastra agreed; we should be able to catch this on PRs without too much difficulty. Or else, making the unit test runner for non-indy tests not actually have python3-indy available in the python environment.

@shaangill025
Copy link
Contributor

@dbluhm Any ideas when was the last time this was working? I used the above docker script to test with edfd5b52abd3f2fb4dbf30351cde35560bbb1242 [from May] and b926cac23ed783adbd862ca49d760446acb005fb [from January] commits and get the same error. I believe this might have been an issue since the OOB protocol was implemented earlier this year. I am working on a fix.

@dbluhm
Copy link
Contributor Author

dbluhm commented Jun 10, 2021

@TimoGlastra fixed this once before with #1129 so it was working as expected semi-recently

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants