Open-EO / Open-EO/openeo-python-client

Harden automatic asset filenames?

Open
#353 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
217
Forks
56
Avg merge
1d 22h
Merged PRs (30d)
2

Description

From discussion https://github.com/Open-EO/openeo-geopyspark-driver/issues/291#issuecomment-1352862602

Batch job result asset keys are currently assumed to be valid file names (used as fallback when user did not explicitly defined a download file name):
https://github.com/Open-EO/openeo-python-client/blob/01f525615fead0db67810fc2f1b92f4e15b7a089/openeo/rest/job.py#L283-L284

Apparently that assumption is not guaranteed, so we might need to add a bit of hardening (e.g. stripping/normalizing special characters), or using the "filename" of href instead.

TBD

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the asset filename fallback at openeo/rest/job.py#L283-L284 and read the linked discussion for the missing guarantees about asset keys. Decide whether normalization or the href filename is the intended behavior, then add coverage for non-filename asset keys; done means automatic download names are safe and consistent when no explicit filename is provided.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
api
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.