Skip to content

HARMONY-2237: Remove gdal-async from the harmony dockerfile installation.#877

Merged
chris-durbin merged 2 commits intomainfrom
harmony-2237-3
Mar 17, 2026
Merged

HARMONY-2237: Remove gdal-async from the harmony dockerfile installation.#877
chris-durbin merged 2 commits intomainfrom
harmony-2237-3

Conversation

@chris-durbin
Copy link
Contributor

@chris-durbin chris-durbin commented Mar 17, 2026

Jira Issue ID

HARMONY-2237

Description

Building the harmony docker image was failing causing a failure during UAT deployment (since we build the image in that environment but not in SIT).

The root cause is that package.json and package-lock.json no longer refers to gdal-async but we were running an npm install gdal-async followed by npm ci which complained because the package.json and package-lock.json were now out of sync.

Local Test Steps

npm run build and npm run build-m1 from the services/harmony directory. Make sure both complete successfully.

PR Acceptance Checklist

  • Acceptance criteria met
  • Tests added/updated (if needed) and passing
  • Documentation updated (if needed)
  • Harmony in a Box tested (if changes made to microservices or new dependencies added)

Summary by CodeRabbit

  • Chores
    • Simplified container image build configuration by removing unnecessary dependencies.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 17, 2026

Important

Review skipped

Review was skipped due to path filters

⛔ Files ignored due to path filters (8)
  • package-lock.json is excluded by !**/package-lock.json
  • services/cron-service/package-lock.json is excluded by !**/package-lock.json
  • services/harmony/package-lock.json is excluded by !**/package-lock.json
  • services/query-cmr/package-lock.json is excluded by !**/package-lock.json
  • services/service-runner/package-lock.json is excluded by !**/package-lock.json
  • services/work-failer/package-lock.json is excluded by !**/package-lock.json
  • services/work-scheduler/package-lock.json is excluded by !**/package-lock.json
  • services/work-updater/package-lock.json is excluded by !**/package-lock.json

CodeRabbit blocks several paths by default. You can override this behavior by explicitly including those paths in the path filters. For example, including **/dist/** will override the default block on the dist directory, by removing the pattern from both the lists.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 8b6e32a3-26fa-4d62-b952-ca08b6faf062

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

The services/harmony Dockerfile has been simplified by removing the libgdal-dev dependency from the apt-get install line and eliminating the entire conditional block that handled gdal-async installation, including tarball copying, platform detection, and npm install logic.

Changes

Cohort / File(s) Summary
Docker Build Simplification
services/harmony/Dockerfile
Removed libgdal-dev from apt-get dependencies and deleted the conditional gdal-async installation block (tarball copy, platform check, and npm install).

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Suggested reviewers

  • indiejames
  • ygliuvt
  • flamingbear

Poem

🐰 With nimble paws, we trim the fat,
gdal-async removed from the Docker chat,
No conditional blocks, no platform fuss,
Just cleaner builds for all of us!

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: removing gdal-async from the Dockerfile installation, and includes the Jira issue ID for traceability.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Description check ✅ Passed The PR description follows the required template with all key sections completed: Jira Issue ID, Description, Local Test Steps, and PR Acceptance Checklist.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch harmony-2237-3
📝 Coding Plan
  • Generate coding plan for human review comments

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
services/harmony/Dockerfile (1)

7-7: Consider adding --no-install-recommends to reduce image size.

Static analysis flags this as a best practice for Docker images. Adding this flag prevents apt from installing recommended but non-essential packages, reducing image bloat.

♻️ Suggested improvement
-RUN apt-get update && apt-get install -y sqlite3 libsqlite3-dev python3 python3-pip python3-venv libpq-dev build-essential
+RUN apt-get update && apt-get install -y --no-install-recommends sqlite3 libsqlite3-dev python3 python3-pip python3-venv libpq-dev build-essential
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@services/harmony/Dockerfile` at line 7, Update the Dockerfile RUN command
that calls apt-get install (the RUN line installing sqlite3 libsqlite3-dev
python3 python3-pip python3-venv libpq-dev build-essential) to include the
--no-install-recommends flag so apt does not pull recommended packages, reducing
image size; ensure the modified RUN uses apt-get install -y
--no-install-recommends and still performs apt-get update beforehand and cleans
up apt lists afterward as appropriate.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@services/harmony/Dockerfile`:
- Line 7: Update the Dockerfile RUN command that calls apt-get install (the RUN
line installing sqlite3 libsqlite3-dev python3 python3-pip python3-venv
libpq-dev build-essential) to include the --no-install-recommends flag so apt
does not pull recommended packages, reducing image size; ensure the modified RUN
uses apt-get install -y --no-install-recommends and still performs apt-get
update beforehand and cleans up apt lists afterward as appropriate.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 7078346a-33aa-40c2-96b0-f397f5f892e2

📥 Commits

Reviewing files that changed from the base of the PR and between fa2ff67 and 515a65a.

📒 Files selected for processing (1)
  • services/harmony/Dockerfile

Copy link
Member

@flamingbear flamingbear left a comment

Choose a reason for hiding this comment

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

The changes make sense, I was able to build all of the images including -m1.

I deployed to Harmony-In-A-Box and ran some regression tests against it. I also reverified the tests from the orginal harmony pr that removes gdal-async and the tiff outputs looks visually similar and the NetCDF files have equivalent hashes with earthdata-hashdiff.

@chris-durbin chris-durbin merged commit 07f862c into main Mar 17, 2026
6 checks passed
@chris-durbin chris-durbin deleted the harmony-2237-3 branch March 17, 2026 21:22
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