diff --git a/.exp/design-workflow-1-local-development-workflow.md b/.exp/design-workflow-1-local-development-workflow.md index 2fa3ae092cc..b208d274a40 100644 --- a/.exp/design-workflow-1-local-development-workflow.md +++ b/.exp/design-workflow-1-local-development-workflow.md @@ -77,6 +77,7 @@ During development, Skaffold monitors file changes in build contexts. Upon detec ## Additional High-Level Design Aspects ### Build Process Details +- **.NET Services (cartservice)**: Uses `dotnet publish` in Dockerfile with multi-stage build; depends on grpc.tools for protobuf compilation. To ensure ARM64 compatibility, use Grpc.AspNetCore and Grpc.HealthCheck versions <=2.67.0 (e.g., PR #3068 downgraded from 2.71.0 to fix protoc exit code 139 on linux_arm64). - **Platforms**: Supports `linux/amd64` and `linux/arm64` for multi-arch builds. - **Local Build**: Uses `local` builder with `useDockerCLI: true` and `useBuildkit: true` for fast, cached builds without pushing to a registry. - **Dependencies**: Some services require proto generation (via `genproto.sh` scripts); generated files (e.g., `demo.pb.go`) are included in source trees and built into images. Changes to `.proto` files may require manual regeneration before rebuild. diff --git a/.exp/design-workflow-2-gke-deployment-workflow.md b/.exp/design-workflow-2-gke-deployment-workflow.md index 6d8df079df8..252871dbdd9 100644 --- a/.exp/design-workflow-2-gke-deployment-workflow.md +++ b/.exp/design-workflow-2-gke-deployment-workflow.md @@ -17,7 +17,7 @@ Post-deployment, the frontend is accessible via the external IP of the `frontend ## Components - **Skaffold**: Core orchestrator handling build-push-deploy cycle. Configured for multi-platform builds (linux/amd64, linux/arm64), local Docker/Buildkit, or Google Cloud Build via profiles. -- **Dockerfiles**: Service-specific in `src//`, e.g., multi-stage builds for Java (adservice), Go (frontend), Node.js (currencyservice), etc. +- **Dockerfiles**: Service-specific in `src//`, e.g., multi-stage builds for Java (adservice), Go (frontend), Node.js (currencyservice), .NET (cartservice with `dotnet publish` requiring grpc version 2.67.0 for ARM64 compatibility per PR #3068), etc. - **Container Registry**: Stores built images; specified via `--default-repo` (e.g., `us-docker.pkg.dev/PROJECT_ID/microservices-demo`). - **Kustomize**: Renders manifests from `kubernetes-manifests/`, allowing patches for image tags and optional components (e.g., Redis, Istio commented out). - **Kubernetes Resources**: Deployments, Services, ConfigMaps, etc., for 10+ microservices plus Redis. LoadGenerator deployed separately via Skaffold module. diff --git a/pr-analysis-3068.md b/pr-analysis-3068.md new file mode 100644 index 00000000000..c04de755e91 --- /dev/null +++ b/pr-analysis-3068.md @@ -0,0 +1,33 @@ +# PR #3068: Workflow Design Impact Analysis + +## Affected Workflows +- **Local Development Workflow**: The PR modifies `src/cartservice/src/cartservice.csproj` by downgrading Grpc.AspNetCore and Grpc.HealthCheck packages from version 2.71.0 to 2.67.0. This file is used during the Docker image build for the cartservice microservice, which is triggered by Skaffold in the `skaffold dev` command. The change fixes a build failure on ARM64 platforms (e.g., Apple M2 MacBook, Raspberry Pi), ensuring the workflow executes successfully on diverse hardware without altering the overall design. + +- **GKE Deployment Workflow**: Similar to local development, the `skaffold run` command builds and pushes images, including cartservice, using the updated csproj file. This resolves ARM64 build issues during deployment to GKE clusters that may use ARM nodes or during local cross-compilation. + +- **Cloud Build CI/CD Pipeline**: The `cloudbuild.yaml` invokes `skaffold run`, which performs the same image builds. The fix ensures Cloud Build steps complete on ARM64-compatible builders, improving CI/CD reliability. + +- **Release Process**: The release scripts in `docs/releasing/`, such as `make-docker-images.sh`, explicitly build the cartservice image using its Dockerfile and csproj. The downgrade fixes build errors when releasing on or for ARM64 architectures. + +## Local Development Workflow Analysis +### Summary of design changes +The PR does not introduce new steps, modify components, or alter interactions in the Local Development Workflow design. It addresses a specific regression in the grpc.tools package (version 2.71.0) that caused `protoc` to crash with exit code 139 during `dotnet publish` for cartservice on linux_arm64 targets. This fix aligns with the documented support for multi-arch builds (linux/amd64 and linux/arm64) by ensuring the Docker build step for cartservice succeeds. + +No updates to the Mermaid diagrams are required, as the high-level sequences (initial deployment and hot reload) remain unchanged. The improvement is internal to the build artifact creation for one service. + +The documented design in `.exp/design-workflow-1-local-development-workflow.md` already states support for ARM64 platforms under "Build Process Details." The design doc has been updated under "Build Process Details" to include a note on cartservice's grpc version requirement for ARM64 builds, referencing this PR. + +## GKE Deployment Workflow Analysis +### Summary of design changes +Similar to the local development workflow, the PR fixes an implementation detail in the cartservice image build step without changing the sequence diagram flows for direct deployment or Cloud Build variant. It enhances multi-architecture support, which is explicitly mentioned in the design doc under Components and Customization sections. + +No Mermaid diagram updates needed. The design doc has been updated under "Components" to note cartservice's grpc version requirement for ARM64 builds, referencing this PR. This enhances documentation of multi-architecture support. + +## Cloud Build CI/CD Pipeline Analysis +### Summary of design changes +No design documentation file (`.exp/design-workflow-6.md`) was found for this workflow. However, the workflow description in `.exp/workflows.json` indicates it automates Docker image builds via Cloud Build and Skaffold. The PR's fix to cartservice build ensures this pipeline succeeds on ARM64 environments, preventing deployment failures due to build errors. No design changes; it's a reliability improvement. + +## Release Process Analysis +### Summary of design changes +No design documentation file (`.exp/design-workflow-7.md`) found. Per `.exp/workflows.json`, the process builds tagged images using release scripts. The change in cartservice.csproj fixes the build step for cartservice during release image creation, particularly beneficial for multi-arch or ARM64 release builds. No structural changes to the workflow design. +