Skip to content
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

DAS-1601 - Remove PNG and JPEG outputs from HGA capabilities #636

Merged
merged 3 commits into from
Oct 10, 2024

Conversation

owenlittlejohns
Copy link
Member

@owenlittlejohns owenlittlejohns commented Oct 7, 2024

Jira Issue ID

DAS-1601 - preliminary work.

Description

This PR takes the steps towards removing functionality from HGA in favour of HyBIG. HyBIG is now the preferred service to create browse imagery. DAS-1601 is a ticket to remove similar functionality from HGA. We'd held off doing that for a while, because ideally a chain of net2cog and HyBIG should exist to truly replace what we suspect HGA can do. That said, there are no true users of HGA, and very few collections associated with the service. (I've checked with PO.DAAC and they are not using HGA for browse image generation right now)

This PR removes PNG and GIF outputs from the capabilities of HGA. Once deployed, we can give it a few sprints to check people aren't missing the functionality (and point them at HyBIG if they are) and then actually rip out the relevant browse image code from HGA (the actual work for DAS-1601).

Local Test Steps

  • Pull this branch.
  • Start a local Harmony-in-a-Box instance with harmony-gdal-adapter in the LOCALLY_DEPLOYED_SERVICES environment variable in .env.
  • Run the latest version of the HGA regression test suite. (Because this is being run against your local instance, you'll have to run the tests from a local Jupyter notebook server)
  • Note - if you have issues running things on a Mac with an M1 chip, you can use the updates from this PR of HGA to build a local version of the HGA image that should run on your machine. (Update: this PR has now been merged, and the resulting Docker image released as version 1.2.13)
  • Second note - both Matt and I were finding the latest version of Harmony-in-a-Box to be a bit flaky.

PR Acceptance Checklist

  • Acceptance criteria met - this is preliminary to ensure we can rip out the code for the ticket.
  • Tests added/updated (if needed) and passing
  • Documentation updated (if needed)

@owenlittlejohns owenlittlejohns changed the title Das 1601 remove png jpeg from hga DAS-1601 - Remove PNG and JPEG outputs from HGA capabilities Oct 7, 2024
@@ -74,7 +74,7 @@ describe('Testing collection capabilities', function () {
it('sets the outputFormats field correctly', function () {
const capabilities = JSON.parse(this.res.text);
const expectedFormats = [
'application/x-netcdf4', 'image/tiff', 'image/png', 'image/gif', 'application/x-zarr',
'application/x-netcdf4', 'image/tiff', 'application/x-zarr', 'image/png', 'image/gif',
Copy link
Member Author

Choose a reason for hiding this comment

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

Just a quick explanation on these updated tests:

Harmony concatenates all the output formats into a single list. The ordering of the list reflects the first time each output is encountered in services.yml. HGA is listed above NetCDF-to-Zarr, which in turn is above harmony-service-example.

Before this change, HGA and harmony-service-example both listed PNGs and GIFs as output options, so those formats were listed before Zarr, because HGA is before NetCDF-to-Zarr. After this change, only harmony-service-example lists PNG and GIF, so these formats are found after NetCDF-to-Zarr and listed after the Zarr output option.

Kind of in-the-weeds, but wanted to explain what looks like a weird test change.

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.

This looks right to me.

Copy link
Contributor

@chris-durbin chris-durbin left a comment

Choose a reason for hiding this comment

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

Verified in production that it has been over a year since the last time anyone requested one of those formats from the harmony-gdal-adapter service so this change should not impact anyone.

@owenlittlejohns owenlittlejohns merged commit 8e960c8 into main Oct 10, 2024
4 of 5 checks passed
@owenlittlejohns owenlittlejohns deleted the DAS-1601-remove-PNG-JPEG-from-HGA branch October 10, 2024 17:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants