Skip to content

Conversation

@akatsoulas
Copy link
Collaborator

No description provided.

@akatsoulas akatsoulas requested a review from Copilot September 10, 2025 12:48
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR restructures the Docker build process by introducing a dedicated stage for generating localization (l10n) files, specifically jsi18n files, and reordering the build stages for better dependency management.

  • Adds a new jsi18n-generator stage that handles localization file generation before frontend building
  • Reorders stages so localization files are generated first, then copied to the frontend builder
  • Updates stage numbering and comments throughout the Dockerfile to reflect the new structure

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.


WORKDIR /app

COPY package*.json ./
Copy link

Copilot AI Sep 10, 2025

Choose a reason for hiding this comment

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

The change from npm install to npm ci is good for reproducible builds, but this should be applied consistently. The original frontend-builder stage used npm install, so this change should be intentional and documented if it represents a shift in build strategy.

Suggested change
COPY package*.json ./
COPY package*.json ./
# Use `npm ci` instead of `npm install` for reproducible builds.
# This is an intentional shift in build strategy to ensure dependencies are installed exactly as specified in package-lock.json.

Copilot uses AI. Check for mistakes.
COPY . .
COPY --from=jsi18n-generator /app/jsi18n ./jsi18n

RUN cp .env-build .env && \
Copy link

Copilot AI Sep 10, 2025

Choose a reason for hiding this comment

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

The webpack build commands are missing the mkdir -p jsi18n/jsi18n command that was present in the original frontend-builder stage. Since jsi18n files are now copied from the jsi18n-generator stage, verify that this directory creation is no longer needed, or if the copied files maintain the expected directory structure.

Suggested change
RUN cp .env-build .env && \
RUN cp .env-build .env && \
mkdir -p jsi18n/jsi18n && \

Copilot uses AI. Check for mistakes.
@akatsoulas akatsoulas merged commit 1cbd2cb into mozilla:main Sep 10, 2025
1 check passed
@akatsoulas akatsoulas deleted the fix-pre-render branch September 16, 2025 20:52
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