Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: make sure we have a user in event store (#3072)
## About the changes Spotted some issues in logs: ```json { "level":"warn", "message":"Failed to store \"feature-environment-variants-updated\" event: error: insert into \"events\" (\"created_by\", \"data\", \"environment\", \"feature_name\", \"pre_data\", \"project\", \"tags\", \"type\") values (DEFAULT, $1, $2, $3, $4, $5, $6, $7) returning \"id\", \"type\", \"created_by\", \"created_at\", \"data\", \"pre_data\", \"tags\", \"feature_name\", \"project\", \"environment\" - null value in column \"created_by\" violates not-null constraint", "name":"lib/db/event-store.ts" } ``` In all other events we're doing the following: https://github.com/Unleash/unleash/blob/b7fdcd36c08fcd9461fef930767606962e73d59c/src/lib/services/segment-service.ts#L80 So this is just mimicking that to quickly release a patch, but I'll look into a safer (type-checked) solution so this problem does not happen again
- Loading branch information
Gastón Fournier
committed
Feb 9, 2023
1 parent
b7fdcd3
commit b76e66f
Showing
2 changed files
with
9 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters