Skip to content

Fix test_telemetry.py import error#1171

Merged
mkbhanda merged 2 commits intoopea-project:mainfrom
ashahba:ashahba/fix-unittest
Jan 17, 2025
Merged

Fix test_telemetry.py import error#1171
mkbhanda merged 2 commits intoopea-project:mainfrom
ashahba:ashahba/fix-unittest

Conversation

@ashahba
Copy link
Copy Markdown
Collaborator

@ashahba ashahba commented Jan 17, 2025

Description

This PR fixes issue with importing opea_telemetry within test_telemetry.py

Issues

Currently tip of main fails with this:
https://github.com/opea-project/GenAIComps/actions/runs/12836942696/job/35799616804

==================================== ERRORS ====================================
___________ ERROR collecting tests/cores/telemetry/test_telemetry.py ___________
ImportError while importing test module '/GenAIComps/tests/cores/telemetry/test_telemetry.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib/python3.10/importlib/__init__.py:126: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
telemetry/test_telemetry.py:8: in <module>
    from comps import opea_telemetry
E   ImportError: cannot import name 'opea_telemetry' from 'comps' (/usr/local/lib/python3.10/dist-packages/opea_comps-1.1-py3.10.egg/comps/__init__.py)

Type of change

List the type of change like below. Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • [N/A] New feature (non-breaking change which adds new functionality)
  • [N/A] Breaking change (fix or feature that would break existing design and interface)
  • [N/A] Others (enhancement, documentation, validation, etc.)

Dependencies

None

Tests

This attempts to fix a failing unit test.

Signed-off-by: Abolfazl Shahbazi <[email protected]>
@ashahba ashahba added the r1.2 label Jan 17, 2025
@ashahba ashahba added this to the v1.2 milestone Jan 17, 2025
@ashahba ashahba self-assigned this Jan 17, 2025
@ashahba ashahba changed the title Fix test_telemetry.py import Fix test_telemetry.py import error Jan 17, 2025
Copy link
Copy Markdown
Collaborator

@mkbhanda mkbhanda left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@mkbhanda mkbhanda merged commit a5daed5 into opea-project:main Jan 17, 2025
@ashahba ashahba deleted the ashahba/fix-unittest branch January 17, 2025 21:57
smguggen pushed a commit to opea-aws-proserve/GenAIComps that referenced this pull request Jan 23, 2025
* Fix test_telemetry.py import

Signed-off-by: Abolfazl Shahbazi <[email protected]>

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Signed-off-by: Abolfazl Shahbazi <[email protected]>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
madison-evans pushed a commit to SAPD-Intel/GenAIComps that referenced this pull request May 12, 2025
* Fix test_telemetry.py import

Signed-off-by: Abolfazl Shahbazi <[email protected]>

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Signed-off-by: Abolfazl Shahbazi <[email protected]>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants