log_level is an official part of job creation in the openEO (POST /jobs endpoint).
So it does not really belong under "job_options", which is by design a container for non-standard feature flags.
Unfortunately, when we store a job in the job registry, we put log_level under job_options, because there is no dedicated log_level field in the job registry APIs:
|
if "log_level" in metadata: |
|
# TODO: it's not ideal to put "log_level" (processing parameter from official spec) |
|
# in job_options, which is intended for parameters that are not part of official spec. |
|
# Unfortunately, it's quite involved to add a new field like "log_level" |
|
# in all the appropriate job registry related places, so we do it just here for now. |
|
if job_options is None: |
|
job_options = {} |
|
job_options[JOB_OPTION_LOG_LEVEL] = metadata.get("log_level", DEFAULT_LOG_LEVEL_PROCESSING) |
This causes confusion when doing post-mortem analysis and job replay situations:
- say a user creates a job, correctly using the standardized
log_level field, and no job_options; e.g. cube.create_job(..., log_level="info")
- on storing this info in the job registry, the code mentioned above (ab)uses
job_options to persist the desired log_level
- when we do post-mortem analysis during user support (e.g. using openeo-admin, or directly consulting the job registry), it looks like the user created the job with
cube.create_job(..., job_options={"log_level": "info"}), which is invalid in the sense that this "log_level" will be ignored.
this makes it confusing to figure out what is going on (e.g. a job "replay" might have different log level than the original job)
(reported by @ElienVandermaesenVITO in context of openeo-admin tool)
log_levelis an official part of job creation in the openEO (POST /jobsendpoint).So it does not really belong under "job_options", which is by design a container for non-standard feature flags.
Unfortunately, when we store a job in the job registry, we put
log_levelunderjob_options, because there is no dedicatedlog_levelfield in the job registry APIs:openeo-geopyspark-driver/openeogeotrellis/backend.py
Lines 1577 to 1584 in a8df36f
This causes confusion when doing post-mortem analysis and job replay situations:
log_levelfield, and nojob_options; e.g.cube.create_job(..., log_level="info")job_optionsto persist the desiredlog_levelcube.create_job(..., job_options={"log_level": "info"}), which is invalid in the sense that this "log_level" will be ignored.this makes it confusing to figure out what is going on (e.g. a job "replay" might have different log level than the original job)
(reported by @ElienVandermaesenVITO in context of openeo-admin tool)