Ticket created by ~petersanchez on ~emersion/tlstunnel
~emersion and I spoke about this on IRC.
I have a use case where I have a system with various IPs. I want to use 3 of them specific for 3 different services. Each service should support TLS for custom/ dynamic domains by users.
I'd like to have something like:
frontend <ip1>:443 { bind <ip1>:443 .... }
And repeat this for each IP and it's unique backend service. I think from our chat that some config and slight functionality changes would be required for this. I'm still very new to tlstunnel so I'm not quite sure what those changes would be but it would be a nice feature to be able to specify rules based on IP binding.
Ticket created by ~petersanchez on ~sircmpwn/meta.sr.ht
I noticed this in my own srht deployment. When updating profile in meta, the webhook content sent to other subscribed services (ie, hub, hg, git, etc.) will receive stale data. It takes 2-3 saves before the webhook will send the original change.
I verified in my webhook delivery log tables that the data is in fact stale.
Ticket created by ~petersanchez on ~sircmpwn/todo.sr.ht
Appears to be related to new sqlalchemy release per Drew.
Exception occured on GET http://127.0.0.1:5003/~petersanchez/django-impersonate/31 Traceback (most recent call last): File "/usr/lib/python3/dist-packages/sqlalchemy/sql/elements.py", line 850, in __getattr__ return getattr(self.comparator, key) AttributeError: 'Comparator' object has no attribute '_text_converter_role' The above exception was the direct cause of the following exception: Traceback (most recent call last): File "/usr/lib/python3/dist-packages/flask/app.py", line 2070, in wsgi_app response = self.full_dispatch_request() File "/usr/lib/python3/dist-packages/flask/app.py", line 1515, in full_dispatch_request rv = self.handle_user_exception(e) File "/usr/lib/python3/dist-packages/flask/app.py", line 1513, in full_dispatch_request rv = self.dispatch_request() File "/usr/lib/python3/dist-packages/flask/app.py", line 1499, in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**req.view_args) File "/usr/lib/python3/dist-packages/todosrht/blueprints/ticket.py", line 95, in ticket_GET return render_template("ticket.html", **ctx) File "/usr/lib/python3/dist-packages/flask/templating.py", line 147, in render_template return _render( File "/usr/lib/python3/dist-packages/flask/templating.py", line 128, in _render rv = template.render(context) File "/usr/lib/python3/dist-packages/jinja2/environment.py", line 1304, in render self.environment.handle_exception() File "/usr/lib/python3/dist-packages/jinja2/environment.py", line 925, in handle_exception raise rewrite_traceback_stack(source=source) File "/usr/lib/python3/dist-packages/todosrht/templates/ticket.html", line 1, in top-level template code {% extends "layout.html" %} File "/usr/lib/python3/dist-packages/srht/templates/layout.html", line 47, in top-level template code {% block body %} File "/usr/lib/python3/dist-packages/todosrht/templates/ticket.html", line 371, in block 'body' {{ comment | render_comment }} File "/usr/lib/python3/dist-packages/todosrht/filters.py", line 25, in wrap value = func(obj) File "/usr/lib/python3/dist-packages/todosrht/filters.py", line 69, in render_comment return render_markup(comment.ticket.tracker, comment.text) File "/usr/lib/python3/dist-packages/todosrht/filters.py", line 32, in render_markup tickets = find_mentioned_tickets(tracker, text) File "/usr/lib/python3/dist-packages/todosrht/tickets.py", line 117, in find_mentioned_tickets filters.append(and_( File "/usr/lib/python3/dist-packages/sqlalchemy/sql/elements.py", line 2392, in append coercions.expect(self._text_converter_role, clause).self_group( File "/usr/lib/python3/dist-packages/sqlalchemy/sql/elements.py", line 852, in __getattr__ util.raise_( File "/usr/lib/python3/dist-packages/sqlalchemy/util/compat.py", line 207, in raise_ raise exception AttributeError: Neither 'BooleanClauseList' object nor 'Comparator' object has an attribute '_text_converter_role'
Ticket created by ~petersanchez on ~rafael/Gembro
It would be awesome to be able to navigate with the keyboard as well.
PS. Great work on the app!
Comment by ~petersanchez on ~sircmpwn/lists.sr.ht
Can see the traceback a little easier in the paste:
https://paste.sr.ht/~petersanchez/5f7256fa8137b477647003433f84a986b3c4c9f7
Ticket created by ~petersanchez on ~sircmpwn/lists.sr.ht
In my testing on my install of lists (0.45.20) it seems when trying to save the webhook delivery results the task fails a couple of times before finally saving. Almost seems like the delivery write hasn't been committed before the update is being triggered.
Nov 16 21:16:48 code python3[920279]: [2020-11-16 21:16:48,764: INFO/MainProcess] Received task: srht.webhook.celery.async_request[8b6f8a0e-cbcd-4809-8301 -e9412f85d365] Nov 16 21:16:48 code python3[920393]: [2020-11-16 21:16:48,763: ERROR/ForkPoolWorker-2] Task srht.webhook.celery.async_request[1b9d3c66-f997-41ad-804a-e3e 05e26a3de] raised unexpected: InternalError('(psycopg2.errors.InFailedSqlTransaction) current transaction is aborted, commands ignored until end of transa ction block\n') Nov 16 21:16:48 code python3[920393]: Traceback (most recent call last): Nov 16 21:16:48 code python3[920393]: File "/usr/lib/python3/dist-packages/sqlalchemy/engine/base.py", line 1276, in _execute_context Nov 16 21:16:48 code python3[920393]: self.dialect.do_execute( Nov 16 21:16:48 code python3[920393]: File "/usr/lib/python3/dist-packages/sqlalchemy/engine/default.py", line 593, in do_execute Nov 16 21:16:48 code python3[920393]: cursor.execute(statement, parameters) Nov 16 21:16:48 code python3[920393]: psycopg2.errors.InFailedSqlTransaction: current transaction is aborted, commands ignored until end of transaction bl ock Nov 16 21:16:48 code python3[920393]: The above exception was the direct cause of the following exception: Nov 16 21:16:48 code python3[920393]: Traceback (most recent call last): Nov 16 21:16:48 code python3[920393]: File "/usr/lib/python3/dist-packages/celery/app/trace.py", line 412, in trace_task Nov 16 21:16:48 code python3[920393]: R = retval = fun(*args, **kwargs) Nov 16 21:16:48 code python3[920393]: File "/usr/lib/python3/dist-packages/celery/app/trace.py", line 704, in __protected_call__ Nov 16 21:16:48 code python3[920393]: return self.run(*args, **kwargs) Nov 16 21:16:48 code python3[920393]: File "/usr/lib/python3/dist-packages/srht/webhook/celery.py", line 36, in async_request Nov 16 21:16:48 code python3[920393]: db.session.execute( Nov 16 21:16:48 code python3[920393]: File "/usr/lib/python3/dist-packages/sqlalchemy/orm/scoping.py", line 163, in do Nov 16 21:16:48 code python3[920393]: return getattr(self.registry(), name)(*args, **kwargs) Nov 16 21:16:48 code python3[920393]: File "/usr/lib/python3/dist-packages/sqlalchemy/orm/session.py", line 1291, in execute Nov 16 21:16:48 code python3[920393]: return self._connection_for_bind(bind, close_with_result=True).execute( Nov 16 21:16:48 code python3[920393]: File "/usr/lib/python3/dist-packages/sqlalchemy/engine/base.py", line 1011, in execute Nov 16 21:16:48 code python3[920393]: return meth(self, multiparams, params) Nov 16 21:16:48 code python3[920393]: File "/usr/lib/python3/dist-packages/sqlalchemy/sql/elements.py", line 298, in _execute_on_connection Nov 16 21:16:48 code python3[920393]: return connection._execute_clauseelement(self, multiparams, params) Nov 16 21:16:48 code python3[920393]: File "/usr/lib/python3/dist-packages/sqlalchemy/engine/base.py", line 1124, in _execute_clauseelement Nov 16 21:16:48 code python3[920393]: ret = self._execute_context( Nov 16 21:16:48 code python3[920393]: File "/usr/lib/python3/dist-packages/sqlalchemy/engine/base.py", line 1316, in _execute_context Nov 16 21:16:48 code python3[920393]: self._handle_dbapi_exception( Nov 16 21:16:48 code python3[920393]: File "/usr/lib/python3/dist-packages/sqlalchemy/engine/base.py", line 1510, in _handle_dbapi_exception Nov 16 21:16:48 code python3[920393]: util.raise_( Nov 16 21:16:48 code python3[920393]: File "/usr/lib/python3/dist-packages/sqlalchemy/util/compat.py", line 182, in raise_ Nov 16 21:16:48 code python3[920393]: raise exception Nov 16 21:16:48 code python3[920393]: File "/usr/lib/python3/dist-packages/sqlalchemy/engine/base.py", line 1276, in _execute_context Nov 16 21:16:48 code python3[920393]: self.dialect.do_execute( Nov 16 21:16:48 code python3[920393]: File "/usr/lib/python3/dist-packages/sqlalchemy/engine/default.py", line 593, in do_execute Nov 16 21:16:48 code python3[920393]: cursor.execute(statement, parameters) Nov 16 21:16:48 code python3[920393]: sqlalchemy.exc.InternalError: (psycopg2.errors.InFailedSqlTransaction) current transaction is aborted, commands ign$ red until end of transaction block Nov 16 21:16:48 code python3[920393]: [SQL: Nov 16 21:16:48 code python3[920393]: UPDATE list_webhook_delivery Nov 16 21:16:48 code python3[920393]: SET response = %(response)s, Nov 16 21:16:48 code python3[920393]: response_status = %(status)s, Nov 16 21:16:48 code python3[920393]: response_headers = %(headers)s Nov 16 21:16:48 code python3[920393]: WHERE id = %(delivery_id)s Nov 16 21:16:48 code python3[920393]: ] Nov 16 21:16:48 code python3[920393]: [parameters: {'response': 'Thanks!', 'status': 200, 'headers': 'Server: nginx\nDate: Mon, 16 Nov 2020 21:16:48 GMT\$ Content-Type: text/html; charset=utf-8\nContent-Length: 7\nConnection: keep-alive\nKeep-Alive: ti ... (243 characters truncated) ... sync-xhr none; micr$ phone none; camera none; magnetometer none; gyroscope none; speaker none; vibrate none; fullscreen self; payment none; usb none;', 'delivery_id': 36}] Nov 16 21:16:48 code python3[920393]: (Background on this error at: http://sqlalche.me/e/13/2j85) Nov 16 21:16:48 code python3[920951]: [2020-11-16 21:16:48,791: INFO/ForkPoolWorker-2] Task srht.webhook.celery.async_request[ae01ebd5-7a58-47fd-9c01-69c$ 9432d10d] succeeded in 0.03890800476074219s: <Response [200]>
Comment by ~petersanchez on ~sircmpwn/hg.sr.ht
Webhooks should be in the hg repo at this point. I think base support was added about 4-5 months ago.
Also, some work has been done in the api:
https://hg.sr.ht/~sircmpwn/hg.sr.ht/browse/hgsrht/blueprints/api.py
Still a far ways off but progress.
Ticket created by ~petersanchez on ~sircmpwn/hub.sr.ht
When creating a new todo tracker via the hub interface the tracker owner is not auto subscribed to the new tracker.
Comment by ~petersanchez on ~sircmpwn/sr.ht
On 07/13, ~araspik wrote:
hint: try bottom posting
Sorry, was rushing around over the weekend and replied quickly.
I think your patch is a good solution. Thanks.