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

feat: list known features #157

Merged
merged 2 commits into from
Oct 29, 2024
Merged

feat: list known features #157

merged 2 commits into from
Oct 29, 2024

Conversation

sighphyre
Copy link
Member

@sighphyre sighphyre commented Oct 29, 2024

Adds a very simple way to list the features known to the engine at the time of calling. This is to support SDKs like .NET/Go/Java which have a current option to list the features and is typically used to iterate those features and evaluate them all. For the consuming code, this produces a list of objects that look like

{
"name" "The name of the feature toggle",
"project": "The project the feature belongs to",
"type": "Experiment, kill switch, etc, only sent if the feature response includes this, some older formats don't"
}

Currently only implemented in the FFI layers for Ruby and .NET.

Copy link
Contributor

@gastonfournier gastonfournier left a comment

Choose a reason for hiding this comment

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

LGTM! But I'm surprised the feature_type is optional


public string Project { get; set; }

public string? Type { get; set; }
Copy link
Contributor

Choose a reason for hiding this comment

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

Is the type optional?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeeeaa... maybe. This is a good question. I've derived the type here from the types defined in our core Unleash Types rust library, which says this is optional. As for the actual question. I don't think this is optional in modern versions of Unleash but it's non existent in older versions. Not sure how far we back we have to go but there's at least one set of humans using Unleash v3 and I just haven't checked

@sighphyre sighphyre merged commit 443f662 into main Oct 29, 2024
6 checks passed
@sighphyre sighphyre deleted the feat/list-known-features branch October 29, 2024 11:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants