Skip to content

chore(make): add docker-skip convenience target to Makefile.terraform - #1519

Merged
cristim merged 2 commits into
mainfrom
chore/makefile-terraform-skip-targets
Jul 27, 2026
Merged

cristim merged 2 commits into
mainfrom
chore/makefile-terraform-skip-targets

Conversation

@cristim

@cristim cristim commented Jul 27, 2026 •

Copy link
Copy Markdown
Member

Summary

  • A stashed WIP (never merged) added three Makefile.terraform convenience targets wrapping terraform vars: docker-build (skip_docker_push), docker-skip (skip_docker_build), frontend-skip (enable_frontend_build).
  • Checked current main: skip_docker_push and enable_frontend_build no longer exist anywhere in terraform/environments/*/variables.tf (they only survive in stale main.tf.bak files). The build module has no build-without-push option, and frontend assets are now bundled into the app/Docker build rather than gated by a separate Terraform flag, so docker-build and frontend-skip have no current equivalent.
  • Only docker-skip still maps to a real variable: enable_docker_build (which replaced the old skip_docker_build). Added that target, adapted to the current wrapper style (scripts/tf-deploy.sh), and left a comment documenting why the other two were not resurrected.

Test plan

  • make -n -f Makefile.terraform docker-skip dry-runs and shows the expected tf-deploy.sh ... -var="enable_docker_build=false" command
  • make -n -f Makefile.terraform frontend-only and default target still dry-run cleanly (no syntax breakage)
  • Confirmed enable_docker_build is declared in terraform/environments/{aws,azure,gcp}/variables.tf
  • Confirmed skip_docker_push / enable_frontend_build do not appear in any active (non-.bak) terraform file on main

Summary by CodeRabbit

  • New Features
    • Added a deployment option to skip Docker image building and deploy using a pre-built image instead.
    • Expanded and clarified Docker deployment documentation, including the supported “skip Docker build” behavior.

@cristim cristim added triaged Item has been triaged priority/p3 Polish / idea / may never ship type/chore Maintenance / non-user-visible labels Jul 27, 2026
@cristim

cristim commented Jul 27, 2026

Copy link
Copy Markdown
Member Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jul 27, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

Warning

Review limit reached

You’ve reached a temporary PR review limit under our Fair Usage Limits Policy.

Your recent review volume is higher than typical usage, so adaptive limits are currently applied.

Next review available in: 26 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: f943365a-9b41-4a9c-a640-a9bf44a3b840

📥 Commits

Reviewing files that changed from the base of the PR and between 7b18bfd and 47994ec.

📒 Files selected for processing (1)
  • Makefile.terraform
📝 Walkthrough

Walkthrough

Makefile.terraform adds and documents a docker-skip target that deploys using a pre-built Docker image by setting enable_docker_build=false.

Changes

Docker-skip deployment

Layer / File(s) Summary
Add docker-skip deployment target
Makefile.terraform
Declares docker-skip as phony, documents it in help output, and adds a deployment target that sets enable_docker_build=false. Documents the current Docker operation behavior.

Estimated code review effort: 2 (Simple) | ~10 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes the main change: adding a docker-skip target to Makefile.terraform.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/makefile-terraform-skip-targets

Comment @coderabbitai help to get the list of available commands.

@coderabbitai

coderabbitai Bot commented Jul 27, 2026 •

Copy link
Copy Markdown
Contributor
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@cristim cristim changed the title chore(make): add docker/frontend skip convenience targets to Makefile.terraform chore(make): add docker-skip convenience target to Makefile.terraform Jul 27, 2026
@cristim

cristim commented Jul 27, 2026

Copy link
Copy Markdown
Member Author

Adversarial review summary

Reviewed the single-file Makefile.terraform diff line by line, cross-checked every claim in the diff's comment/PR body against the actual terraform tree, and dry-ran the new target.

Verified correct (no bugs found):

  • docker-skip is added to .PHONY correctly.
  • enable_docker_build is a real, currently-wired variable in terraform/environments/{aws,azure,gcp}/variables.tf, consumed by each provider's compute.tf/main.tf (var.enable_docker_build ? module.build[0].image_uri : var.image_uri) and build.tf (count = var.enable_docker_build ? 1 : 0). The target does what it claims: skip the Docker build, deploy with the pre-built image_uri.
  • Confirmed skip_docker_push and enable_frontend_build genuinely do not appear in any active .tf file repo-wide (only in stale docs/.bak files), so the PR's decision not to resurrect docker-build/frontend-skip targets for them is correct - no silent-skip risk from a target claiming to do something it can't.
  • tf-deploy.sh forwards ${@:4} verbatim as EXTRA_ARGS, so -var="enable_docker_build=false" reaches terraform apply intact; the shell (not make) resolves the quoting, so this is a single well-formed arg.
  • No CI workflow or script (.github/workflows/, scripts/) references docker-skip/frontend-skip/docker-build, so nothing else needs updating in lockstep.
  • make -n -f Makefile.terraform docker-skip and frontend-only both dry-run cleanly with no syntax breakage.
  • No duplicate/conflicting target of the same name exists in the root Makefile.

One confirmed finding, fixed:

  • The PR title said "add docker/frontend skip convenience targets" (plural), implying both a docker-skip and a frontend-skip target were added. Only docker-skip was actually added (correctly, with reasoning documented for why frontend-skip was deliberately left out). Retitled to chore(make): add docker-skip convenience target to Makefile.terraform to match what actually shipped. No code change needed since the commit message and PR body were already accurate.

Not fixed / out of scope:

  • terraform/modules/frontend/README.md and terraform/modules/build/main.tf's skip_docker_build variable still reference/imply the retired enable_frontend_build/skip_docker_push flags in docs. Pre-existing doc drift, unrelated to this Makefile change; not touched to keep this PR minimal-impact. Worth a separate doc-cleanup issue if desired.

No code changes were required - the diff itself is correct and minimal-impact. Only the PR title was adjusted.

@coderabbitai review was already rate-limited (25 min cooldown, see CodeRabbit's comment above). A recovery @coderabbitai full review is scheduled to fire automatically once the cooldown clears; will report back once that pass completes.

@coderabbitai

coderabbitai Bot commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

Tip

For best results, initiate chat on the files or code changes.

@cristim Thanks for the thorough adversarial pass. The verification supports keeping this PR minimal: docker-skip is correctly wired to the active enable_docker_build variable, while the other legacy convenience targets should remain absent.

The retitled PR now accurately describes the shipped change. For the pre-existing Terraform documentation drift, would you like me to open a separate follow-up issue?


✏️ Learnings added
Learnt from: cristim
URL: https://github.com/LeanerCloud/CUDly/pull/1519

Timestamp: 2026-07-27T12:21:18.768Z
Learning: In this repository, `Makefile.terraform`’s `docker-skip` target must use `enable_docker_build=false`; the former `skip_docker_build` variable has been replaced. The legacy `skip_docker_push` and `enable_frontend_build` flags are not active Terraform variables and should not be reintroduced as Make targets.

Learnt from: cristim
URL: https://github.com/LeanerCloud/CUDly/pull/1519

Timestamp: 2026-07-27T12:21:18.768Z
Learning: The references to retired Terraform flags in `terraform/modules/frontend/README.md` and `terraform/modules/build/main.tf` are pre-existing documentation drift and are intentionally out of scope for pull request `#1519`’s Makefile.terraform-only change.

Note: Learnings are effective only in the context of similar code segments. To apply general coding guidelines, please configure review instructions. You can manage existing learnings in the app.

@cristim

cristim commented Jul 27, 2026

Copy link
Copy Markdown
Member Author

@coderabbitai full review

@coderabbitai

coderabbitai Bot commented Jul 27, 2026 •

Copy link
Copy Markdown
Contributor
✅ Action performed

Full review finished.


Your included review limit is currently reached under our Fair Usage Limits Policy. Your recent PR review activity is in the 95th percentile or higher among CodeRabbit users, so adaptive limits apply. This review may still proceed through usage-based billing if eligible. Your next included review will be available in 31 minutes.

@cristim

cristim commented Jul 27, 2026

Copy link
Copy Markdown
Member Author

@coderabbitai full review

@coderabbitai

coderabbitai Bot commented Jul 27, 2026 •

Copy link
Copy Markdown
Contributor
✅ Action performed

Full review finished.


Your included review limit is currently reached under our Fair Usage Limits Policy. Your recent PR review activity is in the 95th percentile or higher among CodeRabbit users, so adaptive limits apply. This review may still proceed through usage-based billing if eligible. Your next included review will be available in 1 minute.

@cristim

cristim commented Jul 27, 2026

Copy link
Copy Markdown
Member Author

CodeRabbit has not yet produced a substantive review of this PR: all prior bot comments on it are review-limit / auto-pause notices, so the absence of findings is "not reviewed" rather than "reviewed clean". Requesting a full pass now that the limit window has elapsed.

@coderabbitai full review

@coderabbitai

coderabbitai Bot commented Jul 27, 2026 •

Copy link
Copy Markdown
Contributor

@cristim Understood — triggering a full substantive review of #1519 now.

🐇🔎

✅ Action performed

Full review finished.

@coderabbitai coderabbitai 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.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@Makefile.terraform`:
- Line 139: Update the hard-coded help output in the Makefile’s help target to
include a Docker operations entry for the docker-skip target, using its existing
“Deploy without building the Docker image” description. Keep the docker-skip
target definition unchanged.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 11bc1f79-e22c-46ed-8f20-37fdd58aef5c

📥 Commits

Reviewing files that changed from the base of the PR and between b83c5d1 and 5de63c8.

📒 Files selected for processing (1)
  • Makefile.terraform

Comment thread Makefile.terraform
@cristim

cristim commented Jul 27, 2026

Copy link
Copy Markdown
Member Author

Addressed the Makefile.terraform:139 finding in 36d3ddb.

The help output is hard-coded at lines 13-39 and does not consume the ## descriptions, so docker-skip was undiscoverable through make help despite carrying one. Added a "Docker Operations" entry.

Worth stating why this was more than a doc nit: the target exists purely as a convenience wrapper around -var="enable_docker_build=false", so a convenience nobody can discover is not one.

Verified make -f Makefile.terraform help now lists it, and make -n -f Makefile.terraform docker-skip still expands to the same command unchanged.

@coderabbitai full review

@coderabbitai

coderabbitai Bot commented Jul 27, 2026 •

Copy link
Copy Markdown
Contributor

@cristim Thanks for addressing the discoverability issue. Triggering a full review of #1519, including the updated make help entry and preservation of the docker-skip command expansion.

✅ Action performed

Full review finished.


Your included review limit is currently reached under our Fair Usage Limits Policy. Your recent PR review activity is in the 95th percentile or higher among CodeRabbit users, so adaptive limits apply. This review may still proceed through usage-based billing if eligible. Your next included review will be available in 3 minutes.

cristim added 2 commits July 27, 2026 20:25
A stashed WIP had docker-build/docker-skip/frontend-skip targets wrapping
skip_docker_build/skip_docker_push/enable_frontend_build terraform vars.
Of those, only the "skip the whole docker build" case still maps to a
real variable (enable_docker_build, which replaced skip_docker_build).
skip_docker_push and enable_frontend_build no longer exist anywhere in
terraform/environments/*/variables.tf, so docker-build (build without
push) and frontend-skip have no current equivalent and are documented
as such instead of reintroduced.
Addresses the CodeRabbit finding on Makefile.terraform:139. The help output
is hard-coded at lines 13-39 and does not consume the `##` target
descriptions, so docker-skip was undiscoverable through `make help` despite
carrying one.

That matters more than a normal doc gap here: the target exists purely as a
convenience wrapper, so a convenience nobody can find is not one. Verified
`make -f Makefile.terraform help` now lists it and `make -n -f
Makefile.terraform docker-skip` still expands unchanged.
@cristim
cristim force-pushed the chore/makefile-terraform-skip-targets branch from 36d3ddb to 47994ec Compare July 27, 2026 18:25
@cristim

cristim commented Jul 27, 2026

Copy link
Copy Markdown
Member Author

Rebased onto main (7b18bfdef) to pick up the grpc v1.82.1 bump from #1529.

Security Scanning was failing here on GO-2026-6061, which was repo-wide dependency debt rather than anything in this PR: this branch touches one file, Makefile.terraform, and no Go dependency. The rebase inherits the fix; the branch now carries google.golang.org/grpc v1.82.1.

No content change from the rebase, just a new base.

@coderabbitai full review

@coderabbitai

coderabbitai Bot commented Jul 27, 2026 •

Copy link
Copy Markdown
Contributor

@cristim Understood. Triggering a fresh full review of the rebased PR head, including the inherited gRPC security update and the Makefile.terraform change.

✅ Action performed

Full review finished.


Your included review limit is currently reached under our Fair Usage Limits Policy. Your recent PR review activity is in the 95th percentile or higher among CodeRabbit users, so adaptive limits apply. This review may still proceed through usage-based billing if eligible. Your next included review will be available in 2 minutes.

@cristim

cristim commented Jul 27, 2026

Copy link
Copy Markdown
Member Author

Requesting a full review (not incremental) now that a window may be open. Triggers are serialised centrally across the queue because CodeRabbit is under an account-level adaptive throttle and parallel pings hold it in backoff.

@coderabbitai full review

@coderabbitai

coderabbitai Bot commented Jul 27, 2026 •

Copy link
Copy Markdown
Contributor

@cristim Understood — triggering a fresh full review of #1519 now.

✅ Action performed

Full review finished.


Your included review limit is currently reached under our Fair Usage Limits Policy. Your recent PR review activity is in the 95th percentile or higher among CodeRabbit users, so adaptive limits apply. This review may still proceed through usage-based billing if eligible. Your next included review will be available in 42 minutes.

@cristim

cristim commented Jul 27, 2026

Copy link
Copy Markdown
Member Author

Requesting a full review (not incremental) now that a window may be open. Triggers are serialised centrally across the queue because CodeRabbit is under an account-level adaptive throttle and parallel pings hold it in backoff.

@coderabbitai full review

@coderabbitai

coderabbitai Bot commented Jul 27, 2026 •

Copy link
Copy Markdown
Contributor

@cristim Understood — requesting a fresh full review of #1519.

✅ Action performed

Full review finished.


Your included review limit is currently reached under our Fair Usage Limits Policy. Your recent PR review activity is in the 95th percentile or higher among CodeRabbit users, so adaptive limits apply. This review may still proceed through usage-based billing if eligible. Your next included review will be available in 27 minutes.

@cristim
cristim merged commit be11bdc into main Jul 27, 2026
19 checks passed
@cristim
cristim deleted the chore/makefile-terraform-skip-targets branch July 27, 2026 20:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

priority/p3 Polish / idea / may never ship triaged Item has been triaged type/chore Maintenance / non-user-visible

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant