Skip to content

Develop - #239

Merged
sedv8808 merged 17 commits into
productionfrom
develop
Oct 21, 2026
Merged

sedv8808 merged 17 commits into
productionfrom
develop

Conversation

@sedv8808

Copy link
Copy Markdown
Collaborator

This pull request introduces several improvements to the test workflow, error handling, and test coverage for the Neotoma API. The main changes include enhancements to the GitHub Actions workflow for more accurate environment targeting and dependency management, improved error logging in the application, and updates to test queries and test data for better coverage and reliability.

CI/CD Workflow Improvements:

  • The test workflow (.github/workflows/test.yml) now dynamically targets either the dev or production server based on the triggering branch, ensuring tests run against the correct environment. It also checks out the exact commit that was deployed, enables Corepack for Yarn 4 compatibility, updates Node.js to version 22 to match the Dockerfile, and switches to yarn install --immutable for stricter dependency management. [1] [2]

Error Handling Enhancements:

  • The application (app.js) now logs the reason for unhandled promise rejections and uncaught exceptions before exiting, aiding in debugging and observability.

Test and Build Script Improvements:

  • The package.json script for starting the app now uses --exitcrash with nodemon for better crash handling, and a new test:unit script is added for running unit tests.
  • The OpenAPI build script (openapi/scripts/build-openapi.js) now gracefully handles missing directories, preventing errors during fresh checkouts.

Test Data Updates:

sedv8808 and others added 15 commits August 10, 2026 18:05
…/constdb summary (dbsummary.sql) counted rows of

ap.querytable rather than distinct sites and datasets, and read from
that cache table. For NODE (databaseid 41) this gave 810,714 rows for
4,224 datasets, so the landing page showed e.g. 666,024 surface
samples instead of ~4,135 datasets / 3,920 sites.

Two causes:
- COUNT(siteid) / COUNT(*) replaced COUNT(DISTINCT ...) in f6264de.
- ap.querytable is upserted on (datasetid, chronologyid) and never
  pruned, so it keeps rows for deleted datasets, datasets removed from
  a database, and superseded chronologies.
Hotfix/taxa crash and Summary bug that Alison reported
and several also carried an unrelated generic  (for example Must pass either queries or a comma separated integer sequence. on a
SQL failure). They now send { status: 'failure', data: null, message: <error text> } which is the shape taxonquery already uses after the taxa crash fix.
Responses that carried extra fields ( in occurrence.js) keep them.
Copilot AI balanced review requested due to automatic review settings October 21, 2026 20:17

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.

The checks job now also runs on pushes to develop and production. It is
renamed from pr-checks to checks since it is no longer PR-only.
@sedv8808
sedv8808 merged commit b0d7163 into production Oct 21, 2026
6 checks passed
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.

2 participants