test: Gather and upload CI logs#30
Conversation
Signed-off-by: Derek Higgins <derekh@redhat.com>
WalkthroughAdds two always-run steps to the build-test-push job in the GitHub Actions workflow: one to gather container logs, system info, and integration-test artifacts into a logs/ directory; another to upload that directory as an artifact named ci-logs-${{ github.sha }} with 7-day retention. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
participant GH as GitHub Actions
participant Job as build-test-push job
participant C as Containers (llama-stack, vllm)
participant FS as Filesystem (/tmp, logs/)
participant Art as upload-artifact
GH->>Job: Run integration tests (existing)
Note over Job: Post-tests phase
Job->>Job: Gather logs and debugging information (always)
rect rgba(230,245,255,0.6)
Job->>FS: mkdir -p logs/
Job->>C: docker logs llama-stack > logs/llama-stack.log (fallback message on failure)
Job->>C: docker logs vllm > logs/vllm.log (fallback message on failure)
Job->>FS: Collect system info -> logs/system-info.log
Job->>FS: Copy /tmp/llama-stack-integration-tests -> logs/ (if exists)
end
Job->>Art: Upload logs/ as ci-logs-${{ github.sha }} (always, retention: 7 days)
Note over GH,Art: Artifact available for later inspection
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (3)
.github/workflows/redhat-distro-container.yml (3)
88-99: Header isn’t captured in system-info log.Move the header inside the redirection block; optionally include docker info for context.
- # Gather system information - echo "=== System information ===" - { + # Gather system information + { + echo "=== System information ===" echo "Disk usage:" df -h echo "Memory usage:" free -h + echo "Docker info:" + docker info echo "Docker images:" docker images echo "Docker containers:" docker ps -a } > logs/system-info.log 2>&1
101-106: Avoid filename collisions; preserve structure and compress artifacts.Copying basenames can overwrite files. Archive the directory instead.
- echo "=== Integration test artifacts ===" - if [ -d "/tmp/llama-stack-integration-tests" ]; then - find /tmp/llama-stack-integration-tests -name "*.log" -o -name "pytest.log" -o -name "*.out" 2>/dev/null | while read -r file; do - cp "$file" "logs/$(basename "$file")" || true - done - fi + echo "=== Integration test artifacts ===" + if [ -d "/tmp/llama-stack-integration-tests" ]; then + tar -C /tmp -czf logs/integration-tests.tgz llama-stack-integration-tests || true + fi
108-115: Optional: don’t fail if logs are empty.Guard against edge cases where no files exist.
- name: Upload logs as artifacts if: always() uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.7.0 with: name: ci-logs-${{ github.sha }} path: logs/ + if-no-files-found: warn retention-days: 7
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
.github/workflows/redhat-distro-container.yml(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: build-test-push (linux/amd64)
nathan-weinberg
left a comment
There was a problem hiding this comment.
Great addition - manually checked the logs from this PR run and everything LGTM
Summary by CodeRabbit