fix(cron): use shared listener port for multiplex fires - #84755
Open
bergusdz wants to merge 1 commit into
Open
Conversation
Contributor
Observations:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Managed Chronos fires for a secondary profile now use the default profile's shared api_server listener port when gateway multiplexing is enabled, while retaining the target profile in the
/p/<profile>/route._gateway_fire_endpoint()previously resolved the target profile's port first and detected multiplexing afterward. A secondary profile withAPI_SERVER_PORT=8701therefore produced127.0.0.1:8701/p/worker_alpha/..., even though multiplex architecture gives the literal default profile sole ownership of the listener (for example port 8642). The dashboard then received 503 and Chronos retried instead of executing the job.Related Issue
Focused follow-up regression in #84339; no separate issue.
Type of Change
Changes Made
hermes_cli/web_server.py: resolve multiplex mode first through canonicalload_gateway_config()under literal-default profile scope, select the listener owner, then apply existing config -> environment -> 8642 port precedence.tests/hermes_cli/test_cron_fire_dashboard.py: cover both process-env multiplexing and an active-secondary dashboard where multiplexing exists only in the literal default config.Non-multiplex per-profile ports, the default bare route, callback authentication, forwarding, retry behavior, and cron storage are unchanged.
How to Test
main: target profile.envport 8701 wins under multiplex instead of default listener port 8642 (1 failed)./p/worker_alpha/...(1 failed).python -m pytest tests/hermes_cli/test_cron_fire_dashboard.py tests/gateway/test_cron_fire_webhook.py tests/gateway/test_multiplex_api_server_routing.py -q->25 passed.python -m ruff check hermes_cli/web_server.py tests/hermes_cli/test_cron_fire_dashboard.py-> clean.Duplicate and intent check
_gateway_fire_endpoint, cron-fire multiplex routing, andAPI_SERVER_PORT; no exact fix exists.Checklist
Code
pytest tests/ -q(targeted and neighboring suites above were run)Documentation & Housekeeping
cli-config.yaml.example: N/ACONTRIBUTING.md/AGENTS.md: N/A