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
POST endpoint for demo datasource project #1487
Conversation
GB-292 Demo Datasource -> Endpoint for creating the demo datasource resources
Work on POST /demo-datasource-project endpoints with logic about what datasources, experiments, and metrics we want to set up |
Your preview environment pr-1487-bttf has been deployed. Preview environment endpoints are available at: |
packages/back-end/src/routers/demo-datasource-project/demo-datasource-project.controller.ts
Outdated
Show resolved
Hide resolved
packages/back-end/src/routers/demo-datasource-project/demo-datasource-project.router.ts
Outdated
Show resolved
Hide resolved
packages/front-end/components/GuidedGetStarted/GuidedGetStarted.tsx
Outdated
Show resolved
Hide resolved
packages/back-end/src/routers/demo-datasource-project/demo-datasource-project.controller.ts
Outdated
Show resolved
Hide resolved
const ratioMetric = await createMetric({ | ||
...DEMO_RATIO_METRIC, | ||
denominator: metrics.find( | ||
(x) => x.name === "Purchases - Number of Orders (72 hour window)" |
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.
This seems very fragile
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.
I created a constant name that can be used in both places, and made sure the denominator existed before doing anything with it.
packages/back-end/src/routers/demo-datasource-project/demo-datasource-project.controller.ts
Outdated
Show resolved
Hide resolved
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.
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.
After the latest SSL change, it works.
Features and Changes
POST /demo-datasource-project
private endpoint, in line with https://www.notion.so/growthbook/Tech-Spec-Sample-Datasource-Creation-42936c77e753476d8be99c0b02c848ebTODO:
Dependencies
Testing
In-app testing for now, see Loom below.
Screenshots
Loom: https://www.loom.com/share/5a25fcebd5ce45d3aba6a365f3fba64e