---
# System prepended metadata

title: Release Plan 05/09/2022

---

# Release Plan 05/09/2022

## Features

- Foodmen slotting (phase 2: with priority 3 & 4)
- Foodmen blocking

## Services

- Core
- Dispatcher-v2
- Queue
- Karagar

## Code Changes

- https://magic.pathao.com/food/core/compare/4.25.13...4.26.0
- https://magic.pathao.com/food/dispatcher-v2/compare/2.4.1...2.5.0
- https://magic.pathao.com/food/karagar/compare/1.0.4...1.0.5

## Container Images

- Core: harbor.pathaointernal.com/food/core:4.26.0
- Dispatcher-v2: harbor.pathaointernal.com/food/dispatcher-v2:2.5.0
- Karagar: harbor.pathaointernal.com/food/karagar:1.0.5

## Deployment Procedures

Core -> Dispatcher-v2 -> Karagar

- Core deploy
- set replica 0 at core deployment (with nr)
- run migration
- dispatcher-v2 deploy
- apply consul and migration for dispatcher
- karagar deploy
- apply consul and migration for karagar

### Configs/Commands/Migrations

#### Core

- migration in order app
- ```sql=
  UPDATE "oms"."currency_settings" SET "slotting_commission_rate" = '{"0": 20, "1": 0, "2": 0, "3": 0, "4": 0}' WHERE "city_id" = 1;
  ```

#### Dispatcher-v2

- consul
  ```yaml
    app:
      order_accept_timeout: 19s # secs
      city_wise_dispatch:
        3:
          order_accept_timeout: s5s # secs
        4:
          order_accept_timeout: 45s # secs
  ```
- migration:
  ```sql
  ALTER TABLE order_details
  DROP COLUMN slotting_priority;
  ALTER TABLE order_details ADD slotting_info JSON(128);
  ```
  
# Karagar

- consul
  ```yaml
  app:
    auto_unblock_driver_after: "72h"
  ```
- schema changes
  ```sql
  CREATE TABLE IF NOT EXISTS "blocked_driver" (
    "id" SERIAL PRIMARY KEY,
    "driver_id" int4 NOT NULL,
    "is_blocked" bool,
    "blocked_at" timestamptz,
    "block_until" timestamptz,
    "is_suspended" bool,
    "suspended_at" timestamptz,
    "unsuspended_at" timestamptz,
    "updated_by" varchar(50),
    "updated_at" timestamptz NOT NULL DEFAULT now()
  );

  CREATE UNIQUE INDEX "blocked_driver_driver_id" ON "public"."blocked_driver" USING BTREE ("driver_id");
  ```

### Kong Pappings

N/A

## Testing

- dev support is needed for zone creation, data update in db and consul

## Rollback Policy

- counsul and db migration need to revert bact (core must)
- all deploymens need to revert bact to prior container image
