Poll private deployed agents by canonical URL
All checks were successful
build / build (push) Successful in 4s

This commit is contained in:
robert
2026-06-02 16:12:45 -03:00
parent 05502a3cc0
commit cedb84d3e1
2 changed files with 32 additions and 1 deletions

View File

@@ -12,6 +12,7 @@ from agent_builder.tools import (
_BUILDER_STATE_FILE,
_BUILDER_INTERNAL_PREFIX,
_parse_manifest_json,
_deploy_poll_url,
_deployment_drift_error,
_files_from_tarball,
_parse_supporting_skill_files,
@@ -356,6 +357,22 @@ class TemplateInitTests(unittest.TestCase):
self.assertIn("no CP JWT", result["error"])
def test_deploy_poll_url_falls_back_to_private_canonical_route(self) -> None:
self.assertEqual(
_deploy_poll_url({"url": None}, "private-agent"),
"https://private-agent.a2acloud.io",
)
self.assertEqual(
_deploy_poll_url(
{
"expected_url": "https://expected.a2acloud.io",
"url": "https://public.a2acloud.io",
},
"private-agent",
),
"https://expected.a2acloud.io",
)
def _tarball(files: dict[str, str]) -> bytes:
buf = io.BytesIO()