Skip to content

Conversation

@abradley60
Copy link
Collaborator

Main Changes

  • Changing logic to first check if the burst files already exist in S3, and stopping the process early if the do (unless make_existing_products is set)
  • This is changed from the previous logic which will always download a scene first
  • This can only be implemented when --scene_data_source ASF is set, as the burst_id's for a given scene cannot be queried from the CDSE (It seems the burst_id in the format of t012_025211_iw2 is an ASF thing. Thus, --scene_data_source CDSE will still download the scene before checking if the burst products exist
  • The change is important for the production of the RTC_S1_STATIC layers. We can now run a large time period with little overhead to ensure all of the required static layers are created.

Other

  • increased ASF timeout to 90s from default of 30s
  • Cleaning up error codes and shuffling some stuff out of the main cli

Copy link
Collaborator

@caitlinadams caitlinadams left a comment

Choose a reason for hiding this comment

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

Generally looks good to me -- I've made minor suggestions to do with formatting.

@abradley60 abradley60 marked this pull request as ready for review June 13, 2025 04:01
Copy link
Collaborator

@geoscience-aman geoscience-aman left a comment

Choose a reason for hiding this comment

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

Hi Alex, thanks for adding the capability to exit early if the static layers exist on S3.

Two suggestions:

  1. Even if --scene_data_source CDSE, can't we still use asf_search outside the if else block to check whether the static layers exist on S3? If the user hasn't provided ASF credentials, then I understand we can revert to our current fallback of downloading the scene with CDSE.
  2. For exiting early, it is unclear to me how this currently happens. Is it that the burst_id_list will be empty? If this is the case, maybe it's worth adding a more explicit exit statement.

@abradley60
Copy link
Collaborator Author

abradley60 commented Jun 13, 2025

Hi Alex, thanks for adding the capability to exit early if the static layers exist on S3.

Two suggestions:

  1. Even if --scene_data_source CDSE, can't we still use asf_search outside the if else block to check whether the static layers exist on S3? If the user hasn't provided ASF credentials, then I understand we can revert to our current fallback of downloading the scene with CDSE.
  2. For exiting early, it is unclear to me how this currently happens. Is it that the burst_id_list will be empty? If this is the case, maybe it's worth adding a more explicit exit statement.

Thanks Aman:

  1. I was thinking we would mainly be using the CDSE for ongoing processing when products aren't available on the ASF, hence the burst search wouldn't work. I can add it in though because because if we process older scenes with the CDSE as a source this would be valid logic.
  2. I can clear this up in the code and name things a little better, but the exit happens here when we check if the requested layers we want to process already exist in s3. If all requested already exist, the process exists early with the 100 code which is then picked up in the shell script that orchestrates everything:

@geoscience-aman
Copy link
Collaborator

  1. I was thinking we would mainly be using the CDSE for ongoing processing when products aren't available on the ASF, hence the burst search wouldn't work.

I guess my point here was that even if we are using the CDSE to download the scene, there's no reason we can't use the ASF to check whether the static layers exist on S3 first, right?

@abradley60
Copy link
Collaborator Author

  1. I was thinking we would mainly be using the CDSE for ongoing processing when products aren't available on the ASF, hence the burst search wouldn't work.

I guess my point here was that even if we are using the CDSE to download the scene, there's no reason we can't use the ASF to check whether the static layers exist on S3 first, right?

Yeah you're right it's probably just good practice to do that for all scenario's and download the scene if they can't be found and get the burst list from the SLC. Will update

@caitlinadams
Copy link
Collaborator

  1. I was thinking we would mainly be using the CDSE for ongoing processing when products aren't available on the ASF, hence the burst search wouldn't work.

I guess my point here was that even if we are using the CDSE to download the scene, there's no reason we can't use the ASF to check whether the static layers exist on S3 first, right?

Yeah you're right it's probably just good practice to do that for all scenario's and download the scene if they can't be found and get the burst list from the SLC. Will update

Would the user have to supply both ASF and CDSE credentials for this to work?

@abradley60
Copy link
Collaborator Author

Would the user have to supply both ASF and CDSE credentials for this to work?

Not for the search, I don't think credentials are needed. Just the download. Will make sure my logic accounts for that

@abradley60
Copy link
Collaborator Author

@caitlinadams and @geoscience-aman I have added the logic to query the ASF for bursts in the scene even if the CDSE is set as the data source. Are you able to review?

Copy link
Collaborator

@caitlinadams caitlinadams left a comment

Choose a reason for hiding this comment

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

Looks good to me, thanks Alex!

@abradley60 abradley60 merged commit 95b335b into main Jun 19, 2025
2 checks passed
@abradley60 abradley60 deleted the upgrade/improve_product_exists_logic branch June 19, 2025 01:58
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