Skip to content
Snippets Groups Projects
  1. Oct 05, 2023
  2. Oct 04, 2023
    • Antoine R. Dumont's avatar
      web.utils.archive: Fix · fed4abd7
      Antoine R. Dumont authored
      Currently in staging, the service is failing [1].
      
      Patching it with this, the routine went back to normal [2]
      
      [1]
      ```
      Oct 04 09:40:32 webapp django-admin[2174716]: /etc/softwareheritage/web/web does not exist, using /etc/softwareheritage/web/web.yml instead
      Oct 04 09:40:33 webapp django-admin[2174716]: Traceback (most recent call last):
      Oct 04 09:40:33 webapp django-admin[2174716]:   File "/usr/bin/django-admin", line 5, in <module>
      Oct 04 09:40:33 webapp django-admin[2174716]:     management.execute_from_command_line()
      Oct 04 09:40:33 webapp django-admin[2174716]:   File "/usr/lib/python3/dist-packages/django/core/management/__init__.py", line 381, in execute_from_command_line
      Oct 04 09:40:33 webapp django-admin[2174716]:     utility.execute()
      Oct 04 09:40:33 webapp django-admin[2174716]:   File "/usr/lib/python3/dist-packages/django/core/management/__init__.py", line 375, in execute
      Oct 04 09:40:33 webapp django-admin[2174716]:     self.fetch_command(subcommand).run_from_argv(self.argv)
      Oct 04 09:40:33 webapp django-admin[2174716]:   File "/usr/lib/python3/dist-packages/django/core/management/base.py", line 323, in run_from_argv
      Oct 04 09:40:33 webapp django-admin[2174716]:     self.execute(*args, **cmd_options)
      Oct 04 09:40:33 webapp django-admin[2174716]:   File "/usr/lib/python3/dist-packages/django/core/management/base.py", line 364, in execute
      Oct 04 09:40:33 webapp django-admin[2174716]:     output = self.handle(*args, **options)
      Oct 04 09:40:33 webapp django-admin[2174716]:   File "/usr/lib/python3/dist-packages/swh/web/save_code_now/management/commands/refresh_savecodenow_statuses.py", line 27, in handle
      Oct 04 09:40:33 webapp django-admin[2174716]:     refreshed_statuses = refresh_save_origin_request_statuses()
      Oct 04 09:40:33 webapp django-admin[2174716]:   File "/usr/lib/python3/dist-packages/swh/web/save_code_now/origin_save.py", line 715, in refresh_save_origin_request_statuses
      Oct 04 09:40:33 webapp django-admin[2174716]:     if save_requests.count() > 0
      Oct 04 09:40:33 webapp django-admin[2174716]:   File "/usr/lib/python3/dist-packages/swh/web/save_code_now/origin_save.py", line 683, in update_save_origin_requests_from_queryset
      Oct 04 09:40:33 webapp django-admin[2174716]:     task_runs.get(sor.loading_task_id),
      Oct 04 09:40:33 webapp django-admin[2174716]:   File "/usr/lib/python3/dist-packages/swh/web/save_code_now/origin_save.py", line 380, in _update_save_request_info
      Oct 04 09:40:33 webapp django-admin[2174716]:     save_request
      Oct 04 09:40:33 webapp django-admin[2174716]:   File "/usr/lib/python3/dist-packages/swh/web/save_code_now/origin_save.py", line 318, in _check_visit_update_status
      Oct 04 09:40:33 webapp django-admin[2174716]:     visit_date, visit_status, _ = _get_visit_info_for_save_request(save_request)
      Oct 04 09:40:33 webapp django-admin[2174716]:   File "/usr/lib/python3/dist-packages/swh/web/save_code_now/origin_save.py", line 297, in _get_visit_info_for_save_request
      Oct 04 09:40:33 webapp django-admin[2174716]:     ovs = archive.origin_visit_find_by_date(origin, save_request.request_date)
      Oct 04 09:40:33 webapp django-admin[2174716]:   File "/usr/lib/python3/dist-packages/swh/web/utils/archive.py", line 1110, in origin_visit_find_by_date
      Oct 04 09:40:33 webapp django-admin[2174716]:     return converters.from_origin_visit({**visit_status.to_dict(), "type": visit.type})
      Oct 04 09:40:33 webapp django-admin[2174716]: AttributeError: 'NoneType' object has no attribute 'to_dict'
      Oct 04 09:40:33 webapp systemd[1]: swh-webapp-update-savecodenow-statuses.service: Main process exited, code=exited, status=1/FAILURE
      ```
      
      [2]
      ```
      Oct 04 09:45:31 webapp django-admin[2175548]: /etc/softwareheritage/web/web does not exist, using /etc/softwareheritage/web/web.yml instead
      Oct 04 09:45:33 webapp django-admin[2175548]: Successfully updated 10 save request(s).
      Oct 04 09:45:33 webapp systemd[1]: swh-webapp-update-savecodenow-statuses.service: Succeeded.
      ```
      Verified
      fed4abd7
  3. Sep 29, 2023
  4. Sep 12, 2023
  5. Sep 07, 2023
    • Antoine Lambert's avatar
      browse: Fix an error when browsing content by id with breadcrumbs · bec2ddac
      Antoine Lambert authored
      When browsing a content by its sha1_git identifier, the identifier of the
      directory containing it is prepended to the path query parameter in order
      to display a functional breadcrumbs enabling to navigate back and forth
      in a filsystem.
      
      However, when an origin context is provided through the origin_url query
      parameter of the content view, the previous implementation was using the
      root directory identifier of the head branch of the latest origin snapshot
      in the breadcrumbs instead of the one provided in the path query parameter.
      This could lead to a 404 error as the wrong root directory was used to
      query subpaths in the breadcrumbs.
      bec2ddac
    • Antoine Lambert's avatar
      package.json: Upgrade dependencies · 9e170167
      Antoine Lambert authored
      9e170167
  6. Aug 30, 2023
  7. Aug 28, 2023
  8. Aug 21, 2023
Loading