-
-
Notifications
You must be signed in to change notification settings - Fork 720
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
feat: implement column created_by_user_id in feature_tag #5695
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
1 Ignored Deployment
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The PR makes sense, I'm not sure about import not having the created_by. When you import, you are the culprit (or creator :P) of that imported tag
@@ -24,4 +24,6 @@ export interface FeatureTagSchema { | |||
* @deprecated | |||
*/ | |||
value?: string; | |||
/** The id of the user who created this tag */ | |||
createdByUserId?: number; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If previously it didn't have a user, can we assume system
here? I mean to avoid having it nullable, I feel we're not accomplishing our goal if this is nullable
@@ -35,6 +35,12 @@ export const featureTagSchema = { | |||
description: | |||
'The value of the tag. This property is deprecated and will be removed in a future version of Unleash. Superseded by the `tagValue` property.', | |||
}, | |||
createdByUserId: { | |||
type: 'number', | |||
nullable: true, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a note so we don't forget: maybe we need to make this not nullable, but if this is used as input it might be a breaking change for the API
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah this is part of import/export. So I think it needs to be nullable
@@ -159,4 +159,5 @@ export const featureTagSchema = joi.object().keys({ | |||
tagValue: joi.string(), | |||
type: nameType.optional(), | |||
value: joi.string().optional(), | |||
createdByUserId: joi.number().optional(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is used to validate input. And I believe all new input should have a createdById (but maybe it's a breaking change for the API)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! We agreed on Slack that we might be able to find out who was the actor by looking at the events log, so keeping the field null for now seems reasonable, despite not being sure if we're going to embark on that task.
About the changes
Adds the new nullable column created_by_user_id to the data used by feature-tag-store and feature-tag-service. Also updates openapi schemas.