1. 09 Mar, 2022 2 commits
  2. 14 Feb, 2022 1 commit
  3. 10 Feb, 2022 1 commit
    • Kevin Morris's avatar
      change: report unhandled tracebacks to a repository · 7485cc23
      Kevin Morris authored
      
      
      As repeats of these traceback notifications were annoying some of
      the devops staff, and it took coordination to share tracebacks with
      developers, this commit removes that responsibility off of devops
      by reporting tracebacks to Gitlab repositories in the form of issues.
      
      - removed ServerErrorNotification
      - removed notifications.postmaster configuration option
      - added notifications.gitlab-instance option
      - added notifications.error-project option
      - added notifications.error-token option
      - added aurweb.exceptions.handle_form_exceptions, a POST route decorator
      
      Issues are filed confidentially. This change will need updates
      in infrastructure's ansible configuration before this can be
      applied to aur.archlinux.org.
      
      Signed-off-by: Kevin Morris's avatarKevin Morris <kevr@0cost.org>
      7485cc23
  4. 09 Feb, 2022 1 commit
  5. 08 Feb, 2022 1 commit
  6. 07 Feb, 2022 1 commit
  7. 18 Jan, 2022 2 commits
  8. 10 Jan, 2022 1 commit
    • Kevin Morris's avatar
      feat(python): catch all exceptions thrown through fastapi route paths · d675c0dc
      Kevin Morris authored
      
      
      This commit does quite a bit:
      - Catches unhandled exceptions raised in the route handler and
        produces a 500 Internal Server Error Arch-themed response.
      - Each unhandled exception causes a notification to be sent to new
        `notifications.postmaster` email with a "Traceback ID."
      - Traceback ID is logged to the server along with the traceback which
        caused the 500: `docker-compose logs fastapi | grep '<traceback_id>'`
      - If `options.traceback` is set to `1`, traceback is displayed in
        the new 500.html template.
      
      Signed-off-by: Kevin Morris's avatarKevin Morris <kevr@0cost.org>
      d675c0dc
  9. 08 Jan, 2022 1 commit
  10. 18 Dec, 2021 1 commit
  11. 29 Nov, 2021 9 commits
  12. 28 Nov, 2021 2 commits
  13. 15 Nov, 2021 1 commit
    • Kevin Morris's avatar
      housekeep(fastapi): rework aurweb.db session API · 4103ab49
      Kevin Morris authored
      
      
      Changes:
      -------
      - Add aurweb.db.get_session()
          - Returns aurweb.db's global `session` instance
          - Provides us a way to change the implementation of the session
            instance without interrupting user code.
      - Use aurweb.db.get_session() in session API methods
      - Add docstrings to session API methods
      - Refactor aurweb.db.delete
          - Normalize aurweb.db.delete to an alias of session.delete
      - Refresh instances in places we depend on their non-PK columns
        being up to date.
      
      Signed-off-by: Kevin Morris's avatarKevin Morris <kevr@0cost.org>
      4103ab49
  14. 10 Nov, 2021 6 commits
  15. 09 Nov, 2021 3 commits
  16. 07 Nov, 2021 1 commit
  17. 06 Nov, 2021 2 commits
  18. 21 Oct, 2021 1 commit
    • Kevin Morris's avatar
      fix(fastapi): centralize logging initialization · a06f4ec1
      Kevin Morris authored
      
      
      With this change, we provide a wrapper to `logging.getLogger`
      in the `aurweb.logging` module. Modules wishing to log using
      logging.conf should get their module-local loggers by calling
      `aurweb.logging.getLogger(__name__)`, similar to `logging.getLogger`,
      this way initialization with logging.conf is guaranteed.
      
      Signed-off-by: Kevin Morris's avatarKevin Morris <kevr@0cost.org>
      a06f4ec1
  19. 19 Oct, 2021 3 commits