Need assistance with Github integrating with Rally product - Not seeing the author name and repository
search cancel

Need assistance with Github integrating with Rally product - Not seeing the author name and repository

book

Article ID: 95914

calendar_today

Updated On:

Products

Rally On-Premise Rally SaaS

Issue/Introduction

I need assistance with GitHub integrating with Rally. 
I am not seeing the author's name or repository. 

Resolution

Initial Troubleshooting:  
Which Github integration are you using? Are you using the GitHub service or the GitHub Policy Based VCS connector

Next Steps:
1.  We are using the first one. 
Author and Builds info are blank. 

AUTHOR 
The Author names will only populate if the committer's ID is exactly the same as the Username in Rally. Also, if the committer does not have a userid in Rally, then the Author name will not populate. In our latest connector this information can be mapped and will be populated as long as the committer has an Rally userid. 

REPOSITORY 
The repository is not automatically populated with this service. I would recommend naming the "Repository" field in the setup page for the service the same name as the repository. This will display in the changeset under the "Name" column. Also, if this field is left blank, it will automatically populate with the name of the GitHub Repository. 

2.  Regarding populating author name without the mapping file, we tried using this as advised in the CA Rally help pages. But we are getting the following error. Can you help. 

Github.yaml: 

Transform: 
Author : EmailAddressAsRallyUser 

When we are adding the above lines, we are getting the following error. 

[2018-05-02 17:40:52 Z] ERROR: VCSConnectorRunner.getConfiguration(283) - problem occurred in vcs_connector_runner.py getConfiguration() 
[2018-05-02 17:40:52 Z] ERROR: VCSConnectorRunner.getConfiguration - <NonFatalConfigurationError> Excess content in config file: config/github.yml 
[2018-05-02 17:40:52 Z] INFO: VCSConnectorRunner.run - run completed for github.yml 

4.  Even after adding user_map. Txt – I am getting the following error. Am I missing something? 

[2018-05-02 17:59:41 Z] ERROR: VCSConnectorRunner.getConfiguration(283) - problem occurred in vcs_connector_runner.py getConfiguration() 
[2018-05-02 17:59:41 Z] ERROR: VCSConnectorRunner.getConfiguration - <NonFatalConfigurationError> Excess content in config file: config/github.yml 
[2018-05-02 17:59:41 Z] INFO: VCSConnectorRunner.run - run completed for github.yml 

User_map.txt 

TEST3407 : [email protected]

Github.yml 

Transform: 
Author : FileBasedUserNameLookup(user_map.txt, ":") 

5.  It looks like the config file may have some tabs or issues. 

Please send the config file you are using (with passwords removed) and the corresponding logfile in debug mode and we will continue to troubleshoot. 

6.  This is the log file generated when the Transforms section is added. 

[2018-05-02 21:54:59 Z] ERROR: VCSConnectorRunner.getConfiguration(283) - problem occurred in vcs_connector_runner.py getConfiguration() 
[2018-05-02 21:54:59 Z] ERROR: VCSConnectorRunner.getConfiguration - <NonFatalConfigurationError> Excess content in config file: config/github.yml 
[2018-05-02 21:54:59 Z] INFO: VCSConnectorRunner.run - run completed for github.yml 

7.  I have created a config file for you to try (test1.yml). This is a known good file, so hopefully you will be successful running this file. Please add your username/password to both sections. 

You can also try just moving the "transforms" section in your current config file to the Rally Section as I have done in the config file I attached. But that error you are seeing can also be a tab issue. So I attached a file you can use if moving the transforms section doesn't work. 

8.  I am getting the following error now. I moved the Transforms and Author entries to the AgileCentral section as advised. 

[2018-05-03 15:04:04 Z] FATAL: VCSConnectorRunner.run - AgileCentralConnection.internalizeConfig agicen_connection.py(95) - AgileCentral section of the config contained these invalid entries: Author 

AgileCentral: 
Server : rally1.rallydev.com 
Username : test1
Password : test2
# APIKey : _secret # if you use a valid APIKey, you don't need Username/Password 
Workspace : test Workspace 
Project : test IT 
Transforms : 
Author : FileBasedUserNameLookup(user_map.txt, ":") 

9.  Now I am getting the following error. Where do I curtail the commit date so that its only for today? 

[2018-05-03 19:25:25 Z] ERROR: VCSConnectorRunner.run - Unable to retrieve GitHub commit info. Error in getRecentRepositoryActivity; GitHub GraphQL response potentially caused by reference_time too far in the past. Please try again later or consider changing the time file value to a value more recent than 2018-05-01 21:39:44 Z 

10.  Thanks for your help. Now I am getting the following error. Where do I curtail the commit date so that its only for today? 

[2018-05-03 19:25:25 Z] ERROR: VCSConnectorRunner.run - Unable to retrieve GitHub commit info. Error in getRecentRepositoryActivity; GitHub GraphQL response potentially caused by reference_time too far in the past. Please try again later or consider changing the time file value to a value more recent than 2018-05-01 21:39:44 Z 

11.  We are seeing the 'Author' info and we will check whether its reflected consistently and this user Sai is not in the user_map.txt. Can you help us on populating the 'Build' info. We are using Circleci for our CI. 

12.  Thank you for the update and I am glad the connector is running now! 

As for your question about build information, unfortunately we do not have an integration currently with Circleci. The only Build system we have an integration with at this time is Jenkins. 

If it is imperative to your project to create this integration, online help documentation is available through our wiki at https://help.rallydev.com/for-developers with information and examples to help get you started. Please note that custom built integrations are out of the scope for support. 

Here is a link to our API: 
https://rally1.rallydev.com/slm/doc/webservice/  

Furthermore, documentation for the Rally SDK 2.0 may be found at https://techdocs.broadcom.com/us/en/ca-enterprise-software/valueops/rally/rally-help/extending-rally-with-apps/building-apps-for-rally.html
A great resource for asking questions and receiving advice from the developer community is: http://stackoverflow.com/questions/tagged/rally 

If you do not have the necessary technical resources to write your own integration, we have recently begun offering coding services for hire. For a fee, the Rally Services can build a customized integration based on your needs. If you are interested in this offering, please let me know, and I can put you in touch with an account representative. 

I am sorry I couldn't be of more assistance to you, but I hope you find this information helpful. Please let me know if you have any further questions or if you would like me to contact an Rally account representative to get a quote for you on Technical Services work. 

13. 
Thanks for your help. But I need further help in integrating CircleCI with Rally. As you can see below, I need to know which API's to call and any steps to do in Rally UI to update the Build info in Changeset. We are very close. 

14.  Custom apps are outside the scope of Rally Support, however below is an article on how to query and create changesets. You can use similar logic to create the Build that is associated with a changeset. 
Agile Central - WSAPI: How to create and query Changesets

Please review the information above and if you have further questions, I can put you in touch with our Technical Services team for assistance for a fee. 

I am sorry I can not help you more with creating the build information, but unfortunately it is not my area of expertise. 

Please let me know if you have anything further I can be of assistance with. 

15.  For the below mentioned US25250 – I did this query first – 

https://rally1.rallydev.com/slm/webservice/v2.0/changeset?workspace=https://rally1.rallydev.com/slm/webservice/v2.0/workspace/<WorkspaceOID>&query=(Message Contains "US25250")&pagesize=200 

and resulting in this response which has the 4 changesets matching the screen. 

Question: I need an example of WebApi to update the Builds info so that it reflects on the Rally changeset screen by way of creating or updating a changeset. 

 
// https://rally1.rallydev.com/slm/webservice/v2.0/changeset?workspace=https://rally1.rallydev.com/slm/webservice/v2.0/workspace/<WorkspaceOID>&query=(Message%20Contains%20%22US25250%22)&pagesize=200 


"QueryResult": { 
"_rallyAPIMajor": "2", 
"_rallyAPIMinor": "0", 
"Errors": [ 

], 
"Warnings": [ 

], 
"TotalResultCount": 4, 
"StartIndex": 1, 
"PageSize": 200, 
"Results": [ 

"_rallyAPIMajor": "2", 
"_rallyAPIMinor": "0", 
"_ref": "https://rally1.rallydev.com/slm/webservice/v2.0/changeset/<ChangesetOID>", 
"_refObjectUUID": "<ChangesetUUID>", 
"_refObjectName": "some name", 
"_type": "Changeset" 
}, 

"_rallyAPIMajor": "2", 
"_rallyAPIMinor": "0", 
"_ref": "https://rally1.rallydev.com/slm/webservice/v2.0/changeset/<ChangesetOID>", 
"_refObjectUUID": "<ChangesetUUID>", 
"_refObjectName": "some name", 
"_type": "Changeset" 
}, 

"_rallyAPIMajor": "2", 
"_rallyAPIMinor": "0", 
"_ref": "https://rally1.rallydev.com/slm/webservice/v2.0/changeset/<ChangesetOID>", 
"_refObjectUUID": "<ChangesetUUID>", 
"_refObjectName": "some name", 
"_type": "Changeset" 
}, 

"_rallyAPIMajor": "2", 
"_rallyAPIMinor": "0", 
"_ref": "https://rally1.rallydev.com/slm/webservice/v2.0/changeset/<ChangesetOID>", 
"_refObjectUUID": "<ChangesetUUID>", 
"_refObjectName": "some name", 
"_type": "Changeset" 





16.  I do not have an answer for you on this as it it out side of the scope of our support, but I can put you in touch with our Technical Services team and for a fee they can assist you with your question. Please let me know if you would like me to put you in touch with an account team representative so we can get a quote started for you. 

My apologies that I cannot be of further assistance for you on this. 

17.  That's fine. Thanks for your help. We'll let you know if we need something.