Skip to content

Set up AlCaVal locally for testing new changes or bug-fixes #49

@saumyaphor4252

Description

@saumyaphor4252

Description

  • The set of instructions for setting up local tests for AlCaVal are outdated. See below log snippet:
alcaval        | [03-Sep-23 06:42:40 UTC][main_thread][INFO] [GET] /api/system/uptime 0.0001s 200 (api_base.py:36)
alcaval        | [03-Sep-23 06:42:40 UTC][main_thread][DEBUG] http://0.0.0.0:8080 "GET /api/system/uptime HTTP/1.1" 200 144 (connectionpool.py:456)
alcaval        | [03-Sep-23 06:42:40 UTC][main_thread][WARNING] Refreshing user credentials in client session (__init__.py:29)
alcaval        | [03-Sep-23 06:42:40 UTC][main_thread][ERROR] Traceback (most recent call last):
alcaval        |   File "/usr/src/app/core_lib/api/api_base.py", line 84, in exceptions_to_errors_wrapper
alcaval        |     return func(*args, **kwargs)
alcaval        |   File "/usr/src/app/api/system_api.py", line 79, in get
alcaval        |     user_info = UserInfo().get_user_info()
alcaval        |   File "/usr/src/app/core_lib/utils/user_info.py", line 18, in get_user_info
alcaval        |     raise Exception('Session is expired. Please reload the page!')
alcaval        | Exception: Session is expired. Please reload the page!
alcaval        |  (api_base.py:86)
alcaval        | [03-Sep-23 06:42:40 UTC][main_thread][INFO] [GET] /api/system/user_info 0.0004s 400 (api_base.py:36)
alcaval        | [03-Sep-23 06:42:40 UTC][main_thread][DEBUG] http://0.0.0.0:8080 "GET /api/system/user_info HTTP/1.1" 400 102 (connectionpool.py:456)
alcaval        | Traceback (most recent call last):
alcaval        |   File "/usr/local/lib/python3.9/site-packages/flask/app.py", line 2095, in __call__
alcaval        |     return self.wsgi_app(environ, start_response)
alcaval        |   File "/usr/local/lib/python3.9/site-packages/flask/app.py", line 2080, in wsgi_app
alcaval        |     response = self.handle_exception(e)
alcaval        |   File "/usr/local/lib/python3.9/site-packages/flask_cors/extension.py", line 165, in wrapped_function
alcaval        |     return cors_after_request(app.make_response(f(*args, **kwargs)))
alcaval        |   File "/usr/local/lib/python3.9/site-packages/flask_restful/__init__.py", line 271, in error_router
alcaval        |     return original_handler(e)
alcaval        |   File "/usr/local/lib/python3.9/site-packages/flask/app.py", line 2077, in wsgi_app
alcaval        |     response = self.full_dispatch_request()
alcaval        |   File "/usr/local/lib/python3.9/site-packages/flask/app.py", line 1525, in full_dispatch_request
alcaval        |     rv = self.handle_user_exception(e)
alcaval        |   File "/usr/local/lib/python3.9/site-packages/flask_cors/extension.py", line 165, in wrapped_function
alcaval        |     return cors_after_request(app.make_response(f(*args, **kwargs)))
alcaval        |   File "/usr/local/lib/python3.9/site-packages/flask_restful/__init__.py", line 271, in error_router
alcaval        |     return original_handler(e)
alcaval        |   File "/usr/local/lib/python3.9/site-packages/flask/app.py", line 1523, in full_dispatch_request
alcaval        |     rv = self.dispatch_request()
alcaval        |   File "/usr/local/lib/python3.9/site-packages/flask/app.py", line 1509, in dispatch_request
alcaval        |     return self.ensure_sync(self.view_functions[rule.endpoint])(**req.view_args)
alcaval        |   File "/usr/src/app/application/home_view.py", line 9, in index
alcaval        |     return render_template('Home.html.jinja', user_name=user['response']['fullname'], user=user)
alcaval        | TypeError: 'NoneType' object is not subscriptable

  • Needs to be updated so that the fixes and testing could be done locally before making PR for Dev or Prod

Checklist

  • Docker engine and compose set up commands step by step
  • Set up and run AlCaVal
  • How to make and test new changes or bugfixes

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions