-
Notifications
You must be signed in to change notification settings - Fork 4
feat: added stale comment for stale features in generate types #452
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
Conversation
6b4e36d to
09cc8de
Compare
| readonly: z.boolean(), | ||
| settings: FeatureSettings.partial().optional(), | ||
| sdkVisibility: FeatureSDKVisibility.optional(), | ||
| staleness: z |
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.
we really shouldn't manually update this zodClient.ts file as it's generated from scripts/generate-zodios-client.sh. I have a background agent working on updating that script and fixing all the new type errors, but it will be a larger PR.
09cc8de to
0b33c52
Compare
| if (reason === 'unused') { | ||
| return variable.defaultValue | ||
| } else if (reason === 'released') { | ||
| if (feature.staleness?.metaData?.releaseVariation) { |
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 there is no released variation, maybe select the one with the highest distribution % or number of evaluations if we can fetch that?
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.
would maybe like to add that as metadata from the backend instead of figuring out here in the cli
0b33c52 to
3a6c4b0
Compare
3a6c4b0 to
9449e95
Compare
src/commands/generate/types.ts
Outdated
| ) | ||
|
|
||
| this.features = [ | ||
| ...(await fetchAllCompletedOrArchivedFeatures( |
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.
promise.all these two so we its not a waterfall
9449e95 to
185b25a
Compare
src/commands/generate/types.ts
Outdated
| this.authToken, | ||
| this.projectKey, | ||
| ) | ||
| this.features = await Promise.all([ |
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.
nit:
instead of the .then() you can just get the completedFeatures and staleFeatures as a return value and then have the this.features be a spread of both like you had before
185b25a to
b2eb873
Compare
b2eb873 to
3412ad1
Compare
3412ad1 to
d4ad87d
Compare
Changes