Skip to content

[AIRE] CI failure: 6 pytest collection errors in run 31448189096 (PR #36) #37

Description

@svc-bcs-agent

Summary

Blossom-CI run 31448189096 failed while testing PR #36 (dev/video-clip-trt-deploy, head 55dda1c).

The GitHub run reports conclusion=success (expected — Blossom-CI bridges to an internal Jenkins), but the mirrored Jenkins log in the "Upload log" job shows the build aborted:

!!!!!!!!!!!!!!!!!!! Interrupted: 6 errors during collection !!!!!!!!!!!!!!!!!!!!
======================= 60 warnings, 6 errors in 13.03s ========================
hudson.AbortException: script returned exit code 2

Detected via: upload_log_scan (Mechanism B — content scan of the mirrored Jenkins log; job conclusions were all success/skipped).


Bug group g1 — pytest "import file mismatch" in tests/video_clip (pr_linked, fixed)

  • failure_class: test_failure (collection error)
  • confidence: high
  • relevant files: tests/video_clip/, tests/clip/
  • job: Upload log (id 93646826005)

Root cause

PR #36 adds a new test directory tests/video_clip/ whose six test modules have basenames identical to the pre-existing tests/clip/ directory:

basename exists in tests/clip/ added in tests/video_clip/
test_config.py yes yes
test_dataloader.py yes yes
test_engine_builder.py yes yes
test_entrypoint.py yes yes
test_evaluation.py yes yes
test_inferencer.py yes yes

Neither tests/clip/ nor tests/video_clip/ contains an __init__.py — they are the only two of the 26 directories under tests/ that are not Python packages (the other 24 all ship one).

Under pytest's default prepend import mode, a test file in a non-package directory is imported under its bare basename (test_config) with its parent inserted onto sys.path. Because both directories are non-packages, tests/clip/test_config.py and tests/video_clip/test_config.py both claim the module name test_config. The second one collected loses:

ERROR collecting tests/video_clip/test_config.py
import file mismatch:
imported module 'test_config' has this __file__ attribute:
  .../tests/clip/test_config.py
which is not the same as the test file we want to collect:
  .../tests/video_clip/test_config.py
HINT: remove __pycache__ / .pyc files and/or use a unique basename for your test file modules

This repeats for all six modules → 6 errors during collection → pytest exits 2 → Jenkins AbortException. Collection is interrupted, so all 275 collected tests are skipped — the failure is not specific to the video_clip code itself.

Fix (in the linked PR)

Add __init__.py to both tests/video_clip/ and tests/clip/, following the convention already used by every other tests/ subpackage (SPDX header + one-line docstring).

With both directories as packages and no tests/__init__.py, pytest walks up to tests/ as the base directory and derives unique fully-qualified module names — clip.test_config vs video_clip.test_config — eliminating the collision. This also makes the two new directories consistent with the rest of the suite rather than special-casing them.


Suggested labels

VRDC, nightly-ci, auto-diagnosed, ci-failure

References


🤖 Filed automatically by AIRE (NVIDIA automated CI agent).

Metadata

Metadata

Assignees

No one assigned

    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