Skip to content

Conversation

@devindford
Copy link
Contributor

Description

Created a new backend service with a bad query to work with DBM in the application

How to test

  1. Pull this branch down locally
  2. Run cp .env.template .env && cp .env.template ./deploy/docker-compose/.env && cp .env.template ./services/frontend/site/.env.local
  3. run docker-compose --profile dbm up
  4. goto http://localhost:7595/get-item in your browser or run a GET in your favorite API testing suite (postman, insomnia, etc)
  5. Ensure you get back an item, it should look like the following
{
  "description": "Drive admit newspaper tax war company partner.",
  "id": 8903,
  "image_url": "https://placekitten.com/329/165",
  "last_hour": "7",
  "order_count": "4985"
}

That is it, I need to create the frontend connection for this, but wanted to get some eyes on this. Also it looks like the real struggle is getting DBM setup with our way of doing things. I may need to try a few things, following the docs, I'm getting snagged with the setting of the different values for the config and the portion where we run the setting of shared_preload_libraries = pg_stat_statements. For whatever reason it just fails every time, need to do more digging but the groundwork is here.

Copy link
Collaborator

Choose a reason for hiding this comment

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

is this a temp file or something?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Honestly not sure, wasn't going to commit it but then noticed that there was a ton of these files. I'm not exactly sure what they're for and if we even need them (in the repo at least).

Copy link
Collaborator

Choose a reason for hiding this comment

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

Oh yea, I see what you mean. Maybe we should try deleting them, restarting the app locally, and see if it blows up or if the backend will auto-generate them. And then add that /storage dir to .gitignore

We try that separately from this PR, doesn't have to happen here

Copy link
Collaborator

Choose a reason for hiding this comment

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

I don't think we need this anymore..I think this is a relic from storedog 1.0

Copy link
Collaborator

Choose a reason for hiding this comment

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

Oh yea, I see what you mean. Maybe we should try deleting them, restarting the app locally, and see if it blows up or if the backend will auto-generate them. And then add that /storage dir to .gitignore

We try that separately from this PR, doesn't have to happen here

@devindford devindford merged commit 58c40ad into main Apr 5, 2023
@devindford devindford deleted the devin.ford/WEB-3381 branch April 5, 2023 18:28
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