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

POST endpoint for demo datasource project #1487

Merged
merged 20 commits into from Aug 11, 2023
Merged

POST endpoint for demo datasource project #1487

merged 20 commits into from Aug 11, 2023

Conversation

lukesonnet
Copy link
Contributor

@lukesonnet lukesonnet commented Jul 20, 2023

Features and Changes

  • Closes GB-292

TODO:

  • Update descriptions of experiments, identifier types, and more copy to explain the created objects
  • Consider adding a feature
  • Better error handling in endpoint
  • Update dates once we know the schedule of cron jobs for postgres instance

Dependencies

Testing

In-app testing for now, see Loom below.

Screenshots

Loom: https://www.loom.com/share/5a25fcebd5ce45d3aba6a365f3fba64e

@linear
Copy link

linear bot commented Jul 20, 2023

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

@github-actions
Copy link

github-actions bot commented Jul 20, 2023

Your preview environment pr-1487-bttf has been deployed.

Preview environment endpoints are available at:

@tinahollygb tinahollygb mentioned this pull request Jul 21, 2023
1 task
@lukesonnet lukesonnet marked this pull request as ready for review July 25, 2023 21:47
@lukesonnet lukesonnet changed the title [WIP] POST endpoint for demo datasource project POST endpoint for demo datasource project Jul 25, 2023
const ratioMetric = await createMetric({
...DEMO_RATIO_METRIC,
denominator: metrics.find(
(x) => x.name === "Purchases - Number of Orders (72 hour window)"
Copy link
Member

Choose a reason for hiding this comment

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

This seems very fragile

Copy link
Contributor Author

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.

@lukesonnet lukesonnet requested a review from jdorn August 2, 2023 18:21
Copy link
Contributor

@tinahollygb tinahollygb left a comment

Choose a reason for hiding this comment

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

I experienced an issue when pulling this into my code. I'm guessing it won't work unless the datasource exists, and it doesn't.

image

@tinahollygb tinahollygb self-requested a review August 3, 2023 22:32
Copy link
Contributor

@tinahollygb tinahollygb left a 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.

@lukesonnet lukesonnet merged commit 5e8efbf into main Aug 11, 2023
3 checks passed
@lukesonnet lukesonnet deleted the lsonnet/demo-post branch August 11, 2023 20:13
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.

None yet

3 participants