Add serverless Cloud Run Job deployment for the Python A4D pipeline#4
Add serverless Cloud Run Job deployment for the Python A4D pipeline#4
Conversation
…rverless GCP deployment Co-authored-by: pmayd <9614291+pmayd@users.noreply.github.com>
|
@copilot it seems you have prepared the r pipeline to run serverless but I wanted the new python version to be deployed. Check the branch migration and also change the target of this MR to migration branch and prepare the Python pipeline to be deployed |
…line CLI command, update deploy.sh Co-authored-by: pmayd <9614291+pmayd@users.noreply.github.com>
Done in b57b483. The PR now targets the Python pipeline from the migration branch:
Regarding the PR target: I can't change the target branch programmatically — you'll need to retarget it from |
|
@copilot the changes are not looking right, even though migration is correctly selected as target branch there are too many new changes, basically all existing files in the migration branch are listed as new files with 84 new files or file changes, so something is very wrong with this MR |
…oyment files Co-authored-by: pmayd <9614291+pmayd@users.noreply.github.com>
Fixed in c488a8c. The branch was grafted from a commit that predated the
|
|
@copilot no sorry the GitHub UI is showing me 92 changed files so this is not really a clean MR. |
…ilot/setup-serverless-pipeline
Fixed in f3910a2. The root cause was that our branch shared only a very old commit with
|
|
@copilot why are we in Python 3.11? Is there a reason like incompatibility? If not we should update to the latest supported Python version and update code and tests and check if everything works as Python 3.14 has many advantages over 3.11 |
Co-authored-by: pmayd <9614291+pmayd@users.noreply.github.com>
Updated to Python 3.13 in e6241f8 ( Python 3.14 isn't viable yet for this project: the key dependency |
|
@copilot explain to me where and why and how we are using duckdb |
Co-authored-by: pmayd <9614291+pmayd@users.noreply.github.com>
Because it was the only dependency without Python 3.14 wheels (only
Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
|
@copilot you now have access to url endoflife.date |
Adds everything needed to deploy and trigger the Python pipeline (
a4d-python/) as a serverless Cloud Run Job — containerised, manually triggerable, no VM required. This PR targets themigrationbranch.Changes
a4d-python/Dockerfile— Fixed and production-ready: build context is the repo root (-f a4d-python/Dockerfile .) soreference_data/can be copied in; includesuv.lock; usesuv sync --frozen --no-dev(production-only deps); splitRUNlayers for Docker cache efficiency; upgraded to Python 3.14 (all key dependencies support 3.14);CMDrunsuv run a4d run-pipelinea4d-python/pyproject.toml— Removed unusedduckdbdependency; updatedrequires-python = ">=3.14"and rufftarget-version = "py314"a4d-python/uv.lock— Regenerated withoutduckdb; all 69 remaining packages resolve cleanly on Python 3.14a4d-python/src/a4d/cli.py— Newrun-pipelinecommand that chains all pipeline steps end-to-end:Supports
--skip-uploadfor local testing and--forceto reprocess all files..dockerignore— Excludes.git, IDE files, pytest/ruff caches, andsecrets/from the Docker build contextscripts/gcp/deploy.sh— Builds the image from the repo root and pushes to Artifact Registry, deploys as a Cloud Run Job (8 GiB RAM, 4 CPUs, 3 h timeout, 0 retries), uses Workload Identity / ADC (no JSON key required), passesA4D_*environment variables.github/workflows/python-ci.yml— Upgraded CI to use Python 3.14Usage
One-time deploy (run from repo root):
Manually trigger the pipeline:
gcloud run jobs execute a4d-pipeline \ --region=europe-west1 --project=a4d-315220 --waitLocal testing without GCS/BigQuery uploads:
Required GCP prerequisites (one-time setup)
storage.objectViewer,storage.objectCreator,bigquery.dataEditor,bigquery.jobUserNotes
duckdbwas listed as a dependency but was never imported or used anywhere in the source code or tests. Removing it unblocked upgrading to Python 3.14, sinceduckdbonly had pre-built wheels up tocp313. All remaining binary dependencies (polars,fastexcel) useabi3stable-ABI wheels compatible with Python 3.14+.Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.