fix: update default server port from 8000 to 8080#439
Conversation
| 'Optional. The port of the server', | ||
| ).default('8000'); | ||
| 'Optional. The port of the server. Default: 8080', | ||
| ).default('8080'); |
There was a problem hiding this comment.
Thanks for the contribution!
we need to keep the 8000 for local setup to keep the parity with Python ADK.
We need to update the port value explicitly for deploy commands only
There was a problem hiding this comment.
ok, I understand.
So it is the agent Engine which need to be hardcoded to port 8080.
I have drafted a commit for this change incl. tests
…ent Engine deployment
| description: options['description'], | ||
| tempFolder: options['temp_folder'], | ||
| port: parseInt(options['port'], 10), | ||
| port: 8080, // Agent Engine requires fixed port of 8080 |
There was a problem hiding this comment.
Sorry, but we need to respect the option provided by the user.
So we should keep the line 439 and just override the default value here
There was a problem hiding this comment.
I additionally removed the Port option for agent engine deployments, so we do not override any user input. (see line 439) Agent Engine does not support any port config and requires 8080 by hard.
#438
The default port for the ADK CLI (api_server and web commands) needs to be updated from 8000 to 8080.
Context & Necessity
Google Cloud Agent Engine's underlying infrastructure runs on top of Google Cloud Run, which expects the deployed container to listen on and expose port 8080 by default.
Currently, when deploying to Agent Engine, the custom port option specified via the CLI or configuration is not fully passed down/honored by the underlying Agent Engine orchestration layers. As a result, if the ADK server defaults to port 8000, the container will listen on 8000, but Cloud Run will attempt to route traffic and health checks to port 8080. This mismatch causes deployment to fail with container startup timeouts or health check failures.
By changing the default port in the ADK CLI to 8080, we ensure that out-of-the-box deployments align with the Cloud Run / Agent Engine expectations without requiring manual port configuration or facing deployment failures.