-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update harmony-service lib and update docker platform to amd64 #33
Conversation
952b936
to
a36cbf5
Compare
@@ -7,6 +7,7 @@ | |||
# 2022-01-03: Updated Dockerfile path and added comments for tags. | |||
# 2023-04-04: Updated for the Harmony Browse Image Generator (HyBIG). | |||
# 2024-01-22: Updated image name to: ghcr.io/nasa/harmony-browse-image-generator. | |||
# 2024-10-06: Updated to support amd64. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
are these actually valuable or just something we keep doing?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's a good question. I was wondering something similar when I was updating the HGA build-image
script. Basically, we're just recreating the commit history in the shell script, so probably they are not uniquely valuable.
Perhaps the one minor value is where the script was originally copied from. But that said, we're trying to standardise, so that shouldn't really matter.
I'm entirely ambivalent beyond saying if we have these comments, they should be complete, or we should not have them. It would be a bit frustrating to have a log of changes to the file and then subsequent changes not captured in them.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agree. I'll pull them next time I visit (if I remember)
I was able to run this against hiab locally (even if it was a bit of a slog) [before I updated harmony_service_lib though, I'm trying to do that now, but it should be fine] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Update: Regression tests succeeded locally.
Ran the test successfully on my Intel machine and added a couple questions. I'm currently debugging issues with my local Harmony-in-a-Box so I wasn't able to run the regression tests.
Of course Owen still needs to verify that it works on his ARM64 laptop too, but I can approve from my end.
docs/HyBIG-Example-Usage.ipynb
Outdated
@@ -57,7 +57,7 @@ | |||
"metadata": {}, | |||
"outputs": [], | |||
"source": [ | |||
"from harmony import Collection, Environment, Client, Request\n", | |||
"from harmony_service_lib import Collection, Environment, Client, Request\n", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So happy we can do this now. Do we need a ticket to update this for all of our regression notebooks, or just sneak it in as we go along?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You could write a ticket, but I'm just dropping it in where I can because those tickets will never get prioritized and if you want to wait until IP sprint I suppose you could.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The elusive IP sprint. I'll just update when it comes up. If I update the granule used in the Trajectory Subsetter regression test, then that'll be a good time.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just spotting this thread as I opened up the PR - don't the regression test notebooks use the harmony-py
library, rather than the harmony-service-lib-py
? (If so, that confirms just how much of a good change this renaming is!)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well I wouldn't know, but that makes sense they would use harmony-py. This has confused me for the entire time I've been on this project.
13ce840
to
7b9690a
Compare
I updated all the libs as part of the DAS-2259 ticket, but didn't test it..Oops This reverts commit 7b9690a.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was able to build the image locally and the unit tests all passed. I tried running the HyBIG regression tests against my local image, and I'm seeing some interesting issues:
"2024-10-15 23:09:29,180 [ERROR] [harmony-service._download:258] Retrying failed download https://harmony.uat.earthdata.nasa.gov/service-results/harmony-uat-eedtest-data/C1256584478-EEDTEST/ASTGTMV003_N00E022_dem.tif?A-api-request-uuid=f63205c0-aa9c-43ec-beb5-2ecb18d9ed95\r\nTraceback (most recent call last):\r\n File \"/usr/local/lib/python3.11/site-packages/harmony_service_lib/http.py\", line 231, in _download\r\n raise Exception(f'Unable to download due to status code: {response.status_code} \\\r\nException: Unable to download due to status code: 400 and content b''\r\n",
I'm not sure why Harmony is unable to download data from that S3 bucket (in it's own AWS account!). I don't think it's a problem with this PR, but maybe one of the @nasa/harmony-admins folks has an idea?
The only change I'm requesting in this review, though, is the reversion of the import change for harmony-py
in the Jupyter notebook. Otherwise, this looks great.
@@ -7,6 +7,7 @@ | |||
# 2022-01-03: Updated Dockerfile path and added comments for tags. | |||
# 2023-04-04: Updated for the Harmony Browse Image Generator (HyBIG). | |||
# 2024-01-22: Updated image name to: ghcr.io/nasa/harmony-browse-image-generator. | |||
# 2024-10-06: Updated to support amd64. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's a good question. I was wondering something similar when I was updating the HGA build-image
script. Basically, we're just recreating the commit history in the shell script, so probably they are not uniquely valuable.
Perhaps the one minor value is where the script was originally copied from. But that said, we're trying to standardise, so that shouldn't really matter.
I'm entirely ambivalent beyond saying if we have these comments, they should be complete, or we should not have them. It would be a bit frustrating to have a log of changes to the file and then subsequent changes not captured in them.
docs/HyBIG-Example-Usage.ipynb
Outdated
"# creates an output directory for the downloaded files\n", | ||
"from pathlib import Path\n", | ||
"\n", | ||
"from harmony_service_lib import Client, Collection, Environment, Request\n", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't this harmony-py
? I think this one should stay as from harmony import ...
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not even joking how I can't keep them straight. ✅ afc0d89
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How did the tests pass then when we ran it? I totally see that Client/Collection/etc are in harmony-py, but how were these classes successfully imported?
from harmony_service_lib import BaseHarmonyAdapter | ||
from harmony_service_lib.message import Source as HarmonySource | ||
from harmony_service_lib.message_utility import ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This makes me happy! I'm so grateful Danny pushed this change through.
I tried the failed download URL from above in my browser: That also failed. Not sure if there's something quirky going on with my machine. 🤷 |
@owenlittlejohns Made the changes requested, hopefully tomorrow whatever problem with cloudfront is resolved will let you verify |
Okay - I reran the regression tests notebook and things worked for me there today. Not sure what fun was happening with CloudFront, but thank you to whoever/whatever fixed that. I think we're good to merge. |
Description
Updates the docker image platform to run on amd64
also bumps lib versions of pillow and rasterio hoping to fix DAS-2259 (spoiler alert, it did not)
Updates Harmony-service-lib to version 2
Jira Issue ID
N/A
Local Test Steps
check out the branch, build and run the tests.
bonus points for running regressions locally in Harmony-In-A-Box
PR Acceptance Checklist
CHANGELOG.md
updated to include high level summary of PR changes.docker/service_version.txt
updated if publishing a release.