mattermost-plugin-github icon indicating copy to clipboard operation
mattermost-plugin-github copied to clipboard

GitHub Create and Attach does not show results when org lock is set to a user's workspace

Open DHaussermann opened this issue 3 years ago • 3 comments

When the Organization lock is set to a user's workspace such as DHaussermann, the create and attach modal will not show any results. If the org lock is set to an actual organization such as dkh-org the functionality seems to work as expected.

image

{"timestamp":"2022-03-07 13:50:37.916 Z","level":"info","msg":"Metrics endpoint is initiated","caller":"metrics/metrics.go:882","address":":8067"}
{"timestamp":"2022-03-07 13:50:37.918 Z","level":"info","msg":"Metrics and profiling server is stopping","caller":"app/server.go:1572"}
{"timestamp":"2022-03-07 13:50:37.918 Z","level":"info","msg":"Metrics endpoint is initiated","caller":"metrics/metrics.go:882","address":":8067"}
{"timestamp":"2022-03-07 13:50:37.918 Z","level":"info","msg":"Metrics and profiling server is started","caller":"app/server.go:1660","address":"[::]:8067"}
{"timestamp":"2022-03-07 13:50:49.857 Z","level":"warn","msg":"Failed to list repositories by org","caller":"app/plugin_api.go:934","plugin_id":"github","userid":"79wpfnw78jdeijyz3ow31epj1c","github username":"DHaussermann","error":"GET https://api.github.com/orgs/DHaussermann/repos?per_page=50&sort=full_name: 404 Not Found []"}
{"timestamp":"2022-03-07 13:50:49.995 Z","level":"info","msg":"This node attempted to join the cluster, but could not find any nodes.","caller":"cluster/cluster.go:391"}
{"timestamp":"2022-03-07 13:50:55.249 Z","level":"warn","msg":"Build number is not in semver format","caller":"app/product_notices.go:100","build_number":""}
{"timestamp":"2022-03-07 13:50:59.230 Z","level":"warn","msg":"Failed to list repositories by org","caller":"app/plugin_api.go:934","plugin_id":"github","userid":"79wpfnw78jdeijyz3ow31epj1c","github username":"DHaussermann","error":"GET https://api.github.com/orgs/DHaussermann/repos?per_page=50&sort=full_name: 404 Not Found []"}
{"timestamp":"2022-03-07 13:51:04.993 Z","level":"warn","msg":"Feature NormalizeLdapDNs not found, returning control.","caller":"featureflag/split_logger.go:21","service":"split"}

-This differs from the subscription logic which does not seem to make a distinction between if the org lock is set to an actual organization or not.

  • This issue reproduces on the latest production build v2.0.1

Steps:

  • Enable the plugin and connect a test user
  • Set a GitHub user's workspace such as DHaussermann (This may require a webapp refresh. There is an issue documented for this)
  • Make a post and open the connect or attach modal Observed Repository list stays empty and dev console shows a 500 error

DHaussermann avatar Mar 07 '22 15:03 DHaussermann

@dipak-demansol FYI I have documented the issue you found.

DHaussermann avatar Mar 07 '22 15:03 DHaussermann

Assigned to Raju for re-assignment (if needed).

catalintomai avatar Mar 07 '22 20:03 catalintomai

@DHaussermann what is the expected behaviour , when we do lock it to workspace it is not a valid org so it throws error

sibasankarnayak avatar Mar 12 '22 05:03 sibasankarnayak

@hanzei @DHaussermann I am thinking that if somebody has put a username in the org lock field. The correct behavior should be that the user should be able to see the repo associated with that username or the requirement is something else. Please share you views

Kshitij-Katiyar avatar Mar 13 '23 08:03 Kshitij-Katiyar