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

Implement feature flag #11070

Merged
merged 13 commits into from
Aug 13, 2021
Merged

Implement feature flag #11070

merged 13 commits into from
Aug 13, 2021

Conversation

ousmaneo
Copy link
Contributor

@ousmaneo ousmaneo commented Jul 27, 2021

These changes add components and hooks that allow checking for feature flags.

Motivation and Context

This is part of the Feature flag V1 implementation. It uses featureFlags list set in the config.js file by the backend as the source of flags. Therefore this replaces the environment variable version used in #6367.
ref. #938

How Has This Been Tested?

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Refactoring (non-breaking change)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.

close Graylog2/graylog-plugin-cloud#938

- get feature flag from AppConfig
- add Feature component and useFeature hook
- this change replace the environement variable based feature flag (#6367)
@ousmaneo ousmaneo force-pushed the feature-flag-v1-ui branch from 77a1657 to 8067622 Compare July 27, 2021 12:18
@ousmaneo ousmaneo marked this pull request as ready for review July 28, 2021 08:26
Copy link
Contributor

@AntonEbel AntonEbel left a comment

Choose a reason for hiding this comment

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

As I'm not so familiar with the code base maybe someone else should also review this PR?

graylog2-web-interface/src/components/features/Feature.tsx Outdated Show resolved Hide resolved
@ousmaneo ousmaneo requested a review from edmundoa August 2, 2021 08:47
Copy link
Contributor

@edmundoa edmundoa left a comment

Choose a reason for hiding this comment

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

Added some comments while looking at the code. I'm having some troubles with my local environment so I could not yet test the code.

graylog2-web-interface/src/components/features/Feature.tsx Outdated Show resolved Hide resolved
graylog2-web-interface/src/util/AppConfig.js Outdated Show resolved Hide resolved
graylog2-web-interface/src/util/AppConfig.js Outdated Show resolved Hide resolved
@ousmaneo ousmaneo force-pushed the feature-flag-v1-ui branch from 22084b9 to 2f719a1 Compare August 6, 2021 09:04
Base automatically changed from feature-flags-v1 to master August 13, 2021 08:37
@ousmaneo ousmaneo requested a review from edmundoa August 13, 2021 08:38
Copy link
Contributor

@edmundoa edmundoa left a comment

Choose a reason for hiding this comment

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

Only a suggestion, other than that looks fine to me.

graylog2-web-interface/src/components/features/Feature.tsx Outdated Show resolved Hide resolved
@ousmaneo ousmaneo requested a review from edmundoa August 13, 2021 12:44
Copy link
Contributor

@edmundoa edmundoa left a comment

Choose a reason for hiding this comment

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

Looks good to me, thank you! 👍

@edmundoa edmundoa merged commit 2440f10 into master Aug 13, 2021
@edmundoa edmundoa deleted the feature-flag-v1-ui branch August 13, 2021 14:03
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.

4 participants