#223 The latest changes broke fedocal in staging.
Opened 4 months ago by humaton. Modified 4 months ago

Hey guys, since you did most of the changes I deployed into staging please have a look. Here are logs from the pod.

@rwright @misc @james


Had a quick look and I guess the first thing is I'm not sure what got deployed?

The warning is coming from:

fedocal/fedocallib/model.py:241

...but in the latest upstream code that's code from 2013 that doesn't do what the warning is talking about. Do you know what the latest upstream commit is that you deployed, and what was deployed before?

Will be back from PTO/US-holiday tomorrow, so happy to look at it more then.

Dito. the cache_timeout and join() exceptions ... they haven't changed in a long time (although the problem line numbers do match up).

Yeah, the code base didn't change much, but the deps did a LOT. I have updated to newer python and this is deployed there. I have noticed a small divergence from the master branch. There are 2 commits deployed on stg and prod that are not in the master.

So one of the error is:

[2024-09-02 10:17:18 +0000] [21] [ERROR] Error handling request /static/ical.png
Traceback (most recent call last):
  File "/opt/app-root/lib64/python3.11/site-packages/flask/app.py", line 1473, in wsgi_app
    response = self.full_dispatch_request()
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/app-root/lib64/python3.11/site-packages/flask/app.py", line 882, in full_dispatch_request
    rv = self.handle_user_exception(e)
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/app-root/lib64/python3.11/site-packages/flask/app.py", line 880, in full_dispatch_request
    rv = self.dispatch_request()
         ^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/app-root/lib64/python3.11/site-packages/flask/app.py", line 865, in dispatch_request
    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)  # type: ignore[no-any-return]
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/app-root/lib64/python3.11/site-packages/flask/app.py", line 270, in <lambda>
    view_func=lambda **kw: self_ref().send_static_file(**kw),  # type: ignore # noqa: B950
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/app-root/lib64/python3.11/site-packages/flask_multistatic.py", line 92, in send_static_file
    return send_from_directory(
           ^^^^^^^^^^^^^^^^^^^^
  File "/opt/app-root/lib64/python3.11/site-packages/flask/helpers.py", line 552, in send_from_directory
    return werkzeug.utils.send_from_directory(  # type: ignore[return-value]
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/app-root/lib64/python3.11/site-packages/werkzeug/utils.py", line 577, in send_from_directory
    return send_file(path_str, environ, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: send_file() got an unexpected keyword argument 'cache_timeout'

Because fedocal bundle flask_multistatic from 9 years ago:
https://pagure.io/fedocal/history/fedocal/flask_multistatic.py?identifier=master

But upstream have not fixed anything: https://pagure.io/flask-multistatic/commits/master

So the solution is either debundle, or fix the bundled copy.

And #225 (I decided that unbundling for code that seems dead upstream is maybe not worth the work, but I do not know how often it was bundled around)

For the warning, I propose #226 .

All three PRs seem good to me.

What is the process to get the PRs merged and an update to staging?

Log in to comment on this ticket.

Metadata
Related Pull Requests
  • #226 Last updated 4 months ago
  • #225 Last updated 4 months ago