maszmarius opened a new pull request, #77532:
URL: https://github.com/apache/airflow/pull/77532
# Title
Clean up Vertex AI endpoints left behind by system tests
# Body
The generative model tuning system test never removed the endpoints that
Gemini supervised
fine-tuning jobs automatically create for each tuned model, so every run
left two endpoints
behind and slowly exhausted the endpoint quota in projects where system
tests run regularly.
The endpoint service system test left its endpoint behind when a retried
`deploy_model` created
a second deployed model (the first deploy completed despite a transient API
error), or when
`deploy_model` failed, because `undeploy_model` and `delete_endpoint` then
fail or are skipped.
Both Dags now have an `ALL_DONE` teardown that undeploys all remaining
models and deletes the
endpoint, sharing one small helper in the system tests.
Tuned model endpoints are created in the `us` multi-region.
`EndpointServiceHook` could not
reach them because it built a non-existent `us-aiplatform.googleapis.com`
host; multi-region
locations are only served from `aiplatform.<location>.rep.googleapis.com`.
**Testing**
-
`providers/google/tests/unit/google/cloud/hooks/vertex_ai/test_endpoint_service.py`:
passed.
- System test `example_vertex_ai_endpoint.py`: passed.
- System test `example_gen_ai_generative_model_tuning.py` before the hook
fix: tuning tasks
passed, the teardown failed with `501 ... invalid regional endpoint` for
`projects/.../locations/us/endpoints/...`, which is what the hook change
addresses.
---
##### Was generative AI tooling used to co-author this PR?
- [X] Yes — Antigravity (Claude Opus 5.5)
Generated-by: Antigravity (Claude Opus 5.5) following [the
guidelines](https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#gen-ai-assisted-contributions)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]