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

Harmony 1714 - Disambiguate files when downloading files that have the same name from the same job #82

Merged
merged 8 commits into from
Mar 26, 2024

Conversation

vinnyinverso
Copy link
Contributor

@vinnyinverso vinnyinverso commented Mar 25, 2024

Jira Issue ID

HARMONY-1714

Description

harmony-py will now prepend the work item ID to the downloaded file(s) filename, so that identical filenames produced by a workflow step (for the same job) will not conflict. E.g.:

4048675_TEMPO_NO2_L2_V01_20240123T142036Z_S004G01_product_vertical_column_total_subsetted.nc4

This also matches the structure of the URLs we use in our S3 staging buckets, where the work item id immediately precedes the object name.

I think that we should do this for all staged file links for the sake of consistency and simplicity. It could get tricky/confusing in the code and from a user perspective to only do this for some transformation services but not others (with the exception of harmony/download).

This update will have no impact on the overwrite flag for the download methods and should not have any impact on any scripts or notebooks unless they're baking into their code assumptions about how harmony-py names downloaded files.

Local Test Steps

  1. activate your virtual environment
  2. from the harmony-py root directory pip install -e .
  3. use basic.ipynb (running with the aforementioned virtual environment) to make a request and download files
  4. they should automatically be named according to the description above (item id should get prepended to the file name, for staged result links)
  5. you can also test out the download method to download a single file, to make sure that the naming is consistent

(I pointed my harmony-py client at UAT in order to test, but this should work the same regardless of the Harmony environment.)

PR Acceptance Checklist

  • Acceptance criteria met
  • Tests added/updated (if needed) and passing
  • Documentation updated (if needed)

@vinnyinverso vinnyinverso marked this pull request as draft March 25, 2024 11:58
@vinnyinverso vinnyinverso marked this pull request as ready for review March 25, 2024 12:34
@vinnyinverso vinnyinverso merged commit 8d778c8 into main Mar 26, 2024
11 checks passed
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.

3 participants