Skip to content

Develop - #86

Merged
sedv8808 merged 3 commits into
productionfrom
develop
Aug 19, 2026
Merged

Develop#86
sedv8808 merged 3 commits into
productionfrom
develop

Conversation

@sedv8808

Copy link
Copy Markdown
Contributor

This pull request updates the deployment workflow and backend code to improve deployment reliability, security, and maintainability. The main changes include adding robust verification steps for App Runner deployments, updating environment variables, removing deprecated code, and tightening API endpoint behavior.

Deployment workflow improvements:

  • Added detailed comments and a new verification step in .github/workflows/deploy.yml to ensure that App Runner deployments are actually running the intended image, not just reporting CloudFormation success. The workflow now checks the App Runner operation status and validates the running image before running health checks. [1] [2]
  • Updated the ENDPOINT environment variable for the development environment to tiliatank.neotomadb.org for correct labeling.
  • Removed the unused "Get ECR repository URI" step from the deployment workflow for simplification.

Backend code maintenance:

  • Removed the deprecated promiseLib option and related imports from pg-promise initialization in both database/pgp_db.js and src/neotomaapi.js, as it is no longer supported in pg-promise v12 and now uses native promises. [1] [2]

API endpoint tightening:

  • Changed the default /api/ endpoint behavior in pgfunctions/pgfunction.js to no longer list all available Postgres functions unless a method parameter is explicitly provided, improving security by not exposing the function list. [1] [2]

Copilot AI lite review requested due to automatic review settings August 19, 2026 23:52
@sedv8808
sedv8808 merged commit baa6e7b into production Aug 19, 2026
3 checks passed

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.

Pull request overview

This pull request updates the deployment workflow and backend initialization/endpoint behavior to improve deployment correctness and reduce unnecessary exposure of API metadata.

Changes:

  • Updates .github/workflows/deploy.yml to verify App Runner operation status and confirm the deployed image matches the expected ECR image before running health checks.
  • Removes deprecated promiseLib configuration for pg-promise initialization (aligning with pg-promise v12 behavior) in both src/neotomaapi.js and database/pgp_db.js.
  • Tightens /api/ default behavior to avoid listing available Postgres-backed functions unless an explicit method is provided.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

File Description
.github/workflows/deploy.yml Adds App Runner deployment verification and refines health-check flow/messages.
src/neotomaapi.js Removes bluebird/promiseLib usage for pg-promise initialization.
database/pgp_db.js Removes deprecated promiseLib option and documents pg-promise v12 behavior.
pgfunctions/pgfunction.js Stops advertising available Postgres functions on the bare /api/ endpoint unless method is provided.
Suppressed comments (1)

pgfunctions/pgfunction.js:61

  • The large commented-out “Previous behaviour” block after the early return is dead code and will never run, but it still adds noise and makes this handler harder to read/maintain. Git history already preserves the old implementation.
    /* ---- Previous behaviour, retained for reference ----
    // We're passing in the raw "/api/" endoint, which requests the set of all functions.
    db.any(queryFunc)
      .then(data => {
        return res.status(200)

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread pgfunctions/pgfunction.js
@@ -44,6 +44,17 @@ function allFunctions (req, res, next) {
// enters no parameters, or the term 'method' fails to appear in the
// user query string.
if (noParam | !outobj.method) {

if [ "$OP_STATUS" != "SUCCEEDED" ]; then
echo "::error::App Runner deployment did not succeed (status: $OP_STATUS)."
echo "The service has rolled back and is still running the previous image."
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