Skip to content

Improve logging on failure #51

@arnaudsjs

Description

@arnaudsjs

When the lsm-quickstart jenkins job fails, it reports a timeout on a certain condition. For example, when the export of the service definition fails it gives the following output:

Waiting until the Inmanta server has finished starting...
Creating project env-test
Creating environment dev in project env-test
Exporting service definition
Waiting until the service definition is available in the catalog...
Traceback (most recent call last):
  File "/home/jenkins/workspace/m_issue_use-nokia-srlinux-module/lsm-srlinux/venv/lib64/python3.9/site-packages/inmanta_tests/utils.py", line 65, in retry_limited
    await util.retry_limited(fun, timeout, interval, *args, **kwargs)
  File "/home/jenkins/workspace/m_issue_use-nokia-srlinux-module/lsm-srlinux/venv/lib64/python3.9/site-packages/inmanta/util.py", line 515, in retry_limited
    raise asyncio.TimeoutError(f"Wait condition was not reached after hard limit of {hard_timeout} seconds")
asyncio.exceptions.TimeoutError: Wait condition was not reached after hard limit of 600 seconds

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/jenkins/workspace/m_issue_use-nokia-srlinux-module/lsm-srlinux/ci/do_test_deployment_and_verify.py", line 82, in <module>
    asyncio.get_event_loop().run_until_complete(main())
  File "/usr/lib64/python3.9/asyncio/base_events.py", line 647, in run_until_complete
    return future.result()
  File "/home/jenkins/workspace/m_issue_use-nokia-srlinux-module/lsm-srlinux/ci/do_test_deployment_and_verify.py", line 50, in main
    await retry_limited(is_service_definition_available, timeout=600, interval=1)
  File "/home/jenkins/workspace/m_issue_use-nokia-srlinux-module/lsm-srlinux/venv/lib64/python3.9/site-packages/inmanta_tests/utils.py", line 67, in retry_limited
    raise AssertionError("Bounded wait failed")
AssertionError: Bounded wait failed

This makes it hard to figure out what the problem is. This ticket should improve the error logging in general.

Metadata

Metadata

Assignees

No one assigned

    Labels

    processThis ticket is about improving the development process or reducing technical depth

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions