1. 31 Oct, 2019 8 commits
    • Romain Courteaud's avatar
    • Jérome Perrin's avatar
      test_result: Support evaluating test result status per line · cddfab91
      Jérome Perrin authored
      This is to support SLAPOS-EGG-TEST which runs tests for multiple
      repositories from the same test suite. Evaluating each commit from
      each repository with the result of the test result is problematic because
      every time one test fail, all repositories are marked as failed.
      
      Introduce a new property on test result repository to optionally define
      the pattern of test result line to consider for this repository. This way,
      with our SLAPOS-EGG-TEST running tests for slapos, slapos.core,
      ... etc and producing test result line with the same title as the repository
      name, we can use something like `slapos$` (the pattern is a regular expression)
      to match only slapos,  `slapos\.core` to match only slapos.core etc.
      
      This also allow to define more complex relation if necessary, for example kedifa
      and caucase seems related, maybe we want to configure so that a failure on kedifa
      test suite marks the commits from both kedifa and caucase as failed (or maybe
      not, but at least this way should make it possible)
      
      /reviewed-on nexedi/erp5!964
      cddfab91
    • Jérome Perrin's avatar
      test_result: Tolerate "404 References for commit not found" · 427469aa
      Jérome Perrin authored
      When a commit is no longer reachable from a branch, gitlab API does not
      allow annotating the commit.
      
      This happens quite often when we push force in the branch after test
      result started to run on this branch.
      
      /reviewed-on !972
      427469aa
    • Jérome Perrin's avatar
      test_result: support templated URL for test results · c3f38db1
      Jérome Perrin authored
      The previous way of using portal.ERP5Site_absoluteUrl() +
      test_result.getRelativeUrl() could not work with ERP5JS URLs.
      
      To be compatible with this and also maybe erp5_web-style URLs if we want
      to link to public tests results, we should have more flexibility in how
      we generate URLs.
      
      Introduce a "test result url template" property on gitlab connector, see
      unit test for a renderjs ui compatible usage.
      
      /reviewed-on !963
      c3f38db1
    • Jérome Perrin's avatar
      test_result: Support repositories or user ids with . · 49e78bec
      Jérome Perrin authored
      Because gitlab way of passing project ID as user/project URL-encoded
      does not support dots (it would needs to be encoded as %2E) and that
      requests rewrites %2F from URL to . (which is probably correct, that's
      the RFC), we cannot use encoded paths for when they contain a dot.
      
      To workaround this, when user or repo as a dot, make another API call to
      get the numerical project ID and use that instead.
      
      We only do that for projects with a dot because that's an extra request
      we'd like to avoid.
      
      /reviewed-on !962
      49e78bec
    • Jérome Perrin's avatar
      fixes for TestResult_getTestSuiteData · 0024e8ac
      Jérome Perrin authored
      While deploying nexedi/erp5!924 we found out that this script was not working in these cases:
      
       * when buildout section id contains `-repository` there's a convention that this is stripped and does not appear in test result reference ( implemented [here](https://lab.nexedi.com/nexedi/erp5/blob/31804f683fd36322fb38aeb9654bee70cebe4fdb/erp5/util/testnode/NodeTestSuite.py#L95) )
       * when buildout section id contains `-` this script crash
       * when there's no buildout section id and there's no fix for that, because buildout section id is a required property. If we encounter this failure, we fix the data by putting a buildout section id on test suite repository.
      
      /reviewed-on nexedi/erp5!961
      0024e8ac
    • Arnaud Fontaine's avatar
    • Vincent Pelletier's avatar
      erp5_administration: Add profiling scripts. · 399c4114
      Vincent Pelletier authored
      Guarded with Manager role, as they allow exporting entire source files & scripts.
      399c4114
  2. 30 Oct, 2019 4 commits
  3. 29 Oct, 2019 3 commits
    • Arnaud Fontaine's avatar
    • Arnaud Fontaine's avatar
      ZODB Components: Enable checking of imports with pylint. · 1cb2dc4c
      Arnaud Fontaine authored
      Until now it was disabled which means that if Component A imports Component B
      and the latter is not in {validated,modified} state, Component A could be
      validated without raising any error and failed at execution time.
      
      As this relies on Pylint transform/hook and avoiding monkey patch as much
      as possible, make Products.ERP5Type.patches.pylint available for Python3 (not
      actually tested with ERP5 but no AttributeError nor ImportError with Python3
      with this code).
      
      Also, allow developer to call validate action from 'modified' state to handle
      import use case:
        1. Edit A which raises an error stating that B.
        2. Fix B and validate it.
        3. Validate again A without requiring a modification of {reference,version,text_content}.
      1cb2dc4c
    • Arnaud Fontaine's avatar
      ZODB Components: Source code was checked even when setting... · 88a03532
      Arnaud Fontaine authored
      ZODB Components: Source code was checked even when setting text_content_{error,warning}_message_list properties.
      
      So only check source code and validate when _set{TextContent,Reference,Version}
      are called and remove wildcards.
      88a03532
  4. 25 Oct, 2019 3 commits
  5. 24 Oct, 2019 6 commits
  6. 23 Oct, 2019 7 commits
  7. 18 Oct, 2019 1 commit
  8. 17 Oct, 2019 4 commits
    • Arnaud Fontaine's avatar
      ZODB Components: Add 'Origin' (source_reference) field showing from which FS... · cf632afb
      Arnaud Fontaine authored
      ZODB Components: Add 'Origin' (source_reference) field showing from which FS module it was imported.
      cf632afb
    • Arnaud Fontaine's avatar
      ZODB Components: Do not validate nor check {consistency,source code} after importing from FS. · 799da311
      Arnaud Fontaine authored
      * pylint may return a false positive error which have to be disabled and
        failing to import it because of that requires to edit on the FS and try
        again so it is not practical for a whole Product. Instead it is easier
        to import it and not validate
      * Validation was done only for 'Test Component' and 'Extension Component',
        but all imported Components had their consistency and source code checked
        and this is not consistent to not validate but do these checks.
      * importFromFilesystem() was checking consistency and source code, and this
        was done again when validating.
      
      So leave the imported ZODB Components as draft and let the developer fixes
      issues upon validation before committing.
      799da311
    • Jérome Perrin's avatar
      test_result: tolerate buildout section ids with - · f20d2689
      Jérome Perrin authored
      parsing of reference in TestResult_getTestSuiteData did not handle
      properly buildout section ids with -, this was causing
      
        File "Script (Python)", line 30, in TestResult_getTestSuiteData
          buildout_section_id_and_commits_count, revision = repository_string.split('-')
        ValueError: too many values to unpack
      f20d2689
    • Jérome Perrin's avatar
      test_result: support test suite repositories named .*-repository · e0679d32
      Jérome Perrin authored
      Their reference will not have the -repository prefix, so
      TestResult_getTestSuiteData should do similar processing to find the
      corresponding test suite repositories from reference.
      e0679d32
  9. 16 Oct, 2019 1 commit
    • Arnaud Fontaine's avatar
      ZODB Components: List of migratable 'Module Components' in Products.XXX.*... · f675c0fb
      Arnaud Fontaine authored
      ZODB Components: List of migratable 'Module Components' in Products.XXX.* should include any kind of objects and not only modules.
      
      This fixes Products.ERP5VCS.Git module not being displayed because
      Products.ERP5VCS.__init__ only imports one of its class and not the whole
      module (and the module was not imported anywhere else too) so it was not in
      Products.ERP5VCS.__dict__.
      f675c0fb
  10. 15 Oct, 2019 2 commits
  11. 14 Oct, 2019 1 commit