Skip to content

Conversation

@MrCreosote
Copy link
Member

Update the callback server to keep track of what job IDs exist. Previously it couldn't tell the difference between an incomplete job and a job that never existed.

Update the callback server to keep track of what job IDs exist.
Previously it couldn't tell the difference between an incomplete job
and a job that never existed.
@MrCreosote MrCreosote requested a review from bio-boris August 11, 2025 20:18
@codecov
Copy link

codecov bot commented Aug 11, 2025

Codecov Report

❌ Patch coverage is 68.75000% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 80.85%. Comparing base (80ffb3d) to head (4c86ab9).
⚠️ Report is 8 commits behind head on main.

Files with missing lines Patch % Lines
JobRunner/callback_server.py 68.75% 5 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #113      +/-   ##
==========================================
- Coverage   81.03%   80.85%   -0.19%     
==========================================
  Files          13       13              
  Lines        1155     1165      +10     
==========================================
+ Hits          936      942       +6     
- Misses        219      223       +4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@MrCreosote
Copy link
Member Author

Standard coverage issue where pytest can't see the lines being covered since they're running in a different Sanic worker process

@bio-boris bio-boris requested a review from Copilot August 11, 2025 20:41
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR updates the callback server to track job IDs and differentiate between incomplete jobs and non-existent jobs. Previously, the server couldn't distinguish between these cases when checking job status.

  • Added job ID validation to ensure only valid UUIDs are accepted
  • Implemented tracking of all submitted job IDs in the outputs dictionary
  • Enhanced error handling to return specific error messages for invalid or non-existent job IDs

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.

File Description
JobRunner/callback_server.py Added job ID validation, tracking, and enhanced error handling for check job operations
test/test_callback_server_integration.py Added comprehensive test coverage for job validation and error scenarios

import os
import pytest
import requests
import socket
Copy link

Copilot AI Aug 11, 2025

Choose a reason for hiding this comment

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

The socket import is moved but appears to be duplicated. There's already an import socket statement after line 16 that should be removed to avoid redundancy.

Copilot uses AI. Check for mistakes.
Copy link
Member Author

Choose a reason for hiding this comment

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

That "duplicate line" is a deletion

@MrCreosote MrCreosote merged commit 0783c11 into main Aug 11, 2025
10 of 12 checks passed
@bio-boris bio-boris mentioned this pull request Aug 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants