From 016470f0f8a3665a5856483eb0a93ef8ef08c653 Mon Sep 17 00:00:00 2001 From: Gaurav Agerwala Date: Sun, 7 Dec 2025 09:02:29 -0800 Subject: [PATCH] =?UTF-8?q?Update=20design=20for=20PR=20#2876:=20REFACTOR:?= =?UTF-8?q?=20Shopping=20assistant=20to=20spring=20boot,=20pending=20alloy?= =?UTF-8?q?=20private=20se=E2=80=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/pr-analysis-2876.md | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 docs/pr-analysis-2876.md diff --git a/docs/pr-analysis-2876.md b/docs/pr-analysis-2876.md new file mode 100644 index 00000000000..88e598e844b --- /dev/null +++ b/docs/pr-analysis-2876.md @@ -0,0 +1,40 @@ +# PR #2876: Workflow Design Impact Analysis + +## Affected Workflows +No workflows were identified from the expected `.exp/workflows.json` file, as it does not exist in the repository. Instead, the analysis focuses on GitHub Actions workflows that are impacted by the PR changes in `src/shoppingassistantservice/`. + +- **Continuous Integration - Pull Request** ([ci-pr.yaml](https://github.com/GoogleCloudPlatform/microservices-demo/blob/main/.github/workflows/ci-pr.yaml)): Affected because this workflow triggers on PRs and uses Skaffold to build Docker images for all services defined in `skaffold.yaml`, including `shoppingassistantservice`. The PR refactors this service from Python to Java Spring Boot, changing the build process (e.g., Dockerfile, addition of `pom.xml` and Maven wrapper). Evidence: `skaffold.yaml` lists the service in artifacts (lines 32-33), and the deployment-tests job runs `skaffold run`. + +- **Continuous Integration - Main** ([ci-main.yaml](https://github.com/GoogleCloudPlatform/microservices-demo/blob/main/.github/workflows/ci-main.yaml)): Similar to the PR workflow, affected for pushes to main branch involving src/ changes. It performs code tests and likely deploys via Skaffold, impacting the build of the refactored service. + +Other workflows like `helm-chart-ci.yaml`, `kustomize-build-ci.yaml` are not directly affected as they focus on specific directories not changed by this PR, or do not build images. + +## Continuous Integration - Pull Request Analysis +### Summary of design changes +The PR does not modify the workflow YAML file or its sequence. However, it impacts the execution of the `deployment-tests` job: +- **Build Process Change**: Previously, the Python-based service used `requirements.txt` and `pip` for dependencies and `python shoppingassistantservice.py` as entrypoint. Now, it uses Maven (`pom.xml`) for Java dependencies, Spring Boot application (`ShoppingAssistantApplication.java`), and likely `mvn spring-boot:run` or jar execution in Dockerfile. +- **Implementation**: Added Java files (`ShoppingAssistantController.java`, `ShoppingAssistantApplication.java`, `application.properties`), test class, and build tools. Removed/updated Python files and requirements. Dockerfile is updated to handle Java build (exact diff not inspected, but implied by changes). +- **Potential Benefits**: Aligns with other Java services (e.g., adservice), potentially improves scalability, type safety, and integration with AlloyDB (title mentions pending private service connect). +- **Implications**: CI build time may change; ensure compatibility with Skaffold's Docker build. No unit tests for this service are run in `code-tests` job (only Go and C#); recommend adding `mvn test` for Java services. Deployment may not include this optional service in core profile, but build occurs regardless. + +No Mermaid diagrams found for this workflow's design in documentation, so none need updating. + +## Continuous Integration - Main Analysis +### Summary of design changes +Similar to the PR workflow: +- The code tests job does not include tests for shoppingassistantservice (no change needed there). +- Deployment/build via Skaffold affected in the same way as above. +- Benefits and implications mirror the PR workflow analysis. + +No Mermaid diagrams found, no updates needed. + +## General Summary of PR Changes +This PR refactors the optional `shoppingassistantservice` (an AI assistant using RAG with AlloyDB for product suggestions) from Python to Spring Boot Java. Key changes: +- **New Files**: Maven config (`pom.xml`, `mvnw*`), Java source/controller/app, properties, test class, `.gitattributes`, `.gitignore` updates. +- **Modified Files**: `Dockerfile` (to support Java/Maven build), removal/deprecation of `requirements.*` and `shoppingassistantservice.py`. +- **Pending Work**: Title indicates pending connection to AlloyDB private service, so database integration may not be complete. +- **Testing**: Adds a Spring Boot test class, but not integrated into CI yet. Documentation in `kustomize/components/shopping-assistant/README.md` does not require updates for language change, as it focuses on deployment steps. +- **Impact on Project**: Enables better alignment with enterprise Java ecosystem; affects local development (`skaffold dev`) and any custom deployments using this service/component. + +No changes to core workflows or designs requiring diagram updates. No `.exp` folder or design documents with Mermaid diagrams were found matching the expected structure. +