~petersanchez

Los Angeles, USA - Managua, Nicaragua

https://petersanchez.com


#1 Keyboard Navigation support 6 months ago

Comment by ~petersanchez on ~rafael/Gembro

Thanks!

#1 Keyboard Navigation support 6 months ago

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!

#168 Saving webhook delivery status results in traceback 10 months ago

Comment by ~petersanchez on ~sircmpwn/lists.sr.ht

Can see the traceback a little easier in the paste:

https://paste.sr.ht/~petersanchez/5f7256fa8137b477647003433f84a986b3c4c9f7

#168 Saving webhook delivery status results in traceback 10 months ago

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]>

#37 API not on par with git.sr.ht 10 months ago

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.

#63 Auto subscribe owners to trackers created by hub 11 months ago

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.

#253 Relative Linking partially broken 1 year, 2 months ago

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.

#253 Relative Linking partially broken 1 year, 2 months ago

Comment by ~petersanchez on ~sircmpwn/sr.ht

Yea, maybe the automatic appending of / is wrong. I know some apps, git or hg for example, add it to the link_prefix from the view code.

That does seem to be the issue though.

On 07/11, ~araspik wrote:

If we were to fix man.sr.ht to conform to how _relative_url works, we can use os.path.dirname on the link_prefix values over at man.sr.ht:mansrht/blueprints/html.py:L190,L205. This should be accompanied by documentation within _relative_url or related on how link_prefix works.

-- View on the web: https://todo.sr.ht/~sircmpwn/sr.ht/253#comment-12586

#253 Relative Linking partially broken 1 year, 2 months ago

Ticket created by ~petersanchez on ~sircmpwn/sr.ht

This was previously working but it seems the recent changes may have broken the relative linking in markdown rendering.

For example:

https://man.sr.ht/hg.sr.ht/installation.md#ssh-dispatch

Clicking the link to the git documentation turns a 404.

I did some quick testing in a terminal and after refreshing my memory on the _relative_url method on the renderer class, it seems like it should work. Unfortunately I currently don't have the time to dig into this.

If I had to guess, it's going to be based on the value of what's being passed in as the link_prefix variable.

#32 Add config.example.ini to repo 1 year, 4 months ago

Ticket created by ~petersanchez on ~sircmpwn/hub.sr.ht

The repo seems to be missing the example config. Please add one in case there are any cases or settings we need to be aware of.

Thanks!