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

Initial work for config cat plugin #61

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

Neo-Malcolm-Fischer
Copy link
Collaborator

Initial work for the config-cat plugin

@Neo-Malcolm-Fischer Neo-Malcolm-Fischer marked this pull request as ready for review January 13, 2025 21:57
Copy link
Contributor

@AdamTranquilla AdamTranquilla left a 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)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
## 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

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"
Copy link
Contributor

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(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this guy is failing :(

Copy link

@neo-michelepiperni neo-michelepiperni left a 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.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
> 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.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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.

Copy link

@neo-michelepiperni neo-michelepiperni left a 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();

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 => {

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

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 this pull request may close these issues.

3 participants