1. 20 Nov, 2023 1 commit
    • Jérome Perrin's avatar
      DMS: handle gracefully unauthorized ingestion scenarios · 5c601193
      Jérome Perrin authored
      Instead of using UnrestrictedMethod for the whole duration of
      discoverMetadata, revert to the original user permissions for the last
      part where we merge revision or change state, because we want this to
      fail when user is not allowed.
      
      This adjusts also the high level Base_contribute script to catch these
      errors and report them nicely to the user and while doing this some
      other problems were discovered and are also fixed.
      
      Some problems in ContributionTool.newContent were fixed, this was
      already trying to detect that a document is going to be merged and
      synchronously checked that this existing document can be replaced, to
      display an error to the user, but this part has two issues:
        - first it was using getMatchedFilenamePatternDict to find the
        document coordinates, but this method only supports
        preferred_document_filename_regular_expression capturing reference,
        but not the combination of node_reference and local_reference, so this
        was changed to use getPropertyDictFromFilename, which is what is
        actually used to compute the reference.
        - The second problem here was that this check was done with a
        standard restricted catalog search, but later mergeRevision uses an
        unrestricted search, so this was changed to use unrestricted catalog
        search to match mergeRevision
      
      The testing also revealed that the PDFDocument._setFile hack to clear
      the _content_information was only for _setFile, but not for _setData,
      so this was extended to _setData as well, so that a case where the PDF
      content is updated by setData also update content information.
      5c601193
  2. 15 Nov, 2023 1 commit
  3. 13 Nov, 2023 2 commits
  4. 10 Nov, 2023 2 commits
  5. 08 Nov, 2023 8 commits
  6. 07 Nov, 2023 3 commits
  7. 02 Nov, 2023 2 commits
  8. 27 Oct, 2023 4 commits
    • Jérome Perrin's avatar
      corporate_identity_test: fix coding style test · 07496d63
      Jérome Perrin authored
      This code seems to have been pushed accidentally as part of 6e5e8e8c
      (fixup! test: follow recent ImageMagick spec., 2023-10-11)
      07496d63
    • Jérome Perrin's avatar
      Revert "erp5_pdm: show first newest movement in movement history dialog" · e8d20966
      Jérome Perrin authored
      This reverts commit 14831fae.
      
      As discussed in 14831fae (comment 188678)
      this change breaks test and it seems more natural to implement this with
      listbox's sort parameter.
      
      This change will be pushed again, probably as part of
      !1305
      e8d20966
    • Jérome Perrin's avatar
      ui_test_core: trigger a change event after setFile · dd353a28
      Jérome Perrin authored
      This is what browsers do when user selects a file.
      dd353a28
    • Jérome Perrin's avatar
      testnode: make killall support processes with changed title · 21147419
      Jérome Perrin authored
      testnode uses ProcessManager.killall to terminate all processes from a
      path. To determine if a process is from a path, it looks at the command
      line. This does not work for processes using setproctitle to change
      their command line.
      
      We can see in ps:
      
          $ ps -edf | grep nginx
          slapuse+ 115059  45574  0 16:14 ?        00:00:00 nginx: master process /srv/slapgrid/slappart46/t/cvt/i/0/tmp/shared/nginx/6d79cb0e7d81dce1be97eec8a5712f08/sbin/nginx -c /srv/slapgrid/slappart46/t/cvt/i/0/tmp/inst/T-0/etc/nginx-master-introspection.conf
          slapuse+ 115090 115059  0 16:14 ?        00:00:00 nginx: worker process
      
      or by looking at cmdline, which is what psutil.Process.cmdline is using:
      
          $ cat /proc/115090/cmdline
          nginx: worker process
      
      and that's why sometimes when cancelling a software release test while
      it is running tests from a software using nginx, some processes are
      leaked, they keep using the port and next test running on this testnode
      fail.
      
      In that case, killall is called with /srv/slapgrid/slappart46/t/cvt , we
      can not find such process with cmdline, but we can extend this heuristic
      to use the current working directory:
      
          $ ls -al /proc/115090/cwd
          lrwxrwxrwx 1 slapuser46 slapuser46 0 Oct 19 16:16 /proc/115090/cwd -> /srv/slapgrid/slappart46/t/cvt/i/0/tmp/inst/T-0
      
      This also applies an optimization of only considering processes of the
      current unix user.
      21147419
  9. 20 Oct, 2023 3 commits
  10. 19 Oct, 2023 2 commits
  11. 18 Oct, 2023 3 commits
  12. 17 Oct, 2023 4 commits
  13. 13 Oct, 2023 2 commits
  14. 11 Oct, 2023 3 commits