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: add server-side feature flags #2023

Merged
merged 9 commits into from
Jan 15, 2025

Conversation

abvthecity
Copy link
Contributor

@abvthecity abvthecity commented Jan 15, 2025

  • add FeatureFlags config block to navigation nodes, and evaluates it on the frontend
  • enables configuring sdk-key for server-side evaluations
  • uses the same logical and/or construct as with permissions
  • continue to pass the entire navigation hierarchy to enable client-side evaluation. we won't support server-side evaluation here, because server-side pruning is an auth feature.
  • use the feature flag to evaluate on the server-side whether or not to render a 404
  • pass the initial flags to the frontend to bootstrap SSR'd feature flag evaluation (prevent FOUC)

Copy link

vercel bot commented Jan 15, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
rbac.ferndocs.com ❌ Failed (Inspect) Jan 15, 2025 4:43pm
1 Skipped Deployment
Name Status Preview Updated (UTC)
fern-shell ⬜️ Ignored (Inspect) Jan 15, 2025 4:43pm

@abvthecity abvthecity had a problem deploying to Preview - app-dev.buildwithfern.com January 15, 2025 16:44 — with GitHub Actions Error
@abvthecity abvthecity had a problem deploying to Preview - app.buildwithfern.com January 15, 2025 16:44 — with GitHub Actions Error
Copy link

@abvthecity abvthecity marked this pull request as ready for review January 15, 2025 16:44
@abvthecity abvthecity enabled auto-merge (squash) January 15, 2025 16:44
@abvthecity abvthecity had a problem deploying to Preview - app-dev.buildwithfern.com January 15, 2025 16:45 — with GitHub Actions Failure
@abvthecity abvthecity had a problem deploying to Preview - app.buildwithfern.com January 15, 2025 16:45 — with GitHub Actions Failure
Copy link

Copy link

Copy link

Copy link

Copy link

github-actions bot commented Jan 15, 2025

📦 Next.js Bundle Analysis for fern-platform-monorepo

This analysis was generated by the Next.js Bundle Analysis action. 🤖

This PR introduced no changes to the JavaScript bundle! 🙌

});
}

export const createLdPredicate = async ({
Copy link
Member

Choose a reason for hiding this comment

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

I take it this means that the logic is that node ff are or'd. Makes sense to me!

Copy link
Member

@RohinBhargava RohinBhargava left a comment

Choose a reason for hiding this comment

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

Looks great to me! I like that the adapter makes it so that this can be extended to other providers as well, if we need to support them

Copy link

github-actions bot commented Jan 15, 2025

PR Preview

Copy link

Copy link

github-actions bot commented Jan 15, 2025

Playwright test results

passed  95 passed
flaky  4 flaky
skipped  2 skipped

Details

stats  101 tests across 9 suites
duration  1 minute, 42 seconds
commit  bd56541

Flaky tests

chromium › skew-protection/index.test.ts › should contain ?dpl= or x-deployment-id header on all scripts and prefetch requests
chromium › smoke/favicon.spec.ts › Check if favicon exists and URL does not return 404 for api.qdrant.tech
chromium › smoke/favicon.spec.ts › Check if favicon exists and URL does not return 404 for docs.fluidstack.io
chromium › smoke/favicon.spec.ts › Check if favicon exists and URL does not return 404 for docs.stack-auth.com

Skipped tests

chromium › posthog.spec.ts › Posthog loads successfully
chromium › websockets/websocket.spec.ts › websocket test

@abvthecity abvthecity had a problem deploying to Preview - app.buildwithfern.com January 15, 2025 17:29 — with GitHub Actions Error
@abvthecity abvthecity had a problem deploying to Preview - app-dev.buildwithfern.com January 15, 2025 17:29 — with GitHub Actions Error
Copy link

Copy link

@abvthecity abvthecity merged commit 785f1e7 into main Jan 15, 2025
18 of 20 checks passed
@abvthecity abvthecity deleted the ajiang/add-feature-flag-settings branch January 15, 2025 17:38
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.

3 participants