Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use Sentry Cron to report when full_sync can't access the shom proxy #48

Open
kolok opened this issue Apr 4, 2023 · 0 comments
Open

Comments

@kolok
Copy link
Contributor

kolok commented Apr 4, 2023

Sometimes, full_sync can't access the outside world, that error can't then be sent to sentry.

C:\SPPNaut\SPPNAUT\SPPNaut\referentiel-sync>call .venv\Scripts\activate.bat 
2023-04-03 07:00:13 - INFO - File sync launched...
fatal error: Failed to connect to proxy URL: "http://squid.shom.fr:3128"
Traceback (most recent call last):
  File "full_sync.py", line 70, in <module>
    check=True,
  File "C:\soft\WinPython\python-3.7.6.amd64\lib\subprocess.py", line 512, in run
    output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['C:\\SPPNaut\\SPPNAUT\\SPPNaut\\referentiel-sync\\.venv\\Scripts\\python.exe', '-m', 'awscli', 's3', 'sync', '\\\\smb-psm\\DATA_NA\\echanges-na\\referentiel', 's3://sppnaut-referentiel-production', '--delete', '--endpoint-url', 'https://cellar-fr-north-hds-c1.services.clever-cloud.com', '--exclude', '*', '--include', '[!.]*.eps', '--include', '**/[!.]*.eps', '--include', '[!.]*.pdf', '--include', '**/[!.]*.pdf', '--include', '[!.]*.xml', '--include', '**/[!.]*.xml', '--include', '[!.]*.xsl', '--include', '**/[!.]*.xsl', '--include', '[!.]*.svg', '--include', '**/[!.]*.svg']' returned non-zero exit status 1.
Sentry is attempting to send 2 pending error messages
Waiting up to 2 seconds
Press Ctrl-Break to quit
2023-04-03 07:00:32 - WARNING - Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x000002433D62CA88>: Failed to establish a new connection: [WinError 10061] Aucune connexion n’️a pu être é️tablie car l’️ordinateur cible l’️a expressé️ment refusé️e'))': /api/53/store/
Build step 'Exécuter une ligne de commande batch Windows' marked build as failure
Sending e-mails to: [email protected]
Finished: FAILURE

Could be monitored by Crons feature in Sentry if available in the future. cf. https://mattermost.incubateur.net/betagouv/pl/tzryjtn1dpf8fkf95b9arxoere

@rik rik changed the title Unavailable proxy don't send an error to Sentry Use Sentry Cron to report when full_sync can't access the shom proxy Apr 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Todo
Development

No branches or pull requests

1 participant