Skip to content

Conversation

@MrCreosote
Copy link
Member

Currently if no service ver is supplied, the job runner will use whatever version is returned by the catalog, which could be surprising for users. This change updates the JR to use release if no service version is supplied, which mirrors the behavior of the original Java callback service.

Currently if no service ver is supplied, the job runner will use
whatever version is returned by the catalog, which could be surprising
for users. This change updates the JR to use `release` if no service
version is supplied, which mirrors the behavior of the original Java
callback service.
@MrCreosote MrCreosote requested a review from bio-boris August 11, 2025 17:38
@bio-boris bio-boris requested a review from Copilot August 11, 2025 17: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 changes the default service version from None (which uses whatever the catalog returns) to "release" when no service version is explicitly provided, making the Python job runner's behavior consistent with the original Java callback service.

  • Updates service version fallback logic across multiple modules to default to "release"
  • Adds comprehensive test coverage for the new default behavior
  • Updates existing test assertions to reflect the new default version handling

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
JobRunner/callback_server.py Updates service version fallback to use "release" as default
JobRunner/MethodRunner.py Applies same default "release" logic with TODO comment about code duplication
JobRunner/JobRunner.py Updates service version resolution to use "release" default
test/test_callback_server_integration.py Adds tests for default service version behavior and updates existing test assertions

nowutc = datetime.utcnow().replace(tzinfo=timezone.utc)
ts = nowutc.replace(microsecond=0).isoformat()

# TODO CODE this code block appears in 4 places in the codebase
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 TODO comment indicates code duplication across 4 locations. Consider extracting the service version resolution logic into a shared utility function to eliminate this duplication and improve maintainability.

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.

This'll happen later, hence the TODO

@codecov
Copy link

codecov bot commented Aug 11, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 81.03%. Comparing base (e8ed9cf) to head (2b0281e).
⚠️ Report is 6 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #111      +/-   ##
==========================================
+ Coverage   80.95%   81.03%   +0.08%     
==========================================
  Files          13       13              
  Lines        1155     1155              
==========================================
+ Hits          935      936       +1     
+ Misses        220      219       -1     

☔ 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.

Copy link
Collaborator

@bio-boris bio-boris left a comment

Choose a reason for hiding this comment

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

There are probably apps that depend on unreleased code that will break as a result of this. We will see.

@MrCreosote
Copy link
Member Author

Installed clients should always send a service version, so these changes should only come into play if someone is rolling their own requests to the CBS, which seems really unlikely.

@MrCreosote MrCreosote merged commit 8a32120 into main Aug 11, 2025
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