Skip to content

Conversation

@PeterHindes
Copy link
Contributor

No description provided.

@PeterHindes PeterHindes requested review from cjmyers, cl117 and Copilot July 2, 2025 16:24

This comment was marked as outdated.

@PeterHindes
Copy link
Contributor Author

fixes this issue

@Gonza10V Gonza10V self-requested a review July 2, 2025 17:27
Copy link

@Gonza10V Gonza10V left a comment

Choose a reason for hiding this comment

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

The docker image is now building but there is a check that is running for over 3 hours and one failed. Is this expected?

@cjmyers
Copy link
Collaborator

cjmyers commented Jul 2, 2025

This is definitely a problem

@PeterHindes
Copy link
Contributor Author

the test failed because it expects the container to have its own health check instead of having it in docker compose, I will add it back and it should pass

@PeterHindes PeterHindes requested review from Gonza10V and Copilot July 9, 2025 18:23
@PeterHindes
Copy link
Contributor Author

@cl117 This is now ready for merging. Please review and approve if it looks good.

This comment was marked as outdated.

@PeterHindes PeterHindes linked an issue Jul 12, 2025 that may be closed by this pull request
PeterHindes and others added 4 commits July 14, 2025 10:34
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@PeterHindes PeterHindes requested a review from Copilot July 14, 2025 16:40
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR ensures the Docker container can start properly by persisting the Git revision before removing the .git folder, adding error handling around SPARQL updates, and switching to a curl-based healthcheck in the Dockerfile.

  • Delegate setting revision to a pre-build script (gitrevupdate.js) and shell helper (saveconfig.sh)
  • Add .catch handlers in updateQueryJson and deleteStaggered to log and propagate SPARQL errors
  • Update Dockerfile to install curl, run revision save, remove old healthcheck script, and define a built-in Docker HEALTHCHECK

Reviewed Changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated no comments.

Show a summary per file
File Description
synbiohub.js Removed gitRevision import and inline config.set('revision', ...) to defer to the new script
lib/sparql/sparql.js Wrapped updateQueryJson and deleteStaggered calls with catch handlers for logging errors
lib/config.js Removed stray whitespace
gitrevupdate.js Added CLI script to fetch current Git SHA and write it to the config
docker/saveconfig.sh New shell helper to invoke gitrevupdate.js during Docker build
docker/healthcheck.js Removed JS-based healthcheck in favor of Dockerfile HEALTHCHECK
docker/Dockerfile Installed curl, ran saveconfig.sh, removed the Git folder, and updated HEALTHCHECK/ENTRYPOINT
Comments suppressed due to low confidence (3)

lib/sparql/sparql.js:64

  • [nitpick] Directly using console.error can bypass the centralized logging system. Consider replacing these calls with the project's logger.error to keep log output consistent and configurable.
    .then(parseResult)

docker/Dockerfile:8

  • [nitpick] This RUN adds an extra layer. To reduce image size and simplify the build, consider combining it with the preceding apk add or the saveconfig.sh invocation into a single RUN statement.
RUN git config --global url."https://".insteadOf git://

@cjmyers
Copy link
Collaborator

cjmyers commented Jul 18, 2025

Docker is failing to build


const url = 'http://localhost:' + config.get('port') + '/'

axios.get(url).then(response => {
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 would have to check the docs, but this might not fail on 404 etc

Copy link
Contributor Author

Choose a reason for hiding this comment

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

never mind it does, this should work just fine

@cjmyers
Copy link
Collaborator

cjmyers commented Nov 29, 2025

@PeterHindes Is this PR still need to be kept open? It is still failing.

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.

The docker container needs git

4 participants