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

@hana-linode hana-linode 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-linode hana-linode self-assigned this Apr 11, 2024
@hana-linode hana-linode 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-linode hana-linode marked this pull request as ready for review April 15, 2024 16:57
@hana-linode hana-linode requested a review from a team as a code owner April 15, 2024 16:57
@hana-linode hana-linode 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-linode hana-linode added the Add'tl Approval Needed Waiting on another approval! label Apr 15, 2024
Copy link
Contributor

@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-linode hana-linode merged commit 2a2aa25 into linode:develop Apr 16, 2024
18 checks passed
@hana-linode hana-linode 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.

None yet

4 participants