Skip to content

Attendee/cruz moreno#3353

Open
real-cruz wants to merge 11 commits into
GoogleCloudPlatform:mainfrom
re-cinq:attendee/cruz-moreno
Open

Attendee/cruz moreno#3353
real-cruz wants to merge 11 commits into
GoogleCloudPlatform:mainfrom
re-cinq:attendee/cruz-moreno

Conversation

@real-cruz
Copy link
Copy Markdown

Background

Fixes

Change Summary

Additional Notes

Testing Procedure

Related PRs or Issues

muemich and others added 11 commits May 4, 2026 12:30
Issues found during dress rehearsal:

- Python services (emailservice, recommendationservice) were CrashLooping
  because the gRPC liveness probe defaults to timeoutSeconds=1, which is
  too tight when CPU-throttled. Bumped readiness/liveness timeoutSeconds
  to 5 and bumped Python service CPU requests to 100m.

- provision.sh was writing Ingresses with ingressClassName=nginx, but the
  cluster's IngressClass is named nginx-ingress. nginx-ingress controller
  silently ignored the resource and external-dns never published a record.

- Workflow's training-image-pusher SA could push to GAR but lacked
  container.clusters.get, so get-gke-credentials denied. Added
  roles/container.developer at project scope.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- Add 29 attendee handouts under training/handouts/ for direct sharing.
- Stop tracking emails.txt (kept local) so attendee lists don't end up
  in the public fork.
- provision.sh: detach main repo HEAD before each iteration and use
  -B/worktree-prune so re-runs don't trip on leftover local branches.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…olof-nordberg)

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Re-ignore handouts/ so future cohort runs stay local.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
provision.sh now accepts --no-bug to skip the bug-seed step:
- creates the attendee branch as an empty commit on top of main
- writes a Module-5-shaped handout (URL + branch, points at SpecKit
  workflow instead of BUG_REPORT.md)

Module 3 Ex 3 (bug triage) keeps existing default behaviour.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Adds a storefront search box that calls ProductCatalogService.SearchProducts
over gRPC. The proto contract and a working (over-permissive) backend
implementation already existed; this change wires the frontend and
tightens the backend to match the spec exactly.

Backend (src/productcatalogservice)
- Tighten SearchProducts in product_catalog.go: trim whitespace,
  short-circuit empty queries to an empty result set, match against
  Product.Name only (drop the previous OR-clause that also matched on
  Product.Description). Spec FR-002 / FR-004 / FR-005 / FR-006.
- Expand TestSearchProducts in product_catalog_test.go into an 11-case
  table-driven test (case-insensitivity, whitespace trim, substring,
  empty / whitespace-only, no-match) plus a name-only regression: a new
  mock product whose description contains the search term must NOT be
  returned. Bump TestListProducts expected count to 5.

Frontend (src/frontend)
- New searchProducts client wrapper in rpc.go, mirroring the existing
  getProducts / getProduct pattern.
- New searchHandler in handlers.go: trim q, HTTP 302 -> / on empty query,
  call SearchProducts, convert prices to the user's currency, render
  the search template.
- Register GET/HEAD /search route in main.go next to the home route.
- Add a GET /search form to the shared header.html so the search box is
  reachable from every storefront page.
- New search.html template that renders product cards for non-empty
  results and a no-results panel (pre-filling the search box with the
  submitted query) when the result set is empty.

Constraints honored
- No new services, no new datastore, no new env vars.
- protos/demo.proto unchanged; generated stubs reused.
- Zero diff in helm-chart/, kubernetes-manifests/, kustomize/,
  istio-manifests/, release/, terraform/, cloudbuild.yaml, skaffold.yaml.

See specs/002-product-search/ for spec, plan, tasks, contracts (gRPC +
HTTP), data model, research, and quickstart.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
feat(search): add product search by name (storefront + catalog)
@real-cruz real-cruz requested review from a team and yoshi-approver as code owners May 11, 2026 15:03
@google-cla
Copy link
Copy Markdown

google-cla Bot commented May 11, 2026

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@muemich muemich deleted the attendee/cruz-moreno branch May 11, 2026 15:06
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