Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Analytics] - Refund status serialization issue for ckh analytics #5188

Closed
ivor11 opened this issue Jul 3, 2024 · 1 comment · Fixed by #5199
Closed

[Analytics] - Refund status serialization issue for ckh analytics #5188

ivor11 opened this issue Jul 3, 2024 · 1 comment · Fixed by #5199
Assignees

Comments

@ivor11
Copy link
Contributor

ivor11 commented Jul 3, 2024

pub enum RefundStatus {
    Failure,
    ManualReview,
    #[default]
    Pending,
    Success,
    TransactionFailure,
}

RefundStatus enum is serialized to snake_case but when the same event is pushed to kafka it is retained in camelCase.
Due to this refund_status in clickhouse refunds table is in camelCase and ckh queries for analytics return 0 when refund_status = 'success' filter is applied

@ivor11
Copy link
Contributor Author

ivor11 commented Jul 3, 2024

possible solns

  • find a way to use camelCase refund_status values for ckh queries
  • use #[serde(rename_all = "snake_case")] on RefundStatus and run migrations on clickhouse to match psql enum values

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 a pull request may close this issue.

2 participants