Skip to content

central-instance-v1.0

Latest

Choose a tag to compare

@holashchand holashchand released this 17 Jul 06:55

Central Instance Change Summary

Central instance change allows the services to be deployed as single instance for multiple tenants while allowing the data per tenant to be in separate database schema when enabled.

Central Instance Compatible Services

  • egov-otp
  • egov-user
  • mdms-v2
  • egov-workflow-v2
  • user-otp

Breaking Change

1. Service Affected - Central Instance Compatible Services

Description

The URL used for flyway migration in devops should not contain currentSchema as it appends currentSchema based on SCHEMA_NAME (comma separated schema names) environment variable.

2. Service Affected - Encryption Service

Issue & Resolution Summary

While migrating from earlier version to this version for egov-enc-service, it should cause flyway migration issue. To fix flyway migration issue with new breaking change, follow the below steps -

Tables - egov_enc_service_schema
Resolution - Remove a row from the above flyway migration table in public schema. There should be only 1 row present currently
Steps -

  • Check for the flyway migration history table for egov_enc_service using devops environment variable SCHEMA_TABLE for the service. ie. egov_enc_service_schema
  • Confirm if there is only 1 table row SELECT * FROM public.egov_enc_service_schema
  • Delete the table row DELETE FROM public.egov_enc_service_schema

Why it needs to be done?

  • Currently flyway migration contains hardcoded schema name as public , which is removed to allow migration to run on given database schema not just public schema.
  • This caused change need in the existing schema migration script.
  • To resolve this, we need to remove the migration history row as described in the above steps.

What if you migrate this in production environment?

  • If deployed previously (without the fix): Will cause CrashLoopBackOff due to DB migration failure.
  • If deployed fresh: No issue.
  • With this fix applied: Service runs as expected with no side effects on existing data.

What's Changed

New Contributors