Skip to content

feat(build): add targeted .gcloudignore for cdc_services image builds - #6659

Closed
clincoln8 wants to merge 2 commits into
datacommonsorg:masterfrom
clincoln8:feat/cdc-services-gcloudignore
Closed

clincoln8 wants to merge 2 commits into
datacommonsorg:masterfrom
clincoln8:feat/cdc-services-gcloudignore

Conversation

@clincoln8

@clincoln8 clincoln8 commented Sep 18, 2026

Copy link
Copy Markdown
Contributor

Overview

Follow-up to #6655.

When building targeted container images such as datacommons-services using scripts/push_cdc_services_image.sh, gcloud builds submit . packages and uploads a tarball of the local workspace to Cloud Storage.

Because the root .gcloudignore is shared across all builds, it cannot exclude subsystems required by other containers (such as import/ needed by cdc_data, or nl_server/ and tools/). Consequently, push_cdc_services_image.sh needlessly uploads gigabytes of local directories (nl_server, tools, import, docs) during the Cloud Build FETCHSOURCE stage.

Changes

  1. .gcloudignore.cdc_services:
    • Inherits all baseline exclusions from .gcloudignore via #!include:.gcloudignore (.git, **/.venv, node_modules/, etc.).
    • Explicitly excludes subsystems that cdc_services never references: import/, nl_server/, deploy/nl/, tools/, and docs/.
  2. scripts/push_cdc_services_image.sh:
    • Passes --ignore-file=.gcloudignore.cdc_services to gcloud builds submit, drastically reducing upload archive size and build startup latency without affecting any other container builds in the repository.

@gemini-code-assist

Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request optimizes the container build process for the datacommons-services image. By implementing a targeted ignore file, the build process avoids uploading large, irrelevant directories to Cloud Build, resulting in faster startup times and reduced network overhead without impacting other container builds.

Highlights

  • Targeted Build Optimization: Introduced a dedicated .gcloudignore.cdc_services file to exclude unnecessary directories from the container build process.
  • Build Script Update: Updated scripts/push_cdc_services_image.sh to utilize the new ignore file, significantly reducing upload size and build latency.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize the Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counterproductive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a target-specific .gcloudignore.cdc_services file to exclude unused subsystems (such as import/, nl_server/, deploy/nl/, tools/, and docs/) from the cdc_services container builds. It also updates the push_cdc_services_image.sh script to use this new ignore file during the gcloud builds submit process. There are no review comments, and I have no additional feedback to provide.

@clincoln8 clincoln8 closed this Sep 18, 2026
@clincoln8
clincoln8 deleted the feat/cdc-services-gcloudignore branch September 18, 2026 20:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant