Uploaded image for project: 'Hybrid Cloud Console'
  1. Hybrid Cloud Console
  2. RHCLOUD-33187

[Virtual Assistant]: clowdapp optional-deps should propagate through code

XMLWordPrintable

    • 3
    • False
    • Hide

      None

      Show
      None
    • False
    • None
    • Unset
    • No
    • Platform Pipeline Sprint 90

      Virtual-assistant's dependencies in clowder are defined here: https://github.com/RedHatInsights/astro-virtual-assistant/blob/main/deploy/clowdapp.yaml

       

      If a dependency is set as optional, for ex...

          dependencies:
            - advisor-backend
            - notifications-gw
            - notifications-backend
            - content-sources-backend
            - sources-api
            - rhsm-api-proxy
            - ccx-smart-proxy
            - chrome-service
            - rbac
          optionalDependencies:
            - vulnerability-engine
      

      And bonfire is ran with...

      bonfire --optional-deps-method none 

      It will cause an error...

      (iqe-astro-va-plugin) jarice:~/iqe/iqe-astro-va-plugin>oc logs virtual-assistant-api-59b55cf7d6-rjkvr
      Defaulted container "virtual-assistant-api" out of: virtual-assistant-api, crcauth
      Loading clowdapp config from /cdapp/cdappconfig.json
      Traceback (most recent call last):
        File "/opt/virtual-assistant/app.py", line 12, in <module>
          from common import logging
        File "/opt/virtual-assistant/common/logging.py", line 6, in <module>
          from .config import app
        File "/opt/virtual-assistant/common/config/app.py", line 96, in <module>
          vulnerability_url = _config(
        File "/opt/virtual-assistant/.venv/lib/python3.9/site-packages/decouple.py", line 107, in __call__
          return self.get(*args, **kwargs)
        File "/opt/virtual-assistant/.venv/lib/python3.9/site-packages/decouple.py", line 92, in get
          raise UndefinedValueError('{} not found. Declare it as envvar or define a default value.'.format(option))
      decouple.UndefinedValueError: ENDPOINT__VULNERABILITY_ENGINE__MANAGER_SERVICE__URL not found. Declare it as envvar or define a default value.
      
      
       

      Ideally, the dependencies listed in clowdapp.yaml should propagate through the code, such that the VA code can handle the optional dependencies.

      The VA could just respond with "I cannot assist with that topic" for any flows the dependency is not available

       

      The dependencies planned to be optional in "VA-light" in ephemeral will be...

      • vulnerability-engine
      • content-sources-backend

              rh-ee-jorringe Justin Orringer
              rh-ee-jarice Jason Rice
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated: