| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
|
Hi @pragnyanramtha , Thank you for your contribution! We appreciate you taking the time to submit this pull request. Your PR has been received by the team and is currently under review. We will provide feedback as soon as we have an update to share. |
Sorry, something went wrong.
|
Hi @sasha-gitg , can you review this. LGTM. |
Sorry, something went wrong.
|
Refreshed this branch with current main in f3e84392. Validation rerun:
|
Sorry, something went wrong.
|
Refreshed this branch with current main in 35d67347. Validation rerun:
|
Sorry, something went wrong.
Merge #5724 ## Summary - allow `GcsArtifactService` to save `Part(text="")` as a valid text artifact - load GCS blobs via `get_blob()` so missing objects are distinct from zero-byte objects - add regression coverage for saving and loading an empty GCS text artifact ## Context The file artifact backend already persists empty text artifacts, but the GCS backend checked `artifact.text` by truthiness and rejected empty strings as missing payloads. It also treated `download_as_bytes() == b""` as a missing artifact, which collapses a valid zero-byte GCS object into `None`. This keeps the existing GCS retrieval shape for text artifacts: they load as `inline_data` with `text/plain`, matching current non-empty text behavior. ## Validation - `uv run --extra test pytest tests/unittests/artifacts/test_artifact_service.py -q` -> 60 passed - `uv run --extra dev pyink --check src/google/adk/artifacts/gcs_artifact_service.py tests/unittests/artifacts/test_artifact_service.py` -> passed - `uv run --extra dev isort --check-only src/google/adk/artifacts/gcs_artifact_service.py tests/unittests/artifacts/test_artifact_service.py` -> passed - `python3 -m py_compile src/google/adk/artifacts/gcs_artifact_service.py tests/unittests/artifacts/test_artifact_service.py` -> passed - `git diff --check` -> passed Co-authored-by: Bo Yang <ybo@google.com> COPYBARA_INTEGRATE_REVIEW=#5724 from pragnyanramtha:pragnyan/gcs-empty-text-artifacts 66aba44 PiperOrigin-RevId: 932789425
|
Thank you @pragnyanramtha for your contribution! 🎉 Your changes have been successfully imported and merged via Copybara in commit 8e2b06d. Closing this PR as the changes are now in the main branch. |
Sorry, something went wrong.
Merge google#5724 ## Summary - allow `GcsArtifactService` to save `Part(text="")` as a valid text artifact - load GCS blobs via `get_blob()` so missing objects are distinct from zero-byte objects - add regression coverage for saving and loading an empty GCS text artifact ## Context The file artifact backend already persists empty text artifacts, but the GCS backend checked `artifact.text` by truthiness and rejected empty strings as missing payloads. It also treated `download_as_bytes() == b""` as a missing artifact, which collapses a valid zero-byte GCS object into `None`. This keeps the existing GCS retrieval shape for text artifacts: they load as `inline_data` with `text/plain`, matching current non-empty text behavior. ## Validation - `uv run --extra test pytest tests/unittests/artifacts/test_artifact_service.py -q` -> 60 passed - `uv run --extra dev pyink --check src/google/adk/artifacts/gcs_artifact_service.py tests/unittests/artifacts/test_artifact_service.py` -> passed - `uv run --extra dev isort --check-only src/google/adk/artifacts/gcs_artifact_service.py tests/unittests/artifacts/test_artifact_service.py` -> passed - `python3 -m py_compile src/google/adk/artifacts/gcs_artifact_service.py tests/unittests/artifacts/test_artifact_service.py` -> passed - `git diff --check` -> passed Co-authored-by: Bo Yang <ybo@google.com> COPYBARA_INTEGRATE_REVIEW=google#5724 from pragnyanramtha:pragnyan/gcs-empty-text-artifacts 66aba44 PiperOrigin-RevId: 932789425
| Back | FazBrowse Home | New Git URL |
Summary
Context
The file artifact backend already persists empty text artifacts, but the GCS backend checked artifact.text by truthiness and rejected empty strings as missing payloads. It also treated download_as_bytes() == b"" as a missing artifact, which collapses a valid zero-byte GCS object into None.
This keeps the existing GCS retrieval shape for text artifacts: they load as inline_data with text/plain, matching current non-empty text behavior.
Validation