-
Notifications
You must be signed in to change notification settings - Fork 6
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
Arc-2308 add backend ffs #183
Conversation
18.17.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Forge cli was complaining I was using an old version and was having issues running forge commands. Had to bump, which came parcelled with a need to change this. Will need to merge this PR straight after this one.
} | ||
|
||
const envVars: EnvVars = { | ||
LAUNCHDARKLY_API_KEY: process.env.LAUNCHDARKLY_API_KEY || '', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These have been set for the appId using some forge cli commands. For more info see https://developer.atlassian.com/platform/forge/environments-and-versions/
const errorMsg = `fetching feature flag unexpected status`; | ||
|
||
try { | ||
const response = await fetch(`${BASE_URL}/${featureFlagKey}`, { ...baseHeaders }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using fetch to call the LD API as we currently can't use the @launchdarkly/node-server-sdk due to Forge's lack of support for the Node.js runtime. https://hello.atlassian.net/wiki/spaces/OTFS/pages/2803689031/Forge+Limitations Work is being done to add this support and we can opt in by being onboarded to a feature flag but doing some removed the ability to run forge tunnel
locally... Figured this was our next best option.
app/src/config/feature-flags.ts
Outdated
|
||
async function getFeatureFlag(featureFlagKey: string): Promise<FeatureFlag> { | ||
const eventType = 'retrievingFeatureFlag'; | ||
const errorMsg = `fetching feature flag unexpected status`; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/nit ` without placeholder value and BASE_URL
What's in this PR?
Addition of feature flag module for backend.
Why
So we can make changes, roll them out, and not break shit!
Affected issues
Arc-2308
How has this been tested?
Locally and stg
What's Next?
Start using them 😄