Uploaded image for project: 'Nuxeo ECM Build/Test Environment'
  1. Nuxeo ECM Build/Test Environment
  2. NXBT-2325

Fix CH test_store_pull_request

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: HOOKS-1.1.1
    • Component/s: Captain Hook

      Description

      ERROR: test_store_pull_request (nxtools.hooks.tests.webhooks.github_handlers.test_pullrequest_store.GithubStorePullRequestHandlerTest)
      Traceback (most recent call last):
        File "/opt/jenkins/workspace/tools-hooks-branches_master-I42XCCHS43V7F5ET543GIXXZIRQA5ROGL635RNILTDS6DOYTANKA/nuxeo-tools-hooks/nxtools/hooks/tests/webhooks/github_handlers/test_pullrequest_store.py", line 59, in test_store_pull_request
          self.handler._do_handle(body)
        File "/opt/jenkins/workspace/tools-hooks-branches_master-I42XCCHS43V7F5ET543GIXXZIRQA5ROGL635RNILTDS6DOYTANKA/nuxeo-tools-hooks/nxtools/hooks/endpoints/webhook/github_handlers/pull_request.py", line 44, in _do_handle
          stored_pull_request = self.store_pull_request(event)
        File "/opt/jenkins/workspace/tools-hooks-branches_master-I42XCCHS43V7F5ET543GIXXZIRQA5ROGL635RNILTDS6DOYTANKA/nuxeo-tools-hooks/nxtools/hooks/endpoints/webhook/github_handlers/pull_request.py", line 96, in store_pull_request
          return services.get(GithubService).create_pullrequest(event.organization, event.repository, event.pull_request)
        File "/opt/jenkins/workspace/tools-hooks-branches_master-I42XCCHS43V7F5ET543GIXXZIRQA5ROGL635RNILTDS6DOYTANKA/nuxeo-tools-hooks/nxtools/hooks/services/github_service.py", line 113, in create_pullrequest
          self.update_pullrequest_with_jira(stored_pr)
        File "/opt/jenkins/workspace/tools-hooks-branches_master-I42XCCHS43V7F5ET543GIXXZIRQA5ROGL635RNILTDS6DOYTANKA/nuxeo-tools-hooks/nxtools/hooks/services/github_service.py", line 123, in update_pullrequest_with_jira
          if jira_key is not None else None
        File "/opt/jenkins/workspace/tools-hooks-branches_master-I42XCCHS43V7F5ET543GIXXZIRQA5ROGL635RNILTDS6DOYTANKA/nuxeo-tools-hooks/nxtools/hooks/services/jira_service.py", line 73, in get_issue
          return self.__jira_client.issue(id, fields)
      AttributeError: 'JiraService' object has no attribute '_JiraService__jira_client'
      -------------------- >> begin captured logging << --------------------
      nxtools.hooks.services.config: DEBUG: Get [general] CONF, default=/opt/jenkins/workspace/tools-hooks-branches_master-I42XCCHS43V7F5ET543GIXXZIRQA5ROGL635RNILTDS6DOYTANKA/nuxeo-tools-hooks/conf/nuxeo-tools-hooks.ini, env_key=NXTOOLS_HOOKS_CONF, request_value=None, os_value=nxtools/hooks/tests/resources/config.ini, config_value=/opt/jenkins/workspace/tools-hooks-branches_master-I42XCCHS43V7F5ET543GIXXZIRQA5ROGL635RNILTDS6DOYTANKA/nuxeo-tools-hooks/conf/nuxeo-tools-hooks.ini, value=nxtools/hooks/tests/resources/config.ini
      nxtools.hooks.services.config: INFO: Loading config file: nxtools/hooks/tests/resources/config.ini
      nxtools.hooks.services.config: DEBUG: Get [general] CONF, default=/opt/jenkins/workspace/tools-hooks-branches_master-I42XCCHS43V7F5ET543GIXXZIRQA5ROGL635RNILTDS6DOYTANKA/nuxeo-tools-hooks/conf/nuxeo-tools-hooks.ini, env_key=NXTOOLS_HOOKS_CONF, request_value=None, os_value=nxtools/hooks/tests/resources/config.ini, config_value=/opt/jenkins/workspace/tools-hooks-branches_master-I42XCCHS43V7F5ET543GIXXZIRQA5ROGL635RNILTDS6DOYTANKA/nuxeo-tools-hooks/conf/nuxeo-tools-hooks.ini, value=nxtools/hooks/tests/resources/config.ini
      nxtools.hooks.services.config: INFO: Loading config file: nxtools/hooks/tests/resources/config.ini
      nxtools.hooks.services.config: DEBUG: Get [general] CONF, default=/opt/jenkins/workspace/tools-hooks-branches_master-I42XCCHS43V7F5ET543GIXXZIRQA5ROGL635RNILTDS6DOYTANKA/nuxeo-tools-hooks/conf/nuxeo-tools-hooks.ini, env_key=NXTOOLS_HOOKS_CONF, request_value=None, os_value=nxtools/hooks/tests/resources/github_handlers/config.ini, config_value=/opt/jenkins/workspace/tools-hooks-branches_master-I42XCCHS43V7F5ET543GIXXZIRQA5ROGL635RNILTDS6DOYTANKA/nuxeo-tools-hooks/conf/nuxeo-tools-hooks.ini, value=nxtools/hooks/tests/resources/github_handlers/config.ini
      nxtools.hooks.services.config: INFO: Loading config file: nxtools/hooks/tests/resources/github_handlers/config.ini
      nxtools.hooks.services.config: DEBUG: Get [DatabaseService] connection_url, default=None, env_key=NXTOOLS_HOOKS_DATABASE_CONNECTION_URL, request_value=None, os_value=None, config_value=mongomock://localhost, value=mongomock://localhost
      nxtools.hooks.endpoints.webhook.github_handlers.pull_request: INFO: GithubStorePullRequestHandler.handle
      nxtools.hooks.entities.db_entities: INFO: Pull request nuxeo/nuxeo/pull/210 saved
      nxtools.hooks.services.config: DEBUG: Get [JiraService] auth_type, default=None, env_key=NXTOOLS_HOOKS_JIRA_AUTH_TYPE, request_value=None, os_value=None, config_value=None, value=None
      --------------------- >> end captured logging << ---------------------
      

      Note that the job is missing a test parser (if exists)

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 1 hour, 15 minutes
                  1h 15m