Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-31128

Add Matrix Project compatibility (investigate) (our case 13748)

    XMLWordPrintable

    Details

    • Similar Issues:

      Attachments

        Activity

        Hide
        scm_issue_link SCM/JIRA link daemon added a comment -

        Code changed in jenkins
        User: Mads Nielsen
        Path:
        pom.xml
        src/main/java/org/jenkinsci/plugins/pretestedintegration/PretestedIntegrationBuildWrapper.java
        src/main/java/org/jenkinsci/plugins/pretestedintegration/PretestedIntegrationPostCheckout.java
        http://jenkins-ci.org/commit/pretested-integration-plugin/80d066a1bbdcf255c1c7ff2f84e99adca7bfef5e
        Log:
        JENKINS-31128 Added the posibility to run with Matrix projects

        Show
        scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Mads Nielsen Path: pom.xml src/main/java/org/jenkinsci/plugins/pretestedintegration/PretestedIntegrationBuildWrapper.java src/main/java/org/jenkinsci/plugins/pretestedintegration/PretestedIntegrationPostCheckout.java http://jenkins-ci.org/commit/pretested-integration-plugin/80d066a1bbdcf255c1c7ff2f84e99adca7bfef5e Log: JENKINS-31128 Added the posibility to run with Matrix projects
        Hide
        scm_issue_link SCM/JIRA link daemon added a comment -

        Code changed in jenkins
        User: Mads Nielsen
        Path:
        src/test/java/org/jenkinsci/plugins/pretestedintegration/integration/scm/git/GitProjectBuilder.java
        src/test/java/org/jenkinsci/plugins/pretestedintegration/integration/scm/git/MatrixProjectCompatabilityTestIT.java
        src/test/java/org/jenkinsci/plugins/pretestedintegration/integration/scm/git/TestUtilsFactory.java
        http://jenkins-ci.org/commit/pretested-integration-plugin/3f741090db626e3afc69e77802b8100f4672cbcd
        Log:
        JENKINS-31128 Added failing test that indicates a design challenge

        Show
        scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Mads Nielsen Path: src/test/java/org/jenkinsci/plugins/pretestedintegration/integration/scm/git/GitProjectBuilder.java src/test/java/org/jenkinsci/plugins/pretestedintegration/integration/scm/git/MatrixProjectCompatabilityTestIT.java src/test/java/org/jenkinsci/plugins/pretestedintegration/integration/scm/git/TestUtilsFactory.java http://jenkins-ci.org/commit/pretested-integration-plugin/3f741090db626e3afc69e77802b8100f4672cbcd Log: JENKINS-31128 Added failing test that indicates a design challenge
        Hide
        thi Thierry Lacour added a comment -

        Rounded up investigation.
        Decision will be made with stakeholders.

        Show
        thi Thierry Lacour added a comment - Rounded up investigation. Decision will be made with stakeholders.
        Hide
        lars_kruse Lars Kruse added a comment -

        As it turned out in the investigation, "proper" Matrix Project compatibility isn't a quick fix.
        JENKINS-31128 Investigate Matrix Job Compatibility

        Below is the result of investigating if SCM extensions could be used to solve our problem.

        TL;DR
        Writing SCM extensions for Pretested Integration will not solve our Matrix Project related problems. But...

        The problems Pretested Integration for Matrix jobs suffers are as follows:

        Adding the publisher to the Matrix Job causes the workspace changes in the Matrix Job's workspace to be pushed. However, no merge or verification is ever done there. The Matrix Job only pulls in the SCM changes to test connection before kicking off all its Matrix runs. As a result, the HEAD that was pulled in as a test is pushed ontop of the integration branch, which is not at all what we want.

        A second problem is that the merge before verification is done separately by all Matrix runs. This results in N different merges and thus N number of partially tested commits, N being the amount of Matrix runs defined. This doesn't match wanted Pretested Integration behaviour, where we want a single commit to be fully tested.

        A possible solution that came to mind was writing SCM extensions for the Prestested Integration plugin, allowing the merge to happen in the Matrix Job as part of the SCM phase. This seemingly solves the first problem, since a merge happens in the Matrix Job. However, this will still result in a poorly tested commit being pushed, since the second problem persists.

        The possible solution here is to do the merge before the Matrix Job and having the Matrix Runs pull in and verify that single commit before running the publisher (in this case it would make sense putting the publisher on the Matrix Job).

        After another discussion we thought about having the SCM extension push the merge changes back to the ready branch. This might offer a solution.

        Show
        lars_kruse Lars Kruse added a comment - As it turned out in the investigation, "proper" Matrix Project compatibility isn't a quick fix. JENKINS-31128 Investigate Matrix Job Compatibility Below is the result of investigating if SCM extensions could be used to solve our problem. TL;DR Writing SCM extensions for Pretested Integration will not solve our Matrix Project related problems. But... The problems Pretested Integration for Matrix jobs suffers are as follows: Adding the publisher to the Matrix Job causes the workspace changes in the Matrix Job's workspace to be pushed. However, no merge or verification is ever done there. The Matrix Job only pulls in the SCM changes to test connection before kicking off all its Matrix runs. As a result, the HEAD that was pulled in as a test is pushed ontop of the integration branch, which is not at all what we want. A second problem is that the merge before verification is done separately by all Matrix runs. This results in N different merges and thus N number of partially tested commits, N being the amount of Matrix runs defined. This doesn't match wanted Pretested Integration behaviour, where we want a single commit to be fully tested. A possible solution that came to mind was writing SCM extensions for the Prestested Integration plugin, allowing the merge to happen in the Matrix Job as part of the SCM phase. This seemingly solves the first problem, since a merge happens in the Matrix Job. However, this will still result in a poorly tested commit being pushed, since the second problem persists. The possible solution here is to do the merge before the Matrix Job and having the Matrix Runs pull in and verify that single commit before running the publisher (in this case it would make sense putting the publisher on the Matrix Job). After another discussion we thought about having the SCM extension push the merge changes back to the ready branch. This might offer a solution.

          People

          • Assignee:
            thi Thierry Lacour
            Reporter:
            madsnielsen Mads Nielsen
          • Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: