1. 26 Dec, 2021 1 commit
    • Kirill Smelkov's avatar
      Merge branch 'master' into master+ZODB4-wc2 · 577a4c87
      Kirill Smelkov authored
      * master: (112 commits)
        ninja: make sure it's built using SlapOS Python
        proxysql: stop using old CMake
        version up: proxysql 2.3.2
        proxysql: bundled libinjection needs Python 2
        proxysql: small clean up
        proxysql: clean up extends
        libiconv, libmicrohttpd, proxysql: make parts shared
        java-jdk: simplify a little
        fixup! component/nxdtest: v↑  (namespaces, /tmp-on-tmpfs, cancellation)
        erp5 and erp5testnode: add software-type to software.cfg.json so that it works in panel GUI
        Revert "component/libxml2: Version up"
        Revert "component/meson: Version up"
        software/theia: Fix EPR5 resiliency test
        component/libxml2: Version up
        component/meson: Version up
        component/m4: Version up
        erp5: Change default timerserver-interval from 5s to 1s.
        slapos/obs.cfg: supports the newer version of cmmi and add some comments
        pyprog: Wrap entry-point call with sys.exit()
        Generalize how nxdtest python script is generated into pyprog recipe macro
        ...
      577a4c87
  2. 24 Dec, 2021 8 commits
  3. 23 Dec, 2021 5 commits
  4. 22 Dec, 2021 6 commits
  5. 21 Dec, 2021 3 commits
    • Thomas Gambier's avatar
    • Jérome Perrin's avatar
      pyprog: Wrap entry-point call with sys.exit() · b751603d
      Jérome Perrin authored
      Reading this spec, we probably want to change
      ```
        entry_run = 'from %s import %s; %s()' % (mod, func, func)
      ```
      to
      ```
        entry_run = 'import sys; from %s import %s; sys.exit(%s())' % (mod, func, func)
      ```
      to follow
      https://packaging.python.org/en/latest/specifications/entry-points/#use-for-scripts
      , this is also what `zc.recipe.egg` does.
      
      /reviewed-by @kirr
      /reviewed-on nexedi/slapos!1108
      b751603d
    • Kirill Smelkov's avatar
      Generalize how nxdtest python script is generated into pyprog recipe macro · 0ee52376
      Kirill Smelkov authored
      In e328aa49 (component/nxdtest: Prepare for nexedi/nxdtest!13)
      I reworked how nxdtest script is generated and splitted it into nxdtest itself
      and .nxdtest.pyexe python interpreter, so that sys.executable could be used to
      correctly spawn other python scripts:
      
          3) rework how nxdtest script is generated and split it into .nxdtest.pyexe and
             nxdtest itself. .nxdtest.pyexe is python interpreter via which nxdtest is run.
             This interpreter has all eggs required by nxdtest in sys.path, so that
             nxdtest could spawn its trun.py via sys.executable. If we don't care to have
             properly setup sys.executable, trun.py will fail when importing any module that
             nxdtest.py could already successfully import.
      
             Initially I tried to workaround this issue via adjusting $PYTHONPATH <-
             sys.path in main nxdtest script, but @jerome points out that, $PYTHONPATH,
             if set, also affects processes that trun.py spawns, which is not good:
      
             nexedi/slapos!1095 (comment 146799)
      
             -> so fix this via running nxdtest via environment where sys.executable is
             properly setup python interpreter with path for all eggs that nxdtest has
             access to.
      
             Because we already have half-way workarounds for similar problem in several
             places, and because running a script with correctly setup sys.executable is
             generally better, I would say it should be a good idea to rework
             zc.recipe.egg:scripts to generate all scripts to work this way, but I do not
             want to fight about it.
      
             So let's leave this scheme nxdtest-specific for now.
      
      This patch addresses the last paragraph and provides a general pyprog buildout
      macro that could be used to generate python script for any entry point to run
      with correctly set sys.executable.
      
      /reviewed-by @jerome
      /reviewed-on nexedi/slapos!1108
      0ee52376
  6. 20 Dec, 2021 2 commits
    • Kirill Smelkov's avatar
      component/nxdtest: v↑ (namespaces, /tmp-on-tmpfs, cancellation) · e45dc8f0
      Kirill Smelkov authored
      This upgrade
      
      - teaches nxdtest to run each testcase with its own /tmp and /dev/shm to
        detect after each test run leaked temporary files, leaked mount
        entries, to isolate different test runs from each other, and to provide
        tmpfs on /tmp for every test.
      
        nexedi/nxdtest!13
      
      - teaches nxdtest to propagate cancellation to spawned test jobs, so
        that whenever user cancels corresponding test run in ERP5 UI, nxdtest
        stops promptly. This should be most useful for long-running tests like
        SlapOS.SoftwareReleases.IntegrationTest-* which before had to be
        waited for for hours to complete even after cancelling test run in ERP5.
      
        nexedi/nxdtest!14
      
      Pytest-mock is added because it becomes dependency to test nxdtest
      itself.
      e45dc8f0
    • Kirill Smelkov's avatar
      Move mock pinning into stack/slapos.cfg · a1d30c26
      Kirill Smelkov authored
      Several places pin mock egg individually. There are pins to `mock = 3.0.5`
      and pins to `mock = 2.0.0:whl`. Mock 3.0.5 is the last version that
      supports Python2 and can be considered as "current" in our context today.
      
      For nxdtest we are going to add pytest-mock, which depends on the mock,
      which, if not consolidated, will need to add another `mock = 3.0.5`
      somewhere.
      
      -> Stop doing that and move mock pinning into stack/slapos.cfg.
      This way it will be even easier for upcoming Python3 support, because in
      stack/slapos.cfg we can add per-Python3 [versions] with pins adjusted as
      needed for py3, but all still in one single place.
      
      Leave `mock = 2.0.0:whl` pins intact to be updated when needed by
      maintainers of corresponding software releases:
      
          software/slapos-sr-testing/software.cfg:mock = 2.0.0:whl
          software/slapos-testing/software.cfg:mock = 2.0.0:whl
          software/wendelin/software-kerastensorflow.cfg:mock = 2.0.0:whl
      a1d30c26
  7. 17 Dec, 2021 6 commits
  8. 16 Dec, 2021 7 commits
  9. 15 Dec, 2021 2 commits