dwalker-sabiogroup opened a new issue, #4827:
URL: https://github.com/apache/incubator-devlake/issues/4827

   ### Search before asking
   
   - [X] I had searched in the 
[issues](https://github.com/apache/incubator-devlake/issues?q=is%3Aissue) and 
found no similar issues.
   
   
   ### What happened
   
   Multiple Jira Task fail with error
   
   ```
   time="2023-03-30 12:46:45" level=error msg=" [pipeline service] [pipeline 
#1] run tasks failed
        caused by: Error running task 70.
        Wraps: (2) subtask convertIssueChangelogs ended unexpectedly
        Wraps: (3) error calling Converter plugin implementation
        Wraps: (4) strconv.ParseUint: parsing "[90]": invalid syntax
        Wraps: (5) strconv.ParseUint: parsing "[90]"
        Wraps: (6) invalid syntax
        Error types: (1) *hintdetail.withDetail (2) *hintdetail.withDetail (3) 
*hintdetail.withDetail (4) *hintdetail.withDetail (5) *strconv.NumError (6) 
*errors.errorString
   ```
   
   ### What do you expect to happen
   
   Jira Tasks to process IDs in changelogs correctly and tasks to succeed
   
   ### How to reproduce
   
   From a fresh install of devlake
   
   - Added a Jira connection to Jira Cloud and confirmed status `online` 
   - Added a GitHub connection to Github and confirmed status `online`
   - Added Project and added Data Connections
     - Github with Source Code Management, Issue, Tracking, Code Review, Cross, 
Domain and CI/CD Data Entities with no transformations
     - Jira with Issue Tracking and Cross Domain with no transformations
   - Run Pipeline and multiple Jira tasks fail with the following error
   
   
   ### Anything else
   
   # Environment
   
   - DevLake version: devlake-0.16.0-beta11 (also happens with 
devlake-0.16.0-beta10)
   - deployed in GKE cluster using 
[helm](https://github.com/apache/incubator-devlake-helm-chart) 
devlake-0.16.0-beta11
   - external MySQL v8 database hosted in GCP
   - external Grafana 
   
   ## Helm values
   
   ```yaml
   grafana:
     useExternal: true
   mysql:
     useExternal: true
     externalServer: ${mysql_host}
     externalPort: 3306
     username: ${mysql_username}
     password: ${mysql_password}
     database: ${mysql_database}
     rootPassword: ${mysql_cloudsql_instance_root_password}
   ```
   
   Issue occurs on every job run
   
   # Possible Solution
   
   Looks like 
[convertIds](https://github.com/apache/incubator-devlake/blob/243cc8a80aa5b37828e2a142ac9f7e3269b7e1dc/backend/plugins/jira/tasks/issue_changelog_convertor.go#L164)
 is failing to parse the ID as it contains `[`, `]` characters.
   
   If this is correct adding additional validation such as below should resolve 
the problem (just an example of a possible implementation)
   
   ```
   re := regexp.MustCompile("[0-9]+")
   fmt.Println(re.FindAllString("[90]", -1))
   ```
   
   will only return numeric values from the `item` variable
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   ### Version
   
   main
   
   ### Are you willing to submit PR?
   
   - [X] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [X] I agree to follow this project's [Code of 
Conduct](https://www.apache.org/foundation/policies/conduct)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to