This repository has been archived by the owner on Dec 7, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
pangeo-forge-runner
does not guarantee "status" fields on every log line
#132
Comments
Correction to above, the traceback line does have a "status" field. It seems like the faulty assumption is that every line will have a "status" field. Here is the logging for the call which raised a KeyError: $ pangeo-forge-runner bake --repo=https://github.com/eooffshore/staged-recipes --ref=037542663cb7f7bc4a04777c90d85accbff01c8c --json --prune --Bake.recipe_id=eooffshore_ics_cmems_WIND_GLO_WIND_L3_NRT_OBSERVATIONS_012_002_MetOp_ASCAT -f=/tmp/tmp5_e7dib5.json --feedstock-subdir=recipes/eooffshore_ics_cms_WIND_GLO_WIND_L3_OBSERVATIONS_Metop_ASCAT
{"message": "Target Storage is FSSpecTarget(AbstractFileSystem(, root_path=\"\")\n", "status": "setup"}
{"message": "Input Cache Storage is CacheFSSpecTarget(AbstractFileSystem(, root_path=\"\")\n", "status": "setup"}
{"message": "Metadata Cache Storage is MetadataTarget(AbstractFileSystem(, root_path=\"\")\n", "status": "setup"}
{"message": "Picked Git content provider.\n", "status": "fetching"}
{"message": "Cloning into '/var/folders/tt/4f941hdn0zq549zdwhcgg98c0000gn/T/tmp6mcx0gyk'...\n", "status": "fetching"}
{"message": "HEAD is now at 0375426 Removed references to setup_logging\n", "status": "fetching"}
{"message": "Parsing recipes...", "status": "running"}
{"message": "Baking only recipe_id='eooffshore_ics_cmems_WIND_GLO_WIND_L3_NRT_OBSERVATIONS_012_002_MetOp_ASCAT'"}
{"message": "Error during running: object of type function not serializable", "exc_info": "Traceback (most recent call last):\n File \"/Users/charlesstern/miniconda3/envs/pfo-new/bin/pangeo-forge-runner\", line 8, in <module>\n sys.exit(main())\n File \"/Users/charlesstern/miniconda3/envs/pfo-new/lib/python3.9/site-packages/pangeo_forge_runner/cli.py\", line 28, in main\n app.start()\n File \"/Users/charlesstern/miniconda3/envs/pfo-new/lib/python3.9/site-packages/pangeo_forge_runner/cli.py\", line 23, in start\n super().start()\n File \"/Users/charlesstern/miniconda3/envs/pfo-new/lib/python3.9/site-packages/traitlets/config/application.py\", line 462, in start\n return self.subapp.start()\n File \"/Users/charlesstern/miniconda3/envs/pfo-new/lib/python3.9/site-packages/pangeo_forge_runner/commands/bake.py\", line 130, in start\n job_name = f\"{name}-{recipe.sha256().hex()}-{int(datetime.now().timestamp())}\"\n File \"/Users/charlesstern/miniconda3/envs/pfo-new/lib/python3.9/site-packages/pangeo_forge_recipes/recipes/base.py\", line 51, in sha256\n return dataclass_sha256(self, ignore_keys=self._hash_exclude_)\n File \"/Users/charlesstern/miniconda3/envs/pfo-new/lib/python3.9/site-packages/pangeo_forge_recipes/serialization.py\", line 70, in dataclass_sha256\n return dict_to_sha256(d)\n File \"/Users/charlesstern/miniconda3/envs/pfo-new/lib/python3.9/site-packages/pangeo_forge_recipes/serialization.py\", line 31, in dict_to_sha256\n b = dumps(\n File \"/Users/charlesstern/miniconda3/envs/pfo-new/lib/python3.9/json/__init__.py\", line 234, in dumps\n return cls(\n File \"/Users/charlesstern/miniconda3/envs/pfo-new/lib/python3.9/json/encoder.py\", line 199, in encode\n chunks = self.iterencode(o, _one_shot=True)\n File \"/Users/charlesstern/miniconda3/envs/pfo-new/lib/python3.9/json/encoder.py\", line 257, in iterencode\n return _iterencode(o, 0)\n File \"/Users/charlesstern/miniconda3/envs/pfo-new/lib/python3.9/site-packages/pangeo_forge_recipes/serialization.py\", line 20, in either_encode_or_hash\n raise TypeError(f\"object of type {type(obj).__name__} not serializable\")\nTypeError: object of type function not serializable", "status": "failed"}
|
On closer inspection, it looks like the offending line is
which I added in So this is my fault 😆 |
This was referenced Sep 30, 2022
cisaacstern
added a commit
that referenced
this issue
Sep 30, 2022
Patch for #132, generalize synchronize error
Note: the patch implemented in #154 can be removed if/when this issue is resolved upstream. |
cisaacstern
changed the title
Sep 30, 2022
pangeo-forge-runner
error handling is brokenpangeo-forge-runner
does not guarantee "status" fields on every log line
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I just called a recipe test here pangeo-forge/staged-recipes#183 (comment)
The resulting
pangeo-forge-runner
subprocess call failed with a KeyErrorwhich indicates that the assumption that failed
pangeo-forge-runner
calls will always provide a log line with a "status" fieldpangeo-forge-orchestrator/pangeo_forge_orchestrator/routers/github_app.py
Lines 615 to 618 in ac024db
is faulty.
The text was updated successfully, but these errors were encountered: