From 0765ec91b422bc640932f294183d22a6e2d81d76 Mon Sep 17 00:00:00 2001 From: Charan Kamarapu Date: Fri, 1 May 2026 00:59:44 +0530 Subject: [PATCH 1/3] fix: change order successful message Signed-off-by: Charan Kamarapu --- producer/handlers/order.go | 2 +- producer/models/order.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/producer/handlers/order.go b/producer/handlers/order.go index 1fd8ca9..c32612a 100644 --- a/producer/handlers/order.go +++ b/producer/handlers/order.go @@ -94,7 +94,7 @@ func (h *OrderHandler) CreateOrder(w http.ResponseWriter, r *http.Request) { log.Printf("Kafka event published for order %s", order.ID) } - order.Status = "created" + order.Status = "order created" w.Header().Set("Content-Type", "application/json") w.WriteHeader(http.StatusCreated) json.NewEncoder(w).Encode(map[string]interface{}{ diff --git a/producer/models/order.go b/producer/models/order.go index 4be1e0e..28a08ca 100644 --- a/producer/models/order.go +++ b/producer/models/order.go @@ -16,7 +16,7 @@ type Order struct { Quantity int `json:"quantity"` Price float64 `json:"price"` Status string `json:"status"` - ReceiptKey string `json:"receipt_s3_key,omitempty"` + ReceiptKey string `json:"receipt_s3_ke,omitempty"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` } From 6b35fe5edf416aeba503ce685e97ef9526704810 Mon Sep 17 00:00:00 2001 From: Charan Kamarapu Date: Fri, 1 May 2026 01:57:06 +0530 Subject: [PATCH 2/3] fix: restore receipt_s3_key JSON tag on Order struct Tag had been truncated to receipt_s3_ke, breaking response payloads on POST /api/orders and GET /api/orders for any client deserializing the receipt key. Co-Authored-By: Claude Opus 4.7 (1M context) --- producer/models/order.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/producer/models/order.go b/producer/models/order.go index 28a08ca..4be1e0e 100644 --- a/producer/models/order.go +++ b/producer/models/order.go @@ -16,7 +16,7 @@ type Order struct { Quantity int `json:"quantity"` Price float64 `json:"price"` Status string `json:"status"` - ReceiptKey string `json:"receipt_s3_ke,omitempty"` + ReceiptKey string `json:"receipt_s3_key,omitempty"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` } From cb5403b270ed3b5467148258d299f98f566548dd Mon Sep 17 00:00:00 2001 From: Shubham Jain Date: Sat, 21 Nov 2026 00:52:07 +0530 Subject: [PATCH 3/3] fix: run LocalStack 4.14.0 in compose and the k8s deployment (#9) fix: run LocalStack 4.14.0 in compose and the k8s deployment Signed-off-by: slayerjain --- docker-compose.yml | 8 +++++++- orderflow-k8s/base/localstack/deployment.yaml | 12 +++++++++--- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index ebdd979..c78eded 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -78,7 +78,13 @@ services: # LocalStack for S3 emulation localstack: - image: localstack/localstack:3.0 + # 4.14.0, not 3.0: 3.0 is 3.0.2 on Debian 12 (glibc 2.36), whose setenv + # frees the environ array it outgrows while another thread's getenv may + # still read it. LocalStack adds its AWS credentials to the environment + # at startup while its analytics thread is in getaddrinfo, and about one + # start in 2000 dies of SIGSEGV (exit 245). 4.14.0 is Debian 13 (glibc + # 2.41, which keeps the old array) and starts without an auth token. + image: localstack/localstack:4.14.0 container_name: orderflow-localstack ports: - "4566:4566" diff --git a/orderflow-k8s/base/localstack/deployment.yaml b/orderflow-k8s/base/localstack/deployment.yaml index c3c4ec9..18f52a5 100644 --- a/orderflow-k8s/base/localstack/deployment.yaml +++ b/orderflow-k8s/base/localstack/deployment.yaml @@ -45,12 +45,13 @@ spec: app: localstack spec: # ── Mac ARM64 (Apple Silicon) ────────────────────────────────────────── - # localstack/localstack:3.0 ships a native linux/arm64 layer. + # localstack/localstack:4.14.0 ships a native linux/arm64 layer. It is + # the compose file's LocalStack (see the reason there). nodeSelector: kubernetes.io/arch: arm64 containers: - name: localstack - image: localstack/localstack:3.0 + image: localstack/localstack:4.14.0 ports: - containerPort: 4566 env: @@ -61,8 +62,13 @@ spec: - name: AWS_DEFAULT_REGION value: "us-east-1" volumeMounts: + # The hook alone (subPath), not the whole ConfigMap volume: + # LocalStack 4.x runs every script under ready.d, its + # subdirectories too, so it would also run the copy in the + # volume's hidden timestamped directory, and run the hook twice. - name: localstack-init - mountPath: /etc/localstack/init/ready.d + mountPath: /etc/localstack/init/ready.d/init.sh + subPath: init.sh - name: localstack-data mountPath: /var/lib/localstack readinessProbe: