Skip to content

Commit 77e8ff0

Browse files
Copilotbrabster
andauthored
Remove dbt-bigquery cache warming (#42)
* Initial plan * Remove dbt-bigquery cache warming from Docker build Co-authored-by: brabster <[email protected]> * Update documentation to reflect dbt-bigquery removal Co-authored-by: brabster <[email protected]> * Update feature document to remove outdated cache warming reference Co-authored-by: brabster <[email protected]> * Add security posture analysis to changelog and update copilot instructions Co-authored-by: brabster <[email protected]> * Update changelog to reference PR #42 Co-authored-by: brabster <[email protected]> --------- Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: brabster <[email protected]>
1 parent 94c4a71 commit 77e8ff0

File tree

6 files changed

+38
-17
lines changed

6 files changed

+38
-17
lines changed

.github/copilot-instructions.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
## Project overview
22

3-
This repository produces container images for data-centric development on Google Cloud Platform. The images include Terraform, Google Cloud SDK, Python, and dbt-bigquery. They are designed for use in GitHub Codespaces and GitHub Actions.
3+
This repository produces container images for data-centric development on Google Cloud Platform. The images include Terraform, Google Cloud SDK, and Python. They are designed for use in GitHub Codespaces and GitHub Actions.
44

55
**Always review `GEMINI.md` for complete project information, goals, and principles.**
66

@@ -81,6 +81,17 @@ Code reviews must include:
8181

8282
The reviewer must strive to identify impactful changes, rather than cosmetic or stylistic changes.
8383

84+
## Changelog requirements
85+
86+
All changelog entries must include:
87+
88+
- A **Security** section that analyzes the security posture impact of the change
89+
- The security analysis should include:
90+
- Direct security implications of the change (e.g., reduced attack surface, improved authentication)
91+
- **Supply Chain Posture Impact** or **Threat Model Impact** subsection explaining how the change affects security
92+
- **Security Posture Impact** conclusion (Positive, Neutral, or Negative)
93+
- See existing entries in `CHANGELOG.md` for examples of the required format and level of detail
94+
8495
## Responding to review feedback
8596

8697
When addressing code review comments:

CHANGELOG.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,30 @@ All notable changes to this project will be documented in this file.
44

55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
66

7+
## [[#41](https://github.com/brabster/terraform-bootstrap-gcp/pull/42)] - Remove dbt-bigquery cache warming
8+
9+
### Removed
10+
11+
- Removed dbt-bigquery cache warming from the Docker build process.
12+
- Deleted requirements.txt file used for pre-warming the pip cache.
13+
- Removed dbt-bigquery from the dependencies table in README as it is no longer pre-installed.
14+
15+
### Changed
16+
17+
- Updated README to remove documentation about pre-warmed pip cache for dbt-bigquery.
18+
19+
### Rationale
20+
21+
The cache warming provided minimal benefit while adding complexity to the build process and image size. Users can install dbt-bigquery and other Python packages as needed for their specific use case.
22+
23+
### Security
24+
25+
- Removing pre-installed Python packages reduces the attack surface by eliminating dependencies that may not be needed by all users.
26+
- Simplifies the supply chain by removing dbt-bigquery and its transitive dependencies from the image.
27+
28+
- **Supply Chain Posture Impact:** This change improves the project's supply chain security posture by removing unnecessary dependencies from the base image. Users now explicitly install only the Python packages they need, reducing the number of packages that must be monitored for vulnerabilities. This aligns with the principle of minimal dependencies and reduces the image's attack surface.
29+
- **Security Posture Impact:** Positive
30+
731
## [[#35](https://github.com/brabster/terraform-bootstrap-gcp/pull/36)] - Add git CLI completion support
832

933
### Added

Dockerfile

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -58,13 +58,3 @@ RUN --mount=type=secret,id=proxy_cert,required=false \
5858
USER ubuntu
5959

6060
WORKDIR /home/ubuntu
61-
62-
# Pre-warm pip cache
63-
COPY requirements.txt .
64-
RUN VENV_PATH=$(mktemp -d) \
65-
&& python3 -m venv "$VENV_PATH" \
66-
&& . "$VENV_PATH"/bin/activate \
67-
&& pip install -r requirements.txt \
68-
&& pip freeze > .preinstalled_requirements.txt \
69-
&& rm -rf "$VENV_PATH" \
70-
&& rm requirements.txt

README.md

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
**THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND under the [MIT License](LICENCE).** Commercial use is permitted, but the author recommends copying or forking to avoid supply chain risks. Clarity and minimialism are goals to support realistic consumer auditing.
77

8-
This repository provides a Docker container image for cloud and data engineering. It includes essential tools for working with Google Cloud Platform, Terraform, and dbt.
8+
This repository provides a Docker container image for cloud and data engineering. It includes essential tools for working with Google Cloud Platform, Terraform, and Python.
99

1010
The image is built and published to the GitHub Container Registry every day. This process ensures it has the latest software versions and security updates.
1111

@@ -27,12 +27,9 @@ This image relies on the following direct dependencies. Maintainers of these dep
2727
| Infrastructure as Code | `terraform` | HashiCorp |
2828
| Cloud SDK | Google Cloud SDK | Google |
2929
| Language | `python` | Python Software Foundation |
30-
| Data transformation | `dbt-bigquery` | dbt Labs |
3130
| Version control | `git` | Canonical |
3231
| Shell completion | `bash-completion` | Canonical |
3332

34-
The `dbt-bigquery` Python package and its dependencies are pre-loaded into the `pip` cache to reduce network requests to PyPI.
35-
3633
## Image tagging strategy
3734

3835
The image has two types of tags:

prompts/features/02-default-user-ubuntu.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ refinement: |
3030
- The plan depends on the user/group configuration of the `docker.io/ubuntu:rolling` base image.
3131

3232
- **Potential Issues & Mitigations:**
33-
- **File Permissions:** Processes inside the container will run as the `ubuntu` user. The `Dockerfile` creates a pre-warmed pip cache, which will now be owned by `ubuntu`. This is the desired behavior and is not expected to cause issues.
33+
- **File Permissions:** Processes inside the container will run as the `ubuntu` user. This is the desired behavior and is not expected to cause issues.
3434
- **Dev Container Context:** There is no direct impact on the dev container or Codespaces, as they use `/.devcontainer/Dockerfile`, which is not being modified. This isolates the change to the production image.
3535
- **GitHub Actions Context:** The `docker-publish.yml` workflow is not affected by the user change *within* the image it builds. The new verification step will be added to the existing `image_test` job to ensure correctness.
3636

requirements.txt

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)