Skip to content

MPT-23808 Park frontend build to stop npm downloads in CI - #39

Open
svazquezco wants to merge 1 commit into
mainfrom
bugfix/MPT-23808/park-frontend-build-stop-npm-downloads-in-ci
Open

MPT-23808 Park frontend build to stop npm downloads in CI#39
svazquezco wants to merge 1 commit into
mainfrom
bugfix/MPT-23808/park-frontend-build-stop-npm-downloads-in-ci

Conversation

@svazquezco

@svazquezco svazquezco commented Jul 31, 2026

Copy link
Copy Markdown
Collaborator

🤖 AI-generated PR — Please review carefully.

What

The frontend is still a scaffold — frontend/src/modules/ only contains .gitkeep, so the frontend build produces an empty static/. Despite that, every CI run installed the frontend npm dependencies up to four times (make build, make check-allcheck, make check-allbuild, and the Docker frontend-build stage), wasting build time. Dependabot npm bumps could also break the build outright (e.g. typescript@7 vs the ts-jest peer range >=4.3 <7).

Since the frontend is not in use right now (it will be resumed later), this parks it so no build downloads npm, while keeping the scaffold intact.

Changes

  • Dockerfile — the frontend-build stage is kept but left unreferenced, so BuildKit skips it and npm never runs during the image build. The two COPY --from=frontend-build /static ./static lines are commented out, and dev/prod ship an empty static/ via mkdir -p ./static. Re-enabling is just uncommenting those COPY lines.
  • make/common.mk — default scope changed from all to backend, so bare make build / make check-all (what CI runs) skip the frontend. Frontend work is still available explicitly via scope=frontend or scope=all.
  • .github/dependabot.yml — the npm ecosystem's open-pull-requests-limit set to 0, pausing version-update PRs while keeping security updates. Restore to 5 when frontend development resumes.

Testing

  • docker compose build backend (dev target) and docker build --target prod — both build cleanly, and no frontend-build / npm / node:26 steps run (verified in build output).
  • Confirmed the default make scope now resolves to backend.
  • Empty static/ directory is present in both dev and prod images.
  • Pauses frontend build steps in CI.
  • Creates empty static/ directories in development and production images.
  • Sets the default Make scope to backend.
  • Pauses Dependabot npm version updates while retaining security updates.

@svazquezco
svazquezco requested a review from a team as a code owner July 31, 2026 12:05
@svazquezco
svazquezco requested review from alephsur and jentyk July 31, 2026 12:05
@github-actions

github-actions Bot commented Jul 31, 2026

Copy link
Copy Markdown

✅ Found Jira issue key in the title: MPT-23808

Generated by 🚫 dangerJS against ea81fe9

@coderabbitai

coderabbitai Bot commented Jul 31, 2026

Copy link
Copy Markdown

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Frontend operations run when frontend modules exist or when scope=frontend is explicit. Docker always creates /static and conditionally builds frontend assets. Documentation describes the parked state. Dependabot pauses frontend version-update pull requests while retaining security updates.

Changes

Frontend operations

Layer / File(s) Summary
Frontend selection and runtime control
make/common.mk
Make detects frontend modules and gates frontend build, check, format, test, log, and service commands.
Conditional frontend image build
Dockerfile
The frontend stage always creates /static. It runs npm ci and npm run build only when src/modules contains directories.
Frontend operating rules
docs/local-development.md, docs/testing.md, .github/dependabot.yml
Documentation describes automatic detection and explicit scope=frontend execution. Dependabot sets the frontend version-update limit to 0 while retaining security updates.

Estimated code review effort: 3 (Moderate) | ~20 minutes

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Documentation Up To Date ⚠️ Warning The PR changes scope-gated make targets and Docker/configuration behavior, but only local-development.md and testing.md changed; mapped docs/contributing.md and docs/deployment.md are unchanged. Update docs/contributing.md for make scope and target behavior, and docs/deployment.md for Docker frontend handling and the paused npm Dependabot configuration.
✅ Passed checks (2 passed)
Check name Status Explanation
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.

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

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 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 `@Dockerfile`:
- Around line 25-27: Update the Docker build configuration around the
frontend-build stage so the no-npm guarantee does not depend on BuildKit being
enabled: either explicitly require/configure BuildKit for the documented make
build and docker compose workflow, or move frontend-build into a separate opt-in
Dockerfile target that the dev backend target cannot process. Preserve the
backend dev build without running npm under both legacy and BuildKit builders.

In `@make/common.mk`:
- Around line 5-7: Update the backend and all-scope validation flow in the
relevant make targets to run “mpt-ext meta generate” followed by “mpt-ext meta
validate”. Ensure the default scope=backend path, including the default make
check-all workflow, retains this metadata validation while preserving explicit
frontend scope behavior.
🪄 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: Repository YAML (base), Organization UI (inherited)

Review profile: CHILL

Plan: Pro

Run ID: 53a6d9e6-8227-4fcc-9ca7-1cc0bdecdb39

📥 Commits

Reviewing files that changed from the base of the PR and between 60ec871 and 1320720.

📒 Files selected for processing (3)
  • .github/dependabot.yml
  • Dockerfile
  • make/common.mk
🔗 Linked repositories identified

CodeRabbit considers these linked repositories for cross-repo context during reviews:

  • softwareone-platform/mpt-extension-skills (manual)
📜 Review details
⏰ Context from checks skipped due to timeout. (3)
  • GitHub Check: mpt-extension-installation (Prerequisites Create standard build artifact)
  • GitHub Check: mpt-extension-installation (Prerequisites Set the version)
  • GitHub Check: build
🧰 Additional context used
📓 Path-based instructions (3)
make/**

📄 CodeRabbit inference engine (AGENTS.md)

Inspect make/ for canonical commands used by the repository.

Files:

  • make/common.mk

⚙️ CodeRabbit configuration file

make/**: Review changes in make/ against docs/contributing.md and the linked repository's standards/makefiles.md.
Use the shared standard as the source of truth for Makefile architecture, file layout, and command-group organization.

Files:

  • make/common.mk
**/*

⚙️ CodeRabbit configuration file

**/*: For each subsequent commit in this PR, explicitly verify if previous review comments have been resolved

Files:

  • make/common.mk
  • Dockerfile
Dockerfile

📄 CodeRabbit inference engine (AGENTS.md)

Inspect Dockerfile as part of the backend container and local stack setup when the task affects containerization.

Files:

  • Dockerfile
🔇 Additional comments (2)
.github/dependabot.yml (1)

36-38: LGTM!

Dockerfile (1)

41-43: 🗄️ Data Integrity & Integration

No frontend assets are currently lost.

frontend/src/modules contains only .gitkeep, so npm run build produces an empty static/. make build scope=all builds the dev target, which mounts ./static. The frontend is intentionally parked until it has assets.

			> Likely an incorrect or invalid review comment.

Comment thread Dockerfile Outdated
Comment thread make/common.mk Outdated
@svazquezco
svazquezco force-pushed the bugfix/MPT-23808/park-frontend-build-stop-npm-downloads-in-ci branch from 1320720 to 943f6fb Compare July 31, 2026 12:17
Comment thread make/common.mk Outdated

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 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 `@make/common.mk`:
- Around line 11-13: Update docs/local-development.md and docs/testing.md to
document that bare make, make build, and make check-all default to
scope=backend, and that frontend builds require explicitly setting
scope=frontend or scope=all. Keep the documentation consistent with the scope
default defined in make/common.mk.
- Around line 1-5: Update the DOCKER_BUILDKIT and COMPOSE_DOCKER_CLI_BUILD
assignments in the make configuration to enforce enabled values rather than
preserving explicit 0 overrides. Keep the no-npm guarantee by ensuring both
settings cannot be disabled through the environment.
🪄 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: Repository YAML (base), Organization UI (inherited)

Review profile: CHILL

Plan: Pro

Run ID: 2ad98898-d54c-4ad5-9e7f-0f656b8a7bd9

📥 Commits

Reviewing files that changed from the base of the PR and between 1320720 and 943f6fb.

📒 Files selected for processing (3)
  • .github/dependabot.yml
  • Dockerfile
  • make/common.mk
🔗 Linked repositories identified

CodeRabbit considers these linked repositories for cross-repo context during reviews:

  • softwareone-platform/mpt-extension-skills (manual)
🚧 Files skipped from review as they are similar to previous changes (2)
  • Dockerfile
  • .github/dependabot.yml
📜 Review details
⏰ Context from checks skipped due to timeout. (4)
  • GitHub Check: mpt-extension-installation (Build Build Image)
  • GitHub Check: mpt-extension-installation (Prerequisites Create standard build artifact)
  • GitHub Check: mpt-extension-installation (Prerequisites Set the version)
  • GitHub Check: build
🧰 Additional context used
📓 Path-based instructions (2)
make/**

📄 CodeRabbit inference engine (AGENTS.md)

Inspect make/ for canonical commands used by the repository.

Files:

  • make/common.mk

⚙️ CodeRabbit configuration file

make/**: Review changes in make/ against docs/contributing.md and the linked repository's standards/makefiles.md.
Use the shared standard as the source of truth for Makefile architecture, file layout, and command-group organization.

Files:

  • make/common.mk
**/*

⚙️ CodeRabbit configuration file

**/*: For each subsequent commit in this PR, explicitly verify if previous review comments have been resolved

Files:

  • make/common.mk
🔇 Additional comments (1)
make/common.mk (1)

46-47: LGTM!

Comment thread make/common.mk Outdated
Comment thread make/common.mk Outdated
@svazquezco
svazquezco force-pushed the bugfix/MPT-23808/park-frontend-build-stop-npm-downloads-in-ci branch from 943f6fb to 4e4d27a Compare July 31, 2026 12:29
@svazquezco
svazquezco force-pushed the bugfix/MPT-23808/park-frontend-build-stop-npm-downloads-in-ci branch from 4e4d27a to a75b1d5 Compare August 3, 2026 13:16

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

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 `@Dockerfile`:
- Around line 37-40: Update the Dockerfile RUN instruction guarding the frontend
build so failures from npm ci or npm run build propagate and fail the image
build when src/modules contains directories. Preserve the conditional behavior
and static directory creation, while ensuring the shell does not continue
successfully after a failed frontend command.
🪄 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: Repository YAML (base), Organization UI (inherited)

Review profile: CHILL

Plan: Pro

Run ID: ac49ae97-9ad5-4b66-b4a3-b0e2af30ad4d

📥 Commits

Reviewing files that changed from the base of the PR and between 4e4d27a and a75b1d5.

📒 Files selected for processing (5)
  • .github/dependabot.yml
  • Dockerfile
  • docs/local-development.md
  • docs/testing.md
  • make/common.mk
🔗 Linked repositories identified

CodeRabbit considers these linked repositories for cross-repo context during reviews:

  • softwareone-platform/mpt-extension-skills (manual)
🚧 Files skipped from review as they are similar to previous changes (1)
  • .github/dependabot.yml
📜 Review details
⏰ Context from checks skipped due to timeout. (4)
  • GitHub Check: mpt-extension-installation (Build Build Image)
  • GitHub Check: mpt-extension-installation (Prerequisites Create standard build artifact)
  • GitHub Check: mpt-extension-installation (Prerequisites Set the version)
  • GitHub Check: build
🧰 Additional context used
📓 Path-based instructions (9)
docs/{local-development,deployment,testing,migrations,documentation}.md

📄 CodeRabbit inference engine (docs/contributing.md)

Update docs/local-development.md, docs/deployment.md, docs/testing.md, docs/migrations.md, or docs/documentation.md when the corresponding workflow changes

Files:

  • docs/testing.md
  • docs/local-development.md
docs/**/*.md

📄 CodeRabbit inference engine (docs/contributing.md)

Follow the shared documentation standard for structure and naming from mpt-extension-skills/standards/documentation.md

docs/**/*.md: Put topic-specific behavior in the matching file under docs/ rather than in a general summary document.
When documentation changes, prefer updating the smallest relevant document instead of creating overlapping summary files.

Files:

  • docs/testing.md
  • docs/local-development.md
docs/testing.md

📄 CodeRabbit inference engine (Custom checks)

Update docs/testing.md when the PR changes test strategy or test scope.

Read docs/testing.md before changing code or tests.

Files:

  • docs/testing.md
docs/{architecture,local-development,deployment,external-integrations,contributing,testing,migrations}.md

📄 CodeRabbit inference engine (docs/documentation.md)

When runtime, testing, migration, or setup behavior changes, update the corresponding document in the same change.

Files:

  • docs/testing.md
  • docs/local-development.md
**/*

⚙️ CodeRabbit configuration file

**/*: For each subsequent commit in this PR, explicitly verify if previous review comments have been resolved

Files:

  • docs/testing.md
  • Dockerfile
  • make/common.mk
  • docs/local-development.md
docs/**

⚙️ CodeRabbit configuration file

docs/**: Review documentation changes against docs/documentation.md and the linked repository's standards/documentation.md.
Use those documents as the source of truth for structure, topic boundaries, navigation updates, and when to link shared rules instead of copying them.

Files:

  • docs/testing.md
  • docs/local-development.md
Dockerfile

📄 CodeRabbit inference engine (AGENTS.md)

Inspect Dockerfile as part of the backend container and local stack setup when the task affects containerization.

Files:

  • Dockerfile
make/**

📄 CodeRabbit inference engine (AGENTS.md)

Inspect make/ for canonical commands used by the repository.

Files:

  • make/common.mk

⚙️ CodeRabbit configuration file

make/**: Review changes in make/ against docs/contributing.md and the linked repository's standards/makefiles.md.
Use the shared standard as the source of truth for Makefile architecture, file layout, and command-group organization.

Files:

  • make/common.mk
docs/local-development.md

📄 CodeRabbit inference engine (AGENTS.md)

Read docs/local-development.md for local setup and service startup when applicable.

Files:

  • docs/local-development.md
🧠 Learnings (2)
📓 Common learnings
Learnt from: CR
Repo: softwareone-platform/mpt-installation-extension

Timestamp: 2026-08-03T13:16:59.682Z
Learning: Use the supported Docker Compose workflow for local development: build with `make build` and run with `make run`.
Learnt from: CR
Repo: softwareone-platform/mpt-installation-extension

Timestamp: 2026-08-03T13:16:59.682Z
Learning: Keep the environment-parameter reference in `docs/deployment.md`; do not duplicate required or optional environment-variable documentation in the local-development document.
Learnt from: CR
Repo: softwareone-platform/mpt-installation-extension

Timestamp: 2026-08-03T13:17:06.496Z
Learning: Add or update tests when a change modifies API request handling, event processing, pipeline step behavior, command output, or dependency wiring in the extension app.
Learnt from: CR
Repo: softwareone-platform/mpt-installation-extension

Timestamp: 2026-08-03T13:17:06.496Z
Learning: Tests are not required for documentation-only changes.
📚 Learning: 2026-07-31T10:20:22.222Z
Learnt from: svazquezco
Repo: softwareone-platform/mpt-installation-extension PR: 36
File: docs/migrations.md:20-28
Timestamp: 2026-07-31T10:20:22.222Z
Learning: In migration documentation and examples, use the migration API exposed by `MPTAPIServiceMixin` through `self.mpt_api_service`. Do not reference the removed `MPTAPIServiceMixin.account_scoped_service` property; in particular, ensure `backend/mpt_installation_extension/migrations/mixins/mpt_api_service.py` remains the authoritative implementation.

Applied to files:

  • docs/testing.md
  • docs/local-development.md
🔇 Additional comments (2)
make/common.mk (1)

12-14: LGTM!

Also applies to: 19-25, 32-42, 53-54, 63-67, 78-105

docs/local-development.md (1)

18-27: 🗄️ Data Integrity & Integration

Resolve the CI scope contract.

make/common.mk and both documents consistently define all as the default. Unqualified CI commands run frontend npm operations when frontend/src/modules/*/ contains code. If CI must default to backend, change scope ?= backend and update both documents.

Comment thread Dockerfile Outdated
@svazquezco
svazquezco force-pushed the bugfix/MPT-23808/park-frontend-build-stop-npm-downloads-in-ci branch from a75b1d5 to fc58edb Compare August 3, 2026 13:20
The frontend is a scaffold (frontend/src/modules has no entrypoints), so its
build produces an empty static tree. Skip it until real modules exist, with no
manual flag:

- make/common.mk: FRONTEND_HAS_CODE detects modules via $(wildcard); the
  frontend runs only for scope=frontend, or scope=all once it has code. Default
  scope stays all, so backend checks and metadata validation keep running.
- Dockerfile: the frontend-build stage detects the same condition and skips npm
  entirely (empty static) when parked, so a plain `docker build` matches make
  with no build-arg. The COPY of the static assets into the backend image stays
  wired.
- .github/dependabot.yml: pause npm version updates (open-pull-requests-limit
  0), keeping security updates.

Adding a module under frontend/src/modules re-enables the build automatically.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@svazquezco
svazquezco force-pushed the bugfix/MPT-23808/park-frontend-build-stop-npm-downloads-in-ci branch from fc58edb to ea81fe9 Compare August 3, 2026 13:30
@sonarqubecloud

sonarqubecloud Bot commented Aug 3, 2026

Copy link
Copy Markdown

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.

2 participants