Fix CircleCI build not running on personal GitHub repositories.
Review Request #11190 — Created Sept. 19, 2020 and submitted
Fix CircleCI build not running on personal GitHub repositories.
CircleCI pipelines were not running for personal GitHub repositories when
a review request is made because the GitHub username was being extracted
from the wrong place.RBIntegrations was pulling the wrong key from
extra_data
and it's been
updated to grab the associatedHostingService
'susername
.This patch depends on /r/11198 and /r/11204 for the unit tests to pass.
Manual testing: A personal public and private repository was set up and
integrated with CircleCI. They are confirmed to be running without using
Review Board. Then, a review request was made for both the repositories.
Using the CircleCI web UI, the pipelines were triggered.Unit tests were created to verify that the
username
is being pulled
from the correct place for the 4 different GitHub repository plans.
These were ran on Review Board 3.0 and Review Board 4.0 and their
supported versions of Python.
Summary | ID |
---|---|
00999ad311dbeb178fa70a100da3d5cd265cc44d | |
e788898d1f3a7f977a9b57d3504a63f6faa705df | |
7a08a8b7e2a3e2622112a3d95484174e5f0cdc04 | |
0ebb174f668ab7352f4c27454a78f1720c76537a |
Description | From | Last Updated |
---|---|---|
The change summary should make it more clear which CI we're talking about. There's 3 in rbintegrations. It'd be best … |
chipx86 | |
We generally avoid shortening words, because not everybody's coming in with the same level of knowledge. "repositories" would be better … |
chipx86 | |
Change descriptions should wrap at around 75 characters. This goes for the description and testing. |
chipx86 | |
The description is helpful, but it doesn't really say what the problem really was and how it was fixed. This … |
chipx86 | |
Your testing mentions "manual testing," but doesn't mention anything about unit tests. Since you caught a bug manually that hadn't … |
chipx86 | |
Doing a quick grep through the codebase, I can see that the Travis CI support has the same problem. Maybe … |
chipx86 | |
W293 blank line contains whitespace |
reviewbot | |
W292 no newline at end of file |
reviewbot | |
The type name here should be unicode, rather than string. |
david | |
Type here should be unicode rather than str. |
david | |
json isn't a type in Python. This is returning dict. |
david |
-
-
The change summary should make it more clear which CI we're talking about. There's 3 in rbintegrations. It'd be best to specifically say "CircleCI".
-
We generally avoid shortening words, because not everybody's coming in with the same level of knowledge. "repositories" would be better than "repos" in the summary/description.
-
-
The description is helpful, but it doesn't really say what the problem really was and how it was fixed. This is good information to have so I don't have to dig into code.
You don't need to go into every little detail, but saying that it was pulling out the wrong key from
extra_data
and it's been updated to grab the associatedHostingServiceAccount
'susername
would be good. -
Your testing mentions "manual testing," but doesn't mention anything about unit tests. Since you caught a bug manually that hadn't been noticed in tests, it's the right time to add some tests to make sure that all of those types of hosting setups do what they're expected to do. One test per setup.
This is going to be longer than the fix, but since unit tests will be a big part of what you end up doing with any new code you write, now's a great time to learn the tricks and procedures for writing them :)
-
Doing a quick grep through the codebase, I can see that the Travis CI support has the same problem. Maybe this change should focus on fixing both?
- Summary:
-
Fix CI build not running on personal GitHub repos.Fix CircleCI build not running on personal GitHub repositories.
- Description:
-
~ Fix CI build not running on personal GitHub repos.
~ Fix CircleCI build not running on personal GitHub repositories.
~ CircleCI pipelines were not running for personal GitHub repositories when a review request is made because the GitHub username was being extracted from the wrong place.
~ CircleCI pipelines were not running for personal GitHub repositories when
+ a review request is made because the GitHub username was being extracted + from the wrong place. + + RBIntegrations was pulling the wrong key from
extra_data
and it's been+ updated to grab the associated HostingService
'susername
. - Testing Done:
-
~ Manual testing. A personal public and private repository was set up and integrated with CircleCI. They are confirmed to be running without using Review Board. Then, a review request was made for both the repositories. Using the CircleCI web UI, the pipelines were triggered.
~ Manual testing. A personal public and private repository was set up and
+ integrated with CircleCI. They are confirmed to be running without using + Review Board. Then, a review request was made for both the repositories. + Using the CircleCI web UI, the pipelines were triggered.
- Testing Done:
-
~ Manual testing. A personal public and private repository was set up and
~ Manual testing: A personal public and private repository was set up and
integrated with CircleCI. They are confirmed to be running without using Review Board. Then, a review request was made for both the repositories. Using the CircleCI web UI, the pipelines were triggered. + + Unit tests were created to verify that the
username
is being pulled+ from the correct place for the 4 different GitHub repository plans.
- Commits:
-
Summary ID b04261844035ea88c6c773da76209ea7adafa9fa b04261844035ea88c6c773da76209ea7adafa9fa 1e1495d29454fa904253bc128d3a0ff58a44ed32
Checks run (2 succeeded)
- Commits:
-
Summary ID b04261844035ea88c6c773da76209ea7adafa9fa 1e1495d29454fa904253bc128d3a0ff58a44ed32 2db84fc46bff4ab8515381d6fb95b49e10221cd5 6556251c5c9647f91348ec6b7ea4860e22493d9e
Checks run (2 succeeded)
- Description:
-
Fix CircleCI build not running on personal GitHub repositories.
CircleCI pipelines were not running for personal GitHub repositories when
a review request is made because the GitHub username was being extracted from the wrong place. RBIntegrations was pulling the wrong key from
extra_data
and it's beenupdated to grab the associated HostingService
'susername
.+ + This patch depends on /r/11198 for the unit tests to pass.
- Change Summary:
-
Update testing description with RB3 and RB4
- Description:
-
Fix CircleCI build not running on personal GitHub repositories.
CircleCI pipelines were not running for personal GitHub repositories when
a review request is made because the GitHub username was being extracted from the wrong place. RBIntegrations was pulling the wrong key from
extra_data
and it's beenupdated to grab the associated HostingService
'susername
.~ This patch depends on /r/11198 for the unit tests to pass.
~ This patch depends on /r/11198 and /r/11204 for the unit tests to pass.
- Testing Done:
-
Manual testing: A personal public and private repository was set up and
integrated with CircleCI. They are confirmed to be running without using Review Board. Then, a review request was made for both the repositories. Using the CircleCI web UI, the pipelines were triggered. Unit tests were created to verify that the
username
is being pulled~ from the correct place for the 4 different GitHub repository plans. ~ from the correct place for the 4 different GitHub repository plans. + These were ran on Review Board 3.0 and Review Board 4.0 and their + supported versions of Python.
- Change Summary:
-
Add missing documentation
- Commits:
-
Summary ID 2db84fc46bff4ab8515381d6fb95b49e10221cd5 6556251c5c9647f91348ec6b7ea4860e22493d9e 2db84fc46bff4ab8515381d6fb95b49e10221cd5 ce02f30ca1d14bba62a866a287b44b9cd322660d
Checks run (2 succeeded)
- Change Summary:
-
Refactor code to reduce duplication
- Commits:
-
Summary ID 2db84fc46bff4ab8515381d6fb95b49e10221cd5 ce02f30ca1d14bba62a866a287b44b9cd322660d 2db84fc46bff4ab8515381d6fb95b49e10221cd5 ce02f30ca1d14bba62a866a287b44b9cd322660d d33504c8bbe0da9e5d7a2d45f3306919dc83761b
- Change Summary:
-
Resolve flake8 issue
- Commits:
-
Summary ID 2db84fc46bff4ab8515381d6fb95b49e10221cd5 ce02f30ca1d14bba62a866a287b44b9cd322660d d33504c8bbe0da9e5d7a2d45f3306919dc83761b 2db84fc46bff4ab8515381d6fb95b49e10221cd5 ce02f30ca1d14bba62a866a287b44b9cd322660d 40741f106259d7dad5e3e36d4dbb2797c3f851ea
Checks run (2 succeeded)
- Commits:
-
Summary ID 2db84fc46bff4ab8515381d6fb95b49e10221cd5 ce02f30ca1d14bba62a866a287b44b9cd322660d 40741f106259d7dad5e3e36d4dbb2797c3f851ea 00999ad311dbeb178fa70a100da3d5cd265cc44d e788898d1f3a7f977a9b57d3504a63f6faa705df 7a08a8b7e2a3e2622112a3d95484174e5f0cdc04 0ebb174f668ab7352f4c27454a78f1720c76537a