janitor_1 exited with code 1
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 450
- Forks
- 111
- PR merge metrics
- No merged PRs in 30d
Description
Hi, I tried to run the sysupgrade server using docker like it is written in the Readme. After starting the server with docker-compose up I get on the client:
# auc
auc/0.3.1-1
Server: http://asu.<lokaldnsname>
Running: 22.03.3 r20028-43d71ad93e on lantiq/xrx200 (avm,fritz7412)
No data available (61)
I use nginx to forward http from asu.<lokaldnsname> (port 80) to asu.<lokaldnsname>:8000 Opening http://asu. in the browser shows me the correct Statuspage like on https://sysupgrade.openwrt.org.
There is a lot of output in the console. The only error i can find is:
[...]
janitor_1 | [2023-02-22 07:23:35,433] DEBUG in janitor: SNAPSHOT/mipsel_24kc: Skip package update
janitor_1 | [2023-02-22 07:23:35,433] INFO in janitor: Update SNAPSHOT/mips_24kc
janitor_1 | [2023-02-22 07:23:35,630] DEBUG in janitor: SNAPSHOT/mips_24kc: Skip package update
janitor_1 | Loading /home/build/asu/config.py
janitor_1 | Traceback (most recent call last):
janitor_1 | File "/home/build/.local/bin/flask", line 8, in <module>
janitor_1 | sys.exit(main())
janitor_1 | File "/home/build/.local/lib/python3.10/site-packages/flask/cli.py", line 1047, in main
janitor_1 | cli.main()
janitor_1 | File "/home/build/.local/lib/python3.10/site-packages/click/core.py", line 1055, in main
janitor_1 | rv = self.invoke(ctx)
janitor_1 | File "/home/build/.local/lib/python3.10/site-packages/click/core.py", line 1657, in invoke
janitor_1 | return _process_result(sub_ctx.command.invoke(sub_ctx))
janitor_1 | File "/home/build/.local/lib/python3.10/site-packages/click/core.py", line 1657, in invoke
janitor_1 | return _process_result(sub_ctx.command.invoke(sub_ctx))
janitor_1 | File "/home/build/.local/lib/python3.10/site-packages/click/core.py", line 1404, in invoke
janitor_1 | return ctx.invoke(self.callback, **ctx.params)
janitor_1 | File "/home/build/.local/lib/python3.10/site-packages/click/core.py", line 760, in invoke
janitor_1 | return __callback(*args, **kwargs)
janitor_1 | File "/home/build/.local/lib/python3.10/site-packages/click/decorators.py", line 26, in new_func
janitor_1 | return f(get_current_context(), *args, **kwargs)
janitor_1 | File "/home/build/.local/lib/python3.10/site-packages/flask/cli.py", line 357, in decorator
janitor_1 | return __ctx.invoke(f, *args, **kwargs)
janitor_1 | File "/home/build/.local/lib/python3.10/site-packages/click/core.py", line 760, in invoke
janitor_1 | return __callback(*args, **kwargs)
janitor_1 | File "/home/build/.local/lib/python3.10/site-packages/asu/janitor.py", line 457, in update
janitor_1 | update_meta_json()
janitor_1 | File "/home/build/.local/lib/python3.10/site-packages/asu/janitor.py", line 419, in update_meta_json
janitor_1 | json.dumps(
janitor_1 | File "/usr/local/lib/python3.10/json/__init__.py", line 238, in dumps
janitor_1 | **kw).encode(obj)
janitor_1 | File "/usr/local/lib/python3.10/json/encoder.py", line 201, in encode
janitor_1 | chunks = list(chunks)
janitor_1 | File "/usr/local/lib/python3.10/json/encoder.py", line 431, in _iterencode
janitor_1 | yield from _iterencode_dict(o, _current_indent_level)
janitor_1 | File "/usr/local/lib/python3.10/json/encoder.py", line 405, in _iterencode_dict
janitor_1 | yield from chunks
janitor_1 | File "/usr/local/lib/python3.10/json/encoder.py", line 405, in _iterencode_dict
janitor_1 | yield from chunks
janitor_1 | File "/usr/local/lib/python3.10/json/encoder.py", line 405, in _iterencode_dict
janitor_1 | yield from chunks
janitor_1 | File "/usr/local/lib/python3.10/json/encoder.py", line 438, in _iterencode
janitor_1 | o = _default(o)
janitor_1 | File "/usr/local/lib/python3.10/json/encoder.py", line 179, in default
janitor_1 | raise TypeError(f'Object of type {o.__class__.__name__} '
janitor_1 | TypeError: Object of type date is not JSON serializable
asu_janitor_1 exited with code 1
redis_1 | 1:M 22 Feb 2023 07:24:11.075 * 10000 changes in 60 seconds. Saving...
[...]
I think this is a bug, because I did everything like it is written in the Readme. Any hints, how to debug this?
Nevertheless: Thanks for developing this great software!
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The traceback points to asu/janitor.py, specifically update_meta_json(). Start by inspecting that function and reproduce the failure with the documented docker-compose setup. Done means the janitor completes its update and generates the metadata JSON without the date serialization error, so the client can obtain data.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, flask, nginx, python
- Domain
- backend, devops
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100