Conversation
…hoose_french_As_Language [Feature] Admin option to choose French as language
* Update docker-build-publish.yml * Update deploy-do.yml
* Update Dockerfile * Merge pull request #1570 from duncan222/feature/AdminPage_Option_To_Choose_french_As_Language [Feature] Admin option to choose French as language * Update docker-build-publish.yml (#1575) * Update docker-build-publish.yml * Update deploy-do.yml --------- Co-authored-by: Duncan Collins <duncancollins001@gmail.com>
|
|
There was a problem hiding this comment.
Greptile Overview
Greptile Summary
This PR makes several key changes to support a new staging deployment strategy and French language localization:
-
French Language Support: Adds French (fr-FR) language option to the admin web application's theme settings component, including UI selection and browser detection capabilities. This expands the app's internationalization from 5 to 6 supported languages.
-
Staging Pipeline Integration: Modifies CI/CD workflows to include the 'stage' branch in the Docker build pipeline, enabling automated image building for staging deployments alongside existing develop and master branch workflows.
-
Build Tool Version Pinning: Locks specific versions of critical build tools (npm@8.19.4, node-gyp@9.4.0, yarn@1.22.22) in the API Dockerfile to ensure reproducible builds and prevent issues from automatic tool updates.
The changes integrate with the existing i18n architecture by following established patterns for language addition, and support a three-tier deployment strategy (develop → stage → master) common in modern CI/CD practices.
Changed Files
| Filename | Score | Overview |
|---|---|---|
| packages/admin-web-angular/src/app/@theme/components/theme-settings/theme-settings.component.ts | 5/5 | Adds French language support following existing i18n patterns |
| .github/workflows/docker-build-publish.yml | 5/5 | Adds stage branch trigger for Docker image builds |
| .deploy/api/Dockerfile | 5/5 | Pins build tool versions for reproducible builds |
| .github/workflows/deploy-do.yml | 2/5 | Changes deployment trigger from workflow dependency to direct push |
Confidence score: 3/5
- This PR contains mostly safe changes but has one critical deployment workflow issue that needs attention
- Score reduced due to deployment workflow changes that bypass Docker build dependencies and could lead to deployments with outdated images
- Pay close attention to .github/workflows/deploy-do.yml which removes the safety mechanism ensuring Docker images are built before deployment
Sequence Diagram
sequenceDiagram
participant User
participant GitHubActions as "GitHub Actions"
participant DockerHub as "Docker Hub"
participant GitHubRegistry as "GitHub Registry"
participant DigitalOcean as "DigitalOcean Registry"
participant K8sCluster as "Kubernetes Cluster"
User->>GitHubActions: "Push to develop/stage/master branch"
Note over GitHubActions: Build and Publish Docker Images Workflow
GitHubActions->>GitHubActions: "Checkout code"
GitHubActions->>GitHubActions: "Set up QEMU and Docker Buildx"
GitHubActions->>DockerHub: "Login to Docker Hub"
GitHubActions->>GitHubRegistry: "Login to GitHub Container Registry"
GitHubActions->>DigitalOcean: "Login to DigitalOcean Registry"
par Build Multiple Images
GitHubActions->>GitHubActions: "Build ever-api image"
GitHubActions->>GitHubActions: "Build ever-admin-angular image"
GitHubActions->>GitHubActions: "Build ever-carrier-ionic image"
GitHubActions->>GitHubActions: "Build ever-merchant-ionic image"
GitHubActions->>GitHubActions: "Build ever-shop-ionic image"
GitHubActions->>GitHubActions: "Build ever-shop-angular image"
end
par Push to Multiple Registries
GitHubActions->>DigitalOcean: "Push images to DigitalOcean Registry"
GitHubActions->>GitHubRegistry: "Push images to GitHub Registry"
GitHubActions->>DockerHub: "Push images to Docker Hub Registry"
end
Note over GitHubActions: Deploy to DigitalOcean Workflow
GitHubActions->>DigitalOcean: "Install doctl and login"
GitHubActions->>K8sCluster: "Save kubeconfig credentials"
GitHubActions->>K8sCluster: "Generate and apply TLS secrets"
GitHubActions->>K8sCluster: "Write MongoDB certificate file"
GitHubActions->>K8sCluster: "Apply k8s manifests with environment variables"
GitHubActions->>K8sCluster: "Restart pods to pick up latest images"
K8sCluster->>K8sCluster: "Rolling update deployments"
4 files reviewed, 2 comments
| push: | ||
| branches: | ||
| - develop | ||
| - stage | ||
| - master |
There was a problem hiding this comment.
logic: Changing from workflow_run to push trigger means deployments will run before Docker images are built, potentially deploying stale :latest images
Prompt To Fix With AI
This is a comment left during a code review.
Path: .github/workflows/deploy-do.yml
Line: 4:8
Comment:
**logic:** Changing from workflow_run to push trigger means deployments will run before Docker images are built, potentially deploying stale :latest images
How can I resolve this? If you propose a fix, please make it concise.| # on: | ||
| # workflow_run: | ||
| # workflows: ['Build and Publish Docker Images'] | ||
| # branches: [ develop, stage, master ] | ||
| # types: | ||
| # - completed |
There was a problem hiding this comment.
style: Consider using the workflow_run trigger instead to ensure proper build-then-deploy sequence
Prompt To Fix With AI
This is a comment left during a code review.
Path: .github/workflows/deploy-do.yml
Line: 10:15
Comment:
**style:** Consider using the workflow_run trigger instead to ensure proper build-then-deploy sequence
How can I resolve this? If you propose a fix, please make it concise.
Please note: we will close your PR without comment if you do not check the boxes above and provide ALL requested information.