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

Feature Flags #508

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open

Feature Flags #508

wants to merge 7 commits into from

Conversation

smcclure20
Copy link
Collaborator

TODO:

Resolves #506

Signed-off-by: Sarah McClure <[email protected]>
@smcclure20 smcclure20 requested a review from a team as a code owner January 17, 2025 01:06
Copy link

github-actions bot commented Jan 17, 2025

Unit Test Results

334 tests  +11   334 ✅ +11   7s ⏱️ +3s
 50 suites ± 0     0 💤 ± 0 
  1 files   ± 0     0 ❌ ± 0 

Results for commit 75621f6. ± Comparison against base commit 28181c1.

♻️ This comment has been updated with latest results.

Copy link
Collaborator

@divega divega left a comment

Choose a reason for hiding this comment

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

I have a couple of questions, but looks good to me.

client := paragliderpb.NewCloudPluginClient(conn)
cloudFlags := &paragliderpb.PluginFlags{KubernetesClustersEnabled: cfg.FeatureFlags.PluginFlags[c.Name].KubernetesClustersEnabled,
PrivateEndpointsEnabled: cfg.FeatureFlags.PluginFlags[c.Name].PrivateEndpointsEnabled}
_, err = client.SetFlags(context.Background(), &paragliderpb.SetFlagsRequest{Flags: cloudFlags})
Copy link
Collaborator

Choose a reason for hiding this comment

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

missing logging or returning err?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Good catch!

AttachResourceEnabled bool `yaml:"attachResourceEnabled"`
}

type PluginFlags struct {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Did you consider having a flat struct containing all feature flags? I think I like the simplicity of it, plus it doesn't prevent use from having a feature flag that both orchestrator and plugins need to reason about.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I did, and this may be a good change to make. However, I went with this direction since it makes it extremely clear which ones the plugin developer is responsible for. Otherwise, they may implement some logic for a flag that will only ever be used in the orchestrator. Happy to discuss more though.

Copy link

github-actions bot commented Feb 7, 2025

54.7

For the detailed report, please go to Checks tab, click Build and Test, and then download unit_test_coverage artifact at the bottom of build page.

  • Your PR branch coverage: 54.7 %
  • main branch coverage: 0 %
  • diff coverage: 54.7 %

The coverage result does not include the functional test results.

Copy link

54.7

For the detailed report, please go to Checks tab, click Build and Test, and then download unit_test_coverage artifact at the bottom of build page.

  • Your PR branch coverage: 54.7 %
  • main branch coverage: 0 %
  • diff coverage: 54.7 %

The coverage result does not include the functional test results.

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.

Add feature flags for in development features for the first release
3 participants