navapbc / wic-participant-recertification-portal

https://navapbc.github.io/wic-participant-recertification-portal/
Apache License 2.0
0 stars 1 forks source link

[PRP-327] Prevent healthcheck from making spurious database records #88

Closed rocketnova closed 1 year ago

rocketnova commented 1 year ago

Ticket

Changes

What was added, updated, or removed in this PR.

Context for reviewers

Testing instructions, background context, more in-depth details of the implementation, and anything else you'd like to call out or ask reviewers. Explain how the changes were verified.

The resource route /healthcheck was making a HEAD / request to test that the page is able to load. This was having some negative side effects:

Redirecting to baseUrl /gallatin/recertify
HEAD / 302 - - 10.347 ms
Generating fa40c28e-86ac-401c-8bf7-346f073c7415
Creating Submission record in database for fa40c28e-86ac-401c-8bf7-346f073c7415 and agency gallatin
HEAD /gallatin/recertify 200 - - 18.807 ms
GET /healthcheck 200 - - 57.973 ms

Testing

Screenshots, GIF demos, code examples or output to help show the changes working as expected. ProTip: you can drag and drop or paste images into this textbox.

  1. Run this branch locally (npm run dev)
  2. Watch the remix logs
  3. Go to localhost:3000/healthcheck in your browser
  4. The logs should only say: GET /healthcheck 200
  5. The logs should not generate any other entries

Do this again from inside the docker container:

  1. docker compose up -d --build && docker compose logs -f remix_dev
  2. Go to localhost:3003/healthcheck
github-actions[bot] commented 1 year ago

Chromatic_Build : Link to latest build in Chromatic 🌈 Link to storybook build in Chromatic