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

refactor: [M3-7770] - isFeatureEnabledV2 to check for feature flag AND account capability #10371

Merged
merged 5 commits into from
Apr 16, 2024

Conversation

hana-akamai
Copy link
Contributor

@hana-akamai hana-akamai commented Apr 11, 2024

Description 📝

Deprecate isFeatureEnabled function and add new function isFeatureEnabledV2 which uses AND logic instead of OR

Preview 📷

Capabilities On Capabilities Off
LD Feature Flag On Show feature: YES Show feature: NO
LD Feature Flag Off Show feature: NO Show feature: NO

As an Author I have considered 🤔

Check all that apply

  • 👀 Doing a self review
  • ❔ Our contribution guidelines
  • 🤏 Splitting feature into small PRs
  • ➕ Adding a changeset
  • 🧪 Providing/Improving test coverage
  • 🔐 Removing all sensitive information from the code and PR description
  • 🚩 Using a feature flag to protect the release
  • 👣 Providing comprehensive reproduction steps
  • 📑 Providing or updating our documentation
  • 🕛 Scheduling a pair reviewing session
  • 📱 Providing mobile support
  • ♿ Providing accessibility support

@hana-akamai hana-akamai self-assigned this Apr 11, 2024
@hana-akamai hana-akamai changed the title refactor: [M3-7770] - isFeatureEnabled to check for feature flag AND account capability refactor: [M3-7770] - isFeatureEnabledV2 to check for feature flag AND account capability Apr 15, 2024
@hana-akamai hana-akamai marked this pull request as ready for review April 15, 2024 16:57
@hana-akamai hana-akamai requested a review from a team as a code owner April 15, 2024 16:57
@hana-akamai hana-akamai requested review from mjac0bs and jaalah-akamai and removed request for a team April 15, 2024 16:57
Copy link
Contributor

@cpathipa cpathipa left a comment

Choose a reason for hiding this comment

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

LGTM!

@hana-akamai hana-akamai added the Add'tl Approval Needed Waiting on another approval! label Apr 15, 2024
Copy link
Member

@bnussman-akamai bnussman-akamai left a comment

Choose a reason for hiding this comment

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

Using a "v2 function" sounds good to me 👍

While we probably don't need it, we might want to add some unit tests

packages/manager/src/utilities/accountCapabilities.ts Outdated Show resolved Hide resolved
Copy link
Contributor

@mjac0bs mjac0bs left a comment

Choose a reason for hiding this comment

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

Approving pending Banks' suggested changes are made, and I had a couple optional suggestions for clarity, too.

packages/manager/src/utilities/accountCapabilities.ts Outdated Show resolved Hide resolved
packages/manager/src/utilities/accountCapabilities.ts Outdated Show resolved Hide resolved
@mjac0bs mjac0bs added Approved Multiple approvals and ready to merge! and removed Add'tl Approval Needed Waiting on another approval! labels Apr 16, 2024
Copy link

Coverage Report:
Base Coverage: 81.79%
Current Coverage: 81.8%

@hana-akamai hana-akamai merged commit 2a2aa25 into linode:develop Apr 16, 2024
18 checks passed
@hana-akamai hana-akamai deleted the M3-7770-is-feature-enabled branch April 16, 2024 17:36
mjac0bs pushed a commit to mjac0bs/manager that referenced this pull request Apr 18, 2024
…D account capability (linode#10371)

## Description 📝
Deprecate `isFeatureEnabled` function and add new function `isFeatureEnabledV2` which uses AND logic instead of OR

## Preview 📷
|  | Capabilities On   | Capabilities Off |
| ------- | ------- | ------- |
| LD Feature Flag On | Show feature: YES | Show feature: NO |
| LD Feature Flag Off | Show feature: NO | Show feature: NO |
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Approved Multiple approvals and ready to merge!
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants