fix: remove overlaps between tier1/2 and smoke and mark tests as tier2 by default#1302
Conversation
…2 by default Signed-off-by: Debarati Basu-Nag <dbasunag@redhat.com> Co-Authored-By: Claude <noreply@anthropic.com>
|
The following are automatically added/executed:
Available user actions:
Supported labels{'/lgtm', '/cherry-pick', '/wip', '/hold', '/verified', '/build-push-pr-image'} |
📝 WalkthroughWalkthroughAdds automatic tier2 marker assignment during pytest collection for tests in specific paths (model_registry, model_explainability, model_serving/maas_billing), unless already marked with smoke/tier1/tier2/tier3/pre_upgrade/post_upgrade. Updates test parametrization mark syntax and removes explicit tier2 decorators from test functions. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Issues & ObservationsPath matching fragility: The Implicit marker reassignment: Removing explicit Marker precedence unclear: The logic applies tier2 only if no marker in 🚥 Pre-merge checks | ✅ 1 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (1 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@conftest.py`:
- Around line 304-305: The prefix check using any(item.nodeid.startswith(path)
for path in DEFAULT_TIER2_MARKER_TEST_PATHS) can false-match substrings (e.g.,
"tests/model_registry_extra/..."); update the logic in conftest.py to extract
the test file path from item.nodeid (split off any "::" node part), normalize
both the test path and each candidate in DEFAULT_TIER2_MARKER_TEST_PATHS with
pathlib.Path (or os.path.normpath), and compare using directory-boundary-safe
checks (e.g., compare Path.parts prefixes or use Path.relative_to in a
try/except) so only true path-prefix matches are tagged tier2.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository YAML (base), Central YAML (inherited), Organization UI (inherited)
Review profile: CHILL
Plan: Pro
Run ID: fd16c1d9-f91f-4370-b9f0-3a7d0467d485
📒 Files selected for processing (2)
conftest.pytests/model_registry/model_registry/rest_api/test_model_registry_rest_api.py
|
@dbasunag did you verified with |
|
Status of building tag latest: success. |
Pull Request
Summary
Related Issues
Please review and indicate how it has been tested
Additional Requirements
Summary by CodeRabbit