cern-sis / issues-inspire

0 stars 0 forks source link

Fix issues with ticket URL in airflow #613

Closed DonHaul closed 3 hours ago

DonHaul commented 4 hours ago

@michamos has reported issues creating authors: https://inspirebeta.net/backoffice/5e4d9efe-7a01-4d56-9f13-383e14e20e1c

Upon checking https://workflows.inspire.dev.siscern.org/dags/author_create_initialization_dag/grid?execution_date=2024-11-15+16%3A38%3A51.264666%2B00%3A00&tab=logs&dag_run_id=5e4d9efe-7a01-4d56-9f13-383e14e20e1c&task_id=create_author_create_user_ticket we see that the wrong url was being used for creating tickets

***   * /opt/airflow/logs/dag_id=author_create_initialization_dag/run_id=5e4d9efe-7a01-4d56-9f13-383e14e20e1c/task_id=create_author_create_user_ticket/attempt=1.log
[2024-11-15, 16:39:50 UTC] {local_task_job_runner.py:120} ▶ Pre task execution logs
[2024-11-15, 16:39:51 UTC] {base.py:84} INFO - Using connection ID 'inspire_connection' for task execution.
[2024-11-15, 16:39:51 UTC] {inspire_http_hook.py:54} INFO - Sending 'POST' to url: https://inspirebeta.net/api/tickets/create
[2024-11-15, 16:39:53 UTC] {author_create_init.py:77} INFO - Ticket created. Response status code: 200
[2024-11-15, 16:39:53 UTC] {author_create_init.py:78} INFO - {'ticket_id': 'bd94754787fd961095f833340cbb3504', 'ticket_url': 'https://cerntraining.service-now.com/nav_to.do?uri=/u_request_fulfillment.do?sys_id=bd94754787fd961095f833340cbb3504'}
[2024-11-15, 16:39:53 UTC] {base.py:84} INFO - Using connection ID 'backoffice_conn' for task execution.
[2024-11-15, 16:39:53 UTC] {base.py:59} INFO - Sending 'POST' to url: https://backoffice.dev.inspirebeta.net/api/workflow-ticket/
[2024-11-15, 16:39:53 UTC] {http.py:200} ERROR - HTTP error: Not Found
[2024-11-15, 16:39:53 UTC] {http.py:201} ERROR - 

We need to change from:

To avoid this issues in the future we need a centralized way to define routes, or alternatively end2end testing

DonHaul commented 4 hours ago

Upon checking the code, this is already properly implemented its just that even though we have autodeploy, the latest code is not on qa somehow

DonHaul commented 3 hours ago

Autodeploy is not being done for airflow hence the issue.