Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
88 changes: 88 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,91 @@
## [v3.5.2] - 2026-02-24

### ✨ Features
- add idempotency cache retrieval for transactions with unit tests
- implement idempotency key mapping for transactions and add caching mechanism

### 🐛 Bug Fixes
- update release version
- update version
- suppress gosec G706 false positive on sanitized log input
- remove no-op semantic-release/exec plugin entry
- linting
- add write-behind cache mock expectations to existing transaction tests
- update deps
- remove filterStaleBalances to prevent silent balance update drops
- add redis backup queue for commit/cancel transactions and correct consumer fromTo logic for canceled status
- prevent balance version increment when no actual balance change occurs in Lua script
- replace broken itoa helper with strconv.Itoa for multi-digit support
- remove unused validateTransactionExists function from Redis Lua script
- return updated balance atomically via RETURNING instead of separate read-after-write
- go.sum
- update sqlmock expectations to include balance version columns
- loop through all state transitions in CheckHealth to handle cold-start connections
- adjust semantic release flow
- releaserc
- remove write-behind lookup from RevertTransaction to prevent FK violations
- remove publisher confirms
- skip write-behind update in sync mode to prevent orphaned Redis entries
- fix: add TTL safety nets and correct write-behind cache lifecycle
- add SetNX revert lock with write-behind-first lookup to prevent duplicate reversals
- remove idempotency reverse lookup in favor of write-behind cache
- promote transaction status to APPROVED before write-behind and queue
- resolve async transaction 404 by implementing write-behind cache
- implement NullFields tracking in account updates to support JSON Merge Patch semantics
- race condition, test and remove panic from rabbit initialization
- update RabbitMQ producer to handle publish confirmations and improve idempotency key management
- update version to 3.3.14
- define explicit column lists for account and operation queries to ensure backward compatibility
- update hotfix version to 3.3.13
- implement account alias sanitization in transaction processing and add utility function for alias cleanup
- simplify GitHub Actions workflow by removing hotfix branch triggers and updating tag handling
- update hotfix version from 3.3.11 to 3.3.12 in .releaserc.yml and comment out transaction validation in Lua script
- remove trailing newline at end of Dockerfile for consistent formatting
- change release type for feat from minor to patch in .releaserc.yml
- update application version from 3.3.10 to 3.3.11 in .env.example
- add missing newline at end of Dockerfile for proper formatting
- update hotfix version from 3.3.10 to 3.3.11 in .releaserc.yml
- enhance balance key handling in Redis consumer to ensure default key is used when not specified
- update group size in Lua script and add balance key handling in Redis consumer
- remove trailing newline in Dockerfile for cleaner formatting
- update lib-commons dependency to v2.3.1 in go.mod and go.sum
- update CronTimeToRun and MessageTimeOfLife constants in Redis consumer for improved processing efficiency
- remove handleReturns method and update message publishing parameters in RabbitMQ producer
- implement distributed lock mechanism in Redis consumer to prevent duplicate transaction processing across pods
- add default balance key handling in operation model and update balance structure in Redis consumer
- reduce CronTimeToRun and MessageTimeOfLife constants in Redis consumer to improve responsiveness
- add logging and handle unroutable messages in RabbitMQ producer
- change ContentType to application/octet-stream for msgpack binary payload in RabbitMQ producer
- update lib-commons dependency to v2.3.1 and update go.sum
- add transaction validation in Lua script and enhance error handling in Redis consumer
- enhance error handling for transaction backup cache operations
- add complexity comment
- initialize operations slice for new transactions in PostgreSQL repository
- simplify logging for duplicate operation and transaction inserts
- refactor operation scanning in transaction retrieval to improve handling of nullable fields
- handle nil operation ID in transaction retrieval to prevent nil pointer dereference
- handle unique constraint violations for operation and transaction inserts
- update hotfix branch version to 3.3.10
- add panic recovery and nil validation for transaction messages in Redis consumer
- remove lock deletion on transaction errors after balance retrieval
- update hotfix branch version to 3.3.9
- remove pending transaction lock after errors only
- update next version to 15.5.7 and react to 19.1.2
- update releaserc.yml to version 3.3.8
- update next version to 15.5.7 and react to 19.1.2
- correct comment wording in transaction handler for clarity
- update hotfix branch configuration in release settings
- update version

### 🔧 Maintenance
- Update GitHub Actions workflow to ignore workflow files and remove trigger from hotfix branches.
- update release configuration to remove hotfix branch and rename to maintenance branch
- Update CHANGELOG
- configuring pipe to trigger build on hotfix branches
- configuring pipe to trigger build on hotfix branches
- configuring pipe to trigger build on hotfix branches


## [v3.5.1] - 2026-01-19

### 🐛 Bug Fixes
Expand Down
2 changes: 1 addition & 1 deletion components/crm/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# syntax=docker/dockerfile:1.4

FROM --platform=$BUILDPLATFORM golang:1.25.1-alpine AS builder
FROM --platform=$BUILDPLATFORM golang:1.25.8-alpine AS builder

WORKDIR /crm-app

Expand Down
8 changes: 7 additions & 1 deletion components/crm/api/crm_docs.go
Original file line number Diff line number Diff line change
Expand Up @@ -938,6 +938,12 @@ const docTemplatecrm = `{
"minLength": 2,
"example": "US"
},
"description": {
"description": "A descriptive label for the address (e.g., \"Home\", \"Office\", \"Billing\")\nexample: Home\nmaxLength: 100",
"type": "string",
"maxLength": 100,
"example": "Home"
},
"line1": {
"description": "Primary address line (street address or PO Box)\nexample: 123 Financial Avenue\nmaxLength: 256",
"type": "string",
Expand Down Expand Up @@ -1183,7 +1189,7 @@ const docTemplatecrm = `{
]
},
"document": {
"description": "The holders identification document.",
"description": "The holder's identification document.",
"type": "string",
"example": "91315026015"
},
Expand Down
8 changes: 7 additions & 1 deletion components/crm/api/crm_swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -932,6 +932,12 @@
"minLength": 2,
"example": "US"
},
"description": {
"description": "A descriptive label for the address (e.g., \"Home\", \"Office\", \"Billing\")\nexample: Home\nmaxLength: 100",
"type": "string",
"maxLength": 100,
"example": "Home"
},
"line1": {
"description": "Primary address line (street address or PO Box)\nexample: 123 Financial Avenue\nmaxLength: 256",
"type": "string",
Expand Down Expand Up @@ -1177,7 +1183,7 @@
]
},
"document": {
"description": "The holders identification document.",
"description": "The holder's identification document.",
"type": "string",
"example": "91315026015"
},
Expand Down
10 changes: 9 additions & 1 deletion components/crm/api/crm_swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,14 @@ definitions:
maxLength: 2
minLength: 2
type: string
description:
description: |-
A descriptive label for the address (e.g., "Home", "Office", "Billing")
example: Home
maxLength: 100
example: Home
maxLength: 100
type: string
line1:
description: |-
Primary address line (street address or PO Box)
Expand Down Expand Up @@ -210,7 +218,7 @@ definitions:
- $ref: '#/definitions/Contact'
description: Object with contact information.
document:
description: The holders identification document.
description: The holder's identification document.
example: "91315026015"
type: string
externalId:
Expand Down
23 changes: 22 additions & 1 deletion components/crm/api/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -768,6 +768,7 @@ components:
country: US
zipCode: "10001"
city: New York
description: Home
state: NY
line2: Suite 1500
line1: 123 Financial Avenue
Expand All @@ -790,6 +791,14 @@ components:
maxLength: 2
minLength: 2
type: string
description:
description: |-
A descriptive label for the address (e.g., "Home", "Office", "Billing")
example: Home
maxLength: 100
example: Home
maxLength: 100
type: string
line1:
description: |-
Primary address line (street address or PO Box)
Expand Down Expand Up @@ -830,20 +839,23 @@ components:
country: US
zipCode: "10001"
city: New York
description: Home
state: NY
line2: Suite 1500
line1: 123 Financial Avenue
additional2:
country: US
zipCode: "10001"
city: New York
description: Home
state: NY
line2: Suite 1500
line1: 123 Financial Avenue
primary:
country: US
zipCode: "10001"
city: New York
description: Home
state: NY
line2: Suite 1500
line1: 123 Financial Avenue
Expand Down Expand Up @@ -1086,7 +1098,7 @@ components:
description: Object with contact information.
type: object
document:
description: The holders identification document.
description: The holder's identification document.
example: "91315026015"
type: string
externalId:
Expand Down Expand Up @@ -1139,20 +1151,23 @@ components:
country: US
zipCode: "10001"
city: New York
description: Home
state: NY
line2: Suite 1500
line1: 123 Financial Avenue
additional2:
country: US
zipCode: "10001"
city: New York
description: Home
state: NY
line2: Suite 1500
line1: 123 Financial Avenue
primary:
country: US
zipCode: "10001"
city: New York
description: Home
state: NY
line2: Suite 1500
line1: 123 Financial Avenue
Expand Down Expand Up @@ -1641,20 +1656,23 @@ components:
country: US
zipCode: "10001"
city: New York
description: Home
state: NY
line2: Suite 1500
line1: 123 Financial Avenue
additional2:
country: US
zipCode: "10001"
city: New York
description: Home
state: NY
line2: Suite 1500
line1: 123 Financial Avenue
primary:
country: US
zipCode: "10001"
city: New York
description: Home
state: NY
line2: Suite 1500
line1: 123 Financial Avenue
Expand Down Expand Up @@ -1696,20 +1714,23 @@ components:
country: US
zipCode: "10001"
city: New York
description: Home
state: NY
line2: Suite 1500
line1: 123 Financial Avenue
additional2:
country: US
zipCode: "10001"
city: New York
description: Home
state: NY
line2: Suite 1500
line1: 123 Financial Avenue
primary:
country: US
zipCode: "10001"
city: New York
description: Home
state: NY
line2: Suite 1500
line1: 123 Financial Avenue
Expand Down
28 changes: 14 additions & 14 deletions components/crm/internal/adapters/mongodb/holder/holder.go
Original file line number Diff line number Diff line change
Expand Up @@ -261,13 +261,13 @@ func mapAddressFromEntity(a *mmodel.Address) *AddressMongoDBModel {
}

return &AddressMongoDBModel{
Line1: &a.Line1,
Line2: a.Line2,
ZipCode: &a.ZipCode,
City: &a.City,
State: &a.State,
Country: &a.Country,
// Description: &a.Description, // TODO: Check if this is needed
Line1: &a.Line1,
Line2: a.Line2,
ZipCode: &a.ZipCode,
City: &a.City,
State: &a.State,
Country: &a.Country,
Description: a.Description,
}
}

Expand Down Expand Up @@ -476,12 +476,12 @@ func mapAddressToEntity(a *AddressMongoDBModel) *mmodel.Address {
}

return &mmodel.Address{
Line1: line1,
Line2: a.Line2,
ZipCode: zipCode,
City: city,
State: state,
Country: country,
// Description: a.Description,
Line1: line1,
Line2: a.Line2,
ZipCode: zipCode,
City: city,
State: state,
Country: country,
Description: a.Description,
}
}
32 changes: 32 additions & 0 deletions components/crm/internal/adapters/mongodb/holder/holder_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -400,6 +400,19 @@ func TestMapAddressFromEntity(t *testing.T) {
},
wantNil: false,
},
{
name: "address with description",
address: &mmodel.Address{
Line1: "789 Office Blvd",
Line2: testutils.Ptr("Suite 200"),
ZipCode: "54321",
City: "Business City",
State: "BC",
Country: "US",
Description: testutils.Ptr("Corporate Office"),
},
wantNil: false,
},
}

for _, tt := range tests {
Expand All @@ -417,6 +430,9 @@ func TestMapAddressFromEntity(t *testing.T) {
assert.Equal(t, tt.address.City, *result.City)
assert.Equal(t, tt.address.State, *result.State)
assert.Equal(t, tt.address.Country, *result.Country)
if tt.address.Description != nil {
assert.Equal(t, *tt.address.Description, *result.Description)
}
})
}
}
Expand Down Expand Up @@ -456,6 +472,19 @@ func TestMapAddressToEntity(t *testing.T) {
},
wantNil: false,
},
{
name: "model with description",
model: &AddressMongoDBModel{
Line1: testutils.Ptr("321 Home Lane"),
Line2: testutils.Ptr("Unit 5"),
ZipCode: testutils.Ptr("11111"),
City: testutils.Ptr("Hometown"),
State: testutils.Ptr("HT"),
Country: testutils.Ptr("US"),
Description: testutils.Ptr("Primary Residence"),
},
wantNil: false,
},
}

for _, tt := range tests {
Expand All @@ -473,6 +502,9 @@ func TestMapAddressToEntity(t *testing.T) {
} else {
assert.Empty(t, result.Line1)
}
if tt.model.Description != nil {
assert.Equal(t, *tt.model.Description, *result.Description)
}
})
}
}
Expand Down
Loading
Loading