adk deploy ignores .gitignore patterns that start with **/
I maintainer di solito rispondono entro 3 giorni
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 25/100
Direzione di ricerca
Start with _get_ignore_patterns_func in cli/cli_deploy.py, which passes the ignore patterns to shutil.ignore_patterns. Leading **/ patterns contain a slash and never match a bare file or folder name, so the stripping logic there needs to handle them. Check the gitignore-style cases listed in the issue, including the trailing slash in **/__pycache__/. Done means copying an agent folder with that function leaves out node_modules and __pycache__ directories. A linked pull request (#8296) is already open, so check it before starting.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
🔴 Required Information
Describe the Bug:
adk deploy reads .gitignore, .gcloudignore and .ae_ignore from the agent folder, but patterns with a leading **/ never match anything. Paths such as **/node_modules or **/__pycache__/ are common in these files, and the matching files and folders are still copied into the deployment.
_get_ignore_patterns_func in cli/cli_deploy.py passes the patterns to shutil.ignore_patterns, which compares them with file and folder names, not paths. **/node_modules contains a /, so it never equals a name. Root-anchored patterns such as /.venv already have their leading / stripped for the same reason.
Steps to Reproduce:
- In an agent folder, create
node_modules/pkg/index.js,sub/__pycache__/x.pycand a.gitignorewith:**/node_modules **/__pycache__/ - Run
adk deploy cloud_run(oragent_engine/gke), or copy the folder the way the deploy commands do:import shutil from google.adk.cli.cli_deploy import _get_ignore_patterns_func shutil.copytree("agent", "out", ignore=_get_ignore_patterns_func("agent")) - Look at what was copied.
Expected Behavior:
node_modules and __pycache__ are left out, as they are by git and gcloud.
Observed Behavior:
Both are copied: out/node_modules/pkg/index.js and out/sub/__pycache__/x.pyc exist.
Environment Details:
- ADK Library Version: 2.15.0 (
mainat 2b90353) - Desktop OS: Linux
- Python Version: 3.12.13
Model Information:
- Are you using LiteLLM: No
- Which model is being used: N/A
🟡 Optional Information
Additional Context:
In .gitignore syntax, a leading **/ means "in any directory", which is what a plain name already matches, so stripping it gives the same result. Patterns with a / in the middle (like docs/build) also never match today, but I'd leave those alone, since approximating them could drop files the agent needs.
How often has this issue occurred?:
- Always (100%)
- Lingua principale
- Python
- Stelle
- 22.3k
- Fork
- 4.4k
- Merge medio
- 1g 2h
- PR unite (30g)
- 6
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di google/adk-python
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
google/adk-python#8360 ·
I maintainer di solito rispondono entro 3 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
google/adk-python#8359 ·
I maintainer di solito rispondono entro 3 giorni
-
Can pin to litellm version be changed?Forse già presa @llalitkumarrr l’ha presa 10 giorni fa. Apertamodels
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 65/100
google/adk-python#8129 · 2 commenti · 1 assegnatario ·
I maintainer di solito rispondono entro 3 giorni
-
OpenAPI tools ignore operation- and path-level server overridesForse già presa @sanketpatil06 l’ha presa 14 giorni fa. Apertatools
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
google/adk-python#8064 · 4 commenti · 1 assegnatario ·
I maintainer di solito rispondono entro 3 giorni
-
Two docstrings in openapi_tool document parameters the signatures do not acceptForse già presa @surajksharma07 l’ha presa 17 giorni fa. Aperta
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 88/100
google/adk-python#8024 · 1 commento · 1 assegnatario ·
I maintainer di solito rispondono entro 3 giorni
Tutte le issue di google/adk-python
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
vllm-project/vllm#70030 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
TigreGotico/tugaphone#408 ·
I maintainer di solito rispondono entro 1 giorno
-
t: bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 3 giorni
-
needs-triage
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 85/100
Azure/azure-sdk-for-python#50155 · 1 reazione ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
I maintainer di solito rispondono entro 1 giorno