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

iterate over asset_ids instead of asset index in GFMapJobManager.on_j… #186

Merged
merged 3 commits into from
Dec 16, 2024

Conversation

VincentVerelst
Copy link
Collaborator

@VictorVerhaert, this is a blocking issue for the WorldCereal extractions. To summarize:

  • In GFMapJobManager.on_job_done we looped over the asset index in the batch job metadata when downloading multiple assets from one job (which can be the case if sample_by_feature=True)
  • This implicitly assumed that the index of an asset in the original FeatureCollection and the index of that same asset in the openEO job metadata was always the same --> dangerous! This can lead to the wrong naming of your asset file, which is the case in WorldCereal extractions right now
  • I changed the loop to now iterate over asset_ids

I don't believe this is 100% backwards compatible as now the output_path_gen callable requires asset_id as a keyword argument. However, in light of the future deprecation of the GFMapJobManager and the fact that I don't see any other solution within the current API, I think this is justifiable.

In case you have another suggestion, please let me know!

closes #185

Copy link
Collaborator

@VictorVerhaert VictorVerhaert left a comment

Choose a reason for hiding this comment

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

changelog needs to be added but already approving

@VincentVerelst VincentVerelst merged commit c248177 into main Dec 16, 2024
7 checks passed
@VincentVerelst VincentVerelst deleted the 185-job-manager-asset-id branch December 16, 2024 10:30
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.

Match openEO asset ID when downloading results in GFMapJobManager.on_job_done
2 participants