Revert "enterprise: Special case handling of internal repo in FetchRepoPerms"
Created by: bobheadxi
Reverts sourcegraph/sourcegraph#29325
❯ sg ci logs | grep FAIL
{"node":{"__typename":"BatchSpec","id":"QmF0Y2hTcGVjOiI2djFKTndLd0tydCI=","originalInput":"\nname: my-unique-name\ndescription: My description\n'on':\n- repositoriesMatchingQuery: lang:go func main\n- repository: github.com/sourcegraph/src-cli\nsteps:\n- run: echo 'foobar'\n container: alpine\n env:\n PATH: \"/work/foobar:$PATH\"\nchangesetTemplate:\n title: Hello World\n body: My first batch change!\n branch: hello-world\n commit:\n message: Append Hello World to all README.md files\n published: false\n","parsedInput":{"name":"my-unique-name","description":"My description","on":[{"repositoriesMatchingQuery":"lang:go func main"},{"repository":"github.com/sourcegraph/src-cli"}],"steps":[{"run":"echo 'foobar'","container":"alpine","env":{"PATH":"/work/foobar:$PATH"}}],"changesetTemplate":{"title":"Hello World","body":"My first batch change!","branch":"hello-world","commit":{"message":"Append Hello World to all README.md files"},"published":false}},"creator":{"id":"VXNlcjox","databaseID":1,"siteAdmin":false},"namespace":{"id":"VXNlcjox","databaseID":1,"siteAdmin":false},"applyURL":"/users/testuser-11/batch-changes/apply/QmF0Y2hTcGVjOiI2djFKTndLd0tydCI=","viewerCanAdminister":true,"createdAt":"2022-01-27T13:25:33Z","expiresAt":"2022-02-03T13:25:33Z","diffStat":{"added":0,"deleted":0,"changed":0},"appliesToBatchChange":null,"supersedingBatchSpec":null,"allCodeHosts":{"totalCount":0,"nodes":[]},"onlyWithoutCredential":{"totalCount":0,"nodes":[]},"changesetSpecs":{"totalCount":0,"nodes":[]},"state":"FAILED","workspaceResolution":{"state":"COMPLETED"},"startedAt":"2022-01-27T11:46:33Z","finishedAt":"2022-01-27T13:16:33Z","failureMessage":"Failures:\n\n* failure message\n","viewerCanRetry":true}}
{"node":{"__typename":"BatchSpec","id":"QmF0Y2hTcGVjOiI2djFKTndLd0tydCI=","originalInput":"\nname: my-unique-name\ndescription: My description\n'on':\n- repositoriesMatchingQuery: lang:go func main\n- repository: github.com/sourcegraph/src-cli\nsteps:\n- run: echo 'foobar'\n container: alpine\n env:\n PATH: \"/work/foobar:$PATH\"\nchangesetTemplate:\n title: Hello World\n body: My first batch change!\n branch: hello-world\n commit:\n message: Append Hello World to all README.md files\n published: false\n","parsedInput":{"name":"my-unique-name","description":"My description","on":[{"repositoriesMatchingQuery":"lang:go func main"},{"repository":"github.com/sourcegraph/src-cli"}],"steps":[{"run":"echo 'foobar'","container":"alpine","env":{"PATH":"/work/foobar:$PATH"}}],"changesetTemplate":{"title":"Hello World","body":"My first batch change!","branch":"hello-world","commit":{"message":"Append Hello World to all README.md files"},"published":false}},"creator":{"id":"VXNlcjox","databaseID":1,"siteAdmin":false},"namespace":{"id":"VXNlcjox","databaseID":1,"siteAdmin":false},"applyURL":null,"viewerCanAdminister":true,"createdAt":"2022-01-27T13:25:33Z","expiresAt":"2022-02-03T13:25:33Z","diffStat":{"added":20,"deleted":4,"changed":10},"appliesToBatchChange":null,"supersedingBatchSpec":null,"allCodeHosts":{"totalCount":1,"nodes":[{"externalServiceKind":"GITHUB","externalServiceURL":"https://github.com/"}]},"onlyWithoutCredential":{"totalCount":1,"nodes":[{"externalServiceKind":"GITHUB","externalServiceURL":"https://github.com/"}]},"changesetSpecs":{"totalCount":2,"nodes":[{"__typename":"VisibleChangesetSpec","type":"BRANCH","id":"Q2hhbmdlc2V0U3BlYzoiQW1lQkE5SVNrc08i","description":{"baseRepository":{"id":"UmVwb3NpdG9yeTox","name":"repo-1-1"}}},{"__typename":"VisibleChangesetSpec","type":"BRANCH","id":"Q2hhbmdlc2V0U3BlYzoiRlJGNG9FR3FQaCI=","description":{"baseRepository":{"id":"UmVwb3NpdG9yeTox","name":"repo-1-1"}}}]},"state":"FAILED","workspaceResolution":{"state":"COMPLETED"},"startedAt":"2022-01-27T11:46:33Z","finishedAt":"2022-01-27T13:16:33Z","failureMessage":"Validating changeset specs resulted in an error:\n* 2 changeset specs in repo-1-1 use the same branch: refs/heads/conflicting-head-ref\n","viewerCanRetry":true}}
--- FAIL: TestProvider_FetchRepoPerms (0.01s)
--- FAIL: TestProvider_FetchRepoPerms/cache_enabled (0.01s)
--- FAIL: TestProvider_FetchRepoPerms/cache_enabled/internal_repo_in_org (0.00s)
--- FAIL: TestProvider_FetchRepoPerms/cache_enabled/internal_repo_in_org/feature_flag_disabled (0.00s)
FAIL github.com/sourcegraph/sourcegraph/enterprise/internal/authz/github 0.062s
FAIL
This happened in https://buildkite.com/sourcegraph/sourcegraph/builds/127466#047937cb-7e14-4272-83cd-3f381d2d8e3e but excess log lines obfuscated the issue it seems