URGENT: Persistent Cloud Build Cache Corruption Blocking Cloud Run Deployment (New Project Fails with Old Code)

Project Details:

  • Original Project ID: (PII Removed by Staff)

  • New Project ID (Issue persists here): compliance-checker-final

  • Service Name: (PII Removed by Staff)

  • Region: asia-southeast1

Problem Summary: We are experiencing an issue where a Cloud Run deployment persistently runs an outdated version of our source code, despite all cache-busting measures. The specific symptom is a crash indicating an incorrect import method that has been corrected in the source file multiple times. This issue persists even when deploying to a brand-new Google Cloud Project.

Specific Error Symptom (Found in Logs): Despite applying the latest code fix (explicit CommonJS import syntax), the service consistently fails on startup:

/usr/src/app/app.js:12 const ai = new GoogleGenerativeAI(apiKey); ^ TypeError: GoogleGenerativeAI is not a constructor

Client-Side Troubleshooting Steps Taken (All Failed):

  1. Code Fixes: Applied multiple fixes, including the final, explicit CommonJS syntax: const GoogleGenerativeAI = require('@google/genai').GoogleGenerativeAI;.

  2. Environment Bypasses: Created a brand new Google Cloud Project (compliance-checker-final) and switched context.

  3. Deployment Bypasses:

    • All gcloud builds submit commands used the --no-cache flag.

    • Used multiple image tags (:v4 through :v9).

    • The Dockerfile was modified to use explicit COPY app.js . commands to prevent ambiguity.

Request: We believe this is an unprecedented Cloud Build/Cloud Run systemic cache corruption on the backend that is not respecting client-side commands. Please investigate and manually clear any build artifacts or caches associated with this repository/account that may be injecting the outdated code during the build process.