-
Notifications
You must be signed in to change notification settings - Fork 6
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
Initial work for config cat plugin #61
base: master
Are you sure you want to change the base?
Conversation
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.
Everything looks great, just the failing test and the semver version
@@ -0,0 +1,5 @@ | |||
# Plugin AWS Secrets Manager Changelog | |||
|
|||
## 1.0.0 (TBD) |
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.
## 1.0.0 (TBD) | |
## 0.1.0 (TBD) |
Major 1 indicates this is in its release state. I think we should keep it at 0.1.0 for this stage, we could even append -beta/-alpha/-rc etc
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 did 1.0.0 for the AWS plugin, maybe we should update
"description": "A file loading plugin", | ||
"license": "MIT", | ||
"engines": { | ||
"node": ">=18.0.0" |
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.
Are we not ready for 20?
printConfig: true, | ||
}); | ||
|
||
await expect(configDug.load()).rejects.toThrowError( |
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.
this guy is failing :(
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.
Some small typos in the read me
## The ConfigCat SDK key | ||
|
||
> [!IMPORTANT] | ||
> The ConfigCat SDK key name will be specified within the plugin parameters. This sdk key value will need to be loadedfrom the environment variables in order to be used in this plugin. |
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 ConfigCat SDK key name will be specified within the plugin parameters. This sdk key value will need to be loadedfrom the environment variables in order to be used in this plugin. | |
> The ConfigCat SDK key name will be specified within the plugin parameters. This sdk key value will need to be loaded from the environment variables in order to be used in this plugin. |
|
||
## Adding the plugin to Config Dug | ||
|
||
The ConfigCat flugin can be added to the plugins array in config dug constructor. Keep in mind the plugin load order dictates which values will be used. |
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 ConfigCat flugin can be added to the plugins array in config dug constructor. Keep in mind the plugin load order dictates which values will be used. | |
The ConfigCat plugin can be added to the plugins array in config dug constructor. Keep in mind the plugin load order dictates which values will be used. |
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.
Couple other things
const values: Record<string, unknown> = {}; | ||
|
||
// All feature flag values will be loaded including targeted flags using an undefined target | ||
const configs = await this.client.getAllValuesAsync(); |
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.
Will this get all the feature flags from the organization? Or does the SDK key limit it to a certain project within our org?
}; | ||
}; | ||
|
||
private recordValueOrigins = (values: Record<string, unknown>, origin: string): void => { |
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 we're using the exact same logic here as another plugin, maybe we should put it in the main config cat project and share it instead
Initial work for the config-cat plugin