Skip to content

Conversation

moficodes
Copy link
Contributor

Currently in adk deploy cloud_run or gke, the dockerfile copies the agent code after the file permission is set. This can lead to file permission not being set correctly for the container to open and read the file.

This PR will make sure the files are copied with the permission of the user that is set in the container.

@adk-bot adk-bot added bot triaged [Bot] This issue is triaged by ADK bot tools [Component] This issue is related to tools labels Aug 15, 2025
@adk-bot adk-bot requested a review from seanzhou1023 August 15, 2025 16:14
@adk-bot
Copy link
Collaborator

adk-bot commented Aug 15, 2025

Response from ADK Triaging Agent

Hello @moficodes, thank you for creating this PR!

This PR is a bug fix, could you please associate the github issue with this PR? If there is no existing issue, could you please create one?

In addition, could you please include a testing plan section in your PR to talk about how you will test and provide logs or screenshot after the fix is applied?

This information will help reviewers to review your PR more efficiently. Thanks!

@moficodes
Copy link
Contributor Author

@hangfei

@hangfei
Copy link
Collaborator

hangfei commented Aug 15, 2025

Response from ADK Triaging Agent

Hello @moficodes, thank you for creating this PR!

This PR is a bug fix, could you please associate the github issue with this PR? If there is no existing issue, could you please create one?

In addition, could you please include a testing plan section in your PR to talk about how you will test and provide logs or screenshot after the fix is applied?

This information will help reviewers to review your PR more efficiently. Thanks!

@moficodes could you provide your testing plan?

@hangfei
Copy link
Collaborator

hangfei commented Aug 15, 2025

Please also provide an instruction on how to test this.

@vicentefb
Copy link
Contributor

vicentefb commented Aug 15, 2025

The way to test the command out would be through the new adk command like the following:

adk deploy gke --project GKE_PROJECT_ID --cluster_name CLUSTER_NAME --region REGION --with_ui path/to/agent.py/folder/

This is going to create a Deployment and Service K8s resources that you will see in your cluster and then a pod will be running.

Verify the deployment using kubectl:

  1. Check the Pods: Ensure your agent's pods are in the Running state.
kubectl get pods

You should see output like adk-default-service-name-xxxx-xxxx ... 1/1 Running in the default namespace.

  1. Find the External IP: Get the public IP address for your agent's service.
kubectl get service
NAME                       TYPE           CLUSTER-IP      EXTERNAL-IP     PORT(S)        AGE
adk-default-service-name   LoadBalancer   34.118.228.70   34.63.153.253   80:32581/TCP   5d20h

Navigate to the EXTERNAL-IP and interact with your agent via the UI.

Co-authored-by: Vicente Ferrara <[email protected]>
@moficodes
Copy link
Contributor Author

/retest

@moficodes
Copy link
Contributor Author

@hangfei

Could you run the test again?

@DeanChensj
Copy link
Collaborator

Hi @moficodes I just triggered the flow, it seems that you need to run the autoformat.sh in the repo to format your change.

@moficodes
Copy link
Contributor Author

Formatted.

One more test run. :)

@DeanChensj DeanChensj added the ready to pull [Status] This PR is ready to be importing back to Google label Aug 26, 2025
copybara-service bot pushed a commit that referenced this pull request Aug 26, 2025
Merge #2563

Currently in adk deploy cloud_run or gke, the dockerfile copies the agent code after the file permission is set. This can lead to file permission not being set correctly for the container to open and read the file.

This PR will make sure the files are copied with the permission of the user that is set in the container.

COPYBARA_INTEGRATE_REVIEW=#2563 from moficodes:deploy-docker d7f6df4
PiperOrigin-RevId: 799371070
@DeanChensj
Copy link
Collaborator

merged in ad81aa5

Thanks @moficodes and @vicentefb for the help!

@DeanChensj DeanChensj closed this Aug 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bot triaged [Bot] This issue is triaged by ADK bot ready to pull [Status] This PR is ready to be importing back to Google tools [Component] This issue is related to tools
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants