Author SHA1 Message Date
renovate-bot 30c3b5dc8e Update dependency cffi to v2.1.1 2026-11-19 06:19:09 +00:00
julienfastre 81a585f546 Merge pull request 'Pin dependencies' (#5) from renovate/pin-dependencies into main
Build image and push it to registry / build (push) Successful in 32s
Reviewed-on: #5
2026-11-18 08:34:32 +00:00
renovate-bot bec337882c Pin dependencies 2026-11-18 02:19:05 +00:00
julienfastre bac18a832a Merge pull request 'Configure Renovate' (#4) from renovate/configure into main
Build image and push it to registry / build (push) Successful in 40s
Reviewed-on: #4
2026-11-17 19:37:38 +00:00
renovate-bot 9afef46888 Add renovate.json 2026-09-29 11:06:01 +00:00
julienfastre adba75fd24 Add byUserId to message payload in worker for enhanced metadata
Build image and push it to registry / build (push) Successful in 1m25s
2026-05-20 22:41:46 +02:00
julienfastre 7c1d645447 Update dependencies in requirements.txt to latest versions
Build image and push it to registry / build (push) Successful in 1m23s
2026-05-20 16:00:48 +02:00
julienfastreandClaude Sonnet 4.6 dadf3d72e3 Fix infinite retry loop on signing errors in worker
Catch SigningError separately (logged at ERROR level) and fix the ack/nack
logic so failed messages are requeued once then discarded, instead of being
requeued indefinitely or lost. Remove the bare `raise e` that crashed the
worker after each error.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-20 15:36:54 +02:00
5 changed files with 40 additions and 29 deletions

No files matched your search

+4 -4
View File
@@ -16,20 +16,20 @@ jobs:
runs-on: cth-ubuntu-latest
steps:
- name: Check out repository
uses: https://github.com/actions/checkout@v4
uses: https://github.com/actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
- name: Set up Docker Buildx
uses: https://github.com/docker/setup-buildx-action@v3
uses: https://github.com/docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f # v3
- name: Login to registry
uses: https://github.com/docker/login-action@v3
uses: https://github.com/docker/login-action@c94ce9fb468520275223c153574b00df6fe4bcc9 # v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
registry: 'h3m6q87t.gra7.container-registry.ovh.net'
- name: Build and push
uses: https://github.com/docker/build-push-action@v5
uses: https://github.com/docker/build-push-action@ca052bb54ab0790a636c9b5f226502c73d547a25 # v5
with:
context: ./pythonProject
file: ./pythonProject/Dockerfile
+1 -1
View File
@@ -1,5 +1,5 @@
# Set base Python image version
FROM python:3.10-alpine
FROM python:3.10-alpine@sha256:8ca9f9d0f4df2af674092e7e9d79ce7985e783cecfe070f8ea850801b6520bf7
# Set working directory
WORKDIR /app
+16 -16
View File
@@ -1,22 +1,22 @@
asn1crypto==1.5.1
certifi==2025.4.26
cffi==1.17.1
charset-normalizer==3.4.2
click==8.2.1
cryptography==45.0.3
idna==3.10
lxml==5.4.0
certifi==2026.5.20
cffi==2.1.1
charset-normalizer==3.4.7
click==8.4.0
cryptography==48.0.0
idna==3.15
lxml==6.1.1
oscrypto==1.3.0
pika==1.3.2
pika==1.4.0
pika-stubs==0.1.3
pycparser==2.22
pyHanko==0.29.0
pyhanko-certvalidator==0.27.0
pycparser==3.0
pyHanko==0.35.1
pyhanko-certvalidator==0.31.1
pypng==0.20220715.0
PyYAML==6.0.2
PyYAML==6.0.3
qrcode==8.2
requests==2.32.3
typing_extensions==4.14.0
requests==2.34.2
typing_extensions==4.15.0
tzlocal==5.3.1
uritools==5.0.0
urllib3==2.4.0
uritools==6.1.1
urllib3==2.7.0
+16 -8
View File
@@ -5,6 +5,7 @@ import os
import pika
import sign
from pyhanko.sign.general import SigningError
LOG_FORMAT = ('%(levelname) -10s %(asctime)s %(name) -30s %(funcName) '
'-35s %(lineno) -5d: %(message)s')
@@ -60,6 +61,7 @@ def on_message(channel, method_frame, header_frame, body):
channel.basic_publish(exchange=EXCHANGE_OUT,
body=json.dumps({'signatureId': body_content['signatureId'],
'signatureZoneIndex': body_content['signatureZoneIndex'],
'byUserId': body_content['byUserId'] if 'byUserId' in body_content else None,
'content': base64.b64encode(signed.read()).decode('utf-8')}),
properties=pika.BasicProperties(content_type='application/json',
delivery_mode=pika.DeliveryMode.Transient),
@@ -67,16 +69,22 @@ def on_message(channel, method_frame, header_frame, body):
LOGGER.debug("signed file resend to amqp")
channel.basic_ack(delivery_tag=method_frame.delivery_tag)
except Exception as e:
LOGGER.warning(f"error encountered while signing: {e}")
except SigningError as e:
LOGGER.error(f"signing error for signatureId {body_content['signatureId']}: {e}", exc_info=True)
if method_frame.redelivered:
LOGGER.warning(
f"stopping handling this message, because the message is already redelivered, signatureId: {body_content['signatureId']}")
channel.basic_reject(delivery_tag=method_frame.delivery_tag, requeue=True)
LOGGER.error(f"message already redelivered, discarding signatureId: {body_content['signatureId']}")
channel.basic_reject(delivery_tag=method_frame.delivery_tag, requeue=False)
else:
LOGGER.warning(f"first try failed, signatureId: {body_content['signatureId']}")
channel.basic_ack(delivery_tag=method_frame.delivery_tag)
raise e
LOGGER.warning(f"first try failed, requeueing for one retry, signatureId: {body_content['signatureId']}")
channel.basic_nack(delivery_tag=method_frame.delivery_tag, requeue=True)
except Exception as e:
LOGGER.warning(f"error encountered while signing, signatureId: {body_content['signatureId']}: {e}", exc_info=True)
if method_frame.redelivered:
LOGGER.warning(f"message already redelivered, discarding signatureId: {body_content['signatureId']}")
channel.basic_reject(delivery_tag=method_frame.delivery_tag, requeue=False)
else:
LOGGER.warning(f"first try failed, requeueing for one retry, signatureId: {body_content['signatureId']}")
channel.basic_nack(delivery_tag=method_frame.delivery_tag, requeue=True)
if __name__ == '__main__':
+3
View File
@@ -0,0 +1,3 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json"
}