Skip to content

fix(postgres-fixture): drop deprecated rules_docker dependency - #3

Closed
ihistand wants to merge 1 commit into
fix/node-toolchain-pinfrom
fix/rules-docker-decl
Closed

fix(postgres-fixture): drop deprecated rules_docker dependency#3
ihistand wants to merge 1 commit into
fix/node-toolchain-pinfrom
fix/rules-docker-decl

Conversation

@ihistand

Copy link
Copy Markdown
Collaborator

Summary

Upstream Dataform removed `@io_bazel_rules_docker` from `WORKSPACE` in commit `8be595ac` (Mar 2024), but the restored Postgres adapter files in `tools/postgres/BUILD` (restored in PR predecessor commit `a220e2ed`) still loaded `container_image` from it, breaking `bazel build //...`:

```
error loading package 'tools/postgres': Unable to find package for
@io_bazel_rules_docker//container:image.bzl: The repository
'@io_bazel_rules_docker' could not be resolved
```

Approach

Two paths considered:

  1. Restore @io_bazel_rules_docker in WORKSPACE — ~67 lines of deprecated Bazel infra to maintain.
  2. Refactor the fixture to use docker run directly. ← chose this

Modern Postgres LTS, no deprecated Bazel rules, simpler dev flow. PostgresFixture now starts postgres:15-alpine via docker run on the local daemon — no Bazel image staging needed.

Also renamed DOCKER_CONTAINER_NAME from postgres-df-integration-testingpostgres-sa-integration-testing (rename sweep miss).

Verification

./scripts/docker-bazel build -- //... -//tools/postgres/...
# → 332 actions, Build completed successfully

Out of scope

tools/postgres/... itself still doesn't build because the restored adapter imports pg and pg-query-stream, which aren't in package.json. That's Phase 1 of docs/postgres_reintegration_assessment.md — separate PR.

Stack

Stacked on PR #2 (`fix/node-toolchain-pin`). Merge order: #1#2 → this.

Test plan

  • `./scripts/docker-bazel build -- //... -//tools/postgres/...`
  • `./scripts/docker-bazel build //...` (blocked on Postgres adapter Phase 1 — pg / pg-query-stream deps)
  • Postgres integration tests against the new `postgres:15-alpine` image (blocked on Phase 1)

🤖 Generated with Claude Code

…age directly

Upstream Dataform removed @io_bazel_rules_docker from WORKSPACE in commit
8be595a (Mar 2024), but the restored Postgres adapter files in
tools/postgres/BUILD still loaded `container_image` from it, breaking
`bazel build //...`:

  error loading package 'tools/postgres': Unable to find package for
  @io_bazel_rules_docker//container:image.bzl: The repository
  '@io_bazel_rules_docker' could not be resolved

Two paths considered:
  1. Restore @io_bazel_rules_docker decl in WORKSPACE (~67 lines of
     deprecated bazel infra to maintain).
  2. Refactor the fixture to use docker run directly.

Chose (2). Modern Postgres LTS, no deprecated bazel rules, simpler dev
flow. PostgresFixture now starts `postgres:15-alpine` via `docker run`
on the local daemon — no Bazel image staging needed.

Also rename DOCKER_CONTAINER_NAME from "postgres-df-integration-testing"
to "postgres-sa-integration-testing" (rename sweep miss).

Verified in Docker:
  ./scripts/docker-bazel build -- //... -//tools/postgres/...
  → 332 actions, Build completed successfully

tools/postgres/... itself still needs `pg` + `pg-query-stream` added
to package.json — that's Phase 1 of docs/postgres_reintegration_assessment.md
(separate PR).
@ihistand

ihistand commented Jun 7, 2026

Copy link
Copy Markdown
Collaborator Author

Superseded: the Postgres reintegration + Dataform→SQLAnvil rename landed on main directly, and the docs moved to the SQLAnvil/docs repo. Closing as part of #12 (stale-branch prune). The one un-migrated draft, gcp_test_project_setup.md, was migrated to SQLAnvil/docs.

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