Skip to content

Conversation

@alxtkr77
Copy link
Member

@alxtkr77 alxtkr77 commented Jan 11, 2026

📝 Description

Make pod log collection on test failure opt-in instead of collecting for all tests. This reduces noise from excessive log collection during system tests.

Tests that want log collection on failure now need to add the @pytest.mark.collect_pod_logs marker.


🛠️ Changes Made

  • Add check for collect_pod_logs pytest marker in _collect_pod_logs_on_failure()
  • Register the marker in pyproject.toml to avoid pytest warnings

✅ Checklist

  • I updated the documentation (if applicable)
  • I have tested the changes in this PR

🧪 Testing

  • Verified linting passes
  • Verified existing tests pass

🔗 References


🚨 Breaking Changes?

  • Yes (explain below)
  • No

🔍️ Additional Notes

Usage example:

@pytest.mark.collect_pod_logs
def test_something(self):
    ...

Pod log collection on test failure was collecting too much data.
Make it opt-in by requiring @pytest.mark.collect_pod_logs marker.

Tests that want log collection on failure can add the marker:
    @pytest.mark.collect_pod_logs
    def test_something(self):
        ...
@assaf758 assaf758 merged commit d1859e1 into mlrun:development Jan 11, 2026
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants