Skip to content

periobolos keep going if user not found - error code 422 #17671

Open
@jlewi

Description

@jlewi

A follow on to #14321. As mentioned in that periobolos seems to error out updating the org if a GitHub id doesn't exist. I would like it to keep going.

In that issue it was mentioned this was fixed in newer images. I just tried the latest image
gcr.io/k8s-prow/peribolos@sha256:cb771295078f0a7353f375d39242ecafadcfc46650efb8a5f0adfa10b3f8c050

and it looks like I'm still hitting the issue. Here's the error

{"component":"peribolos","error":"status code 422 not one of [200], body: {\"message\":\"The request could not be processed.\",\"documentation_url\":\"https://developer.github.com/v3/orgs/members/#add-or-update-organization-membership\"}","file":"prow/cmd/peribolos/main.go:484","func":"main.configureOrgMembers.func1","level":"warning","msg":"UpdateOrgMembership(kubeflow, ajayalfred, false) failed","time":"2020-05-21T04:13:58Z"}

Full logs are attached.
logs.txt

It looks like peribolos tries to recover from a not found error

if github.IsNotFound(err) {
// this could be caused by someone removing their account
// or a typo in the configuration but should not crash the sync
err = nil
}

It looks like github.IsNotFound is checking for 404s.

if strings.Contains(errorMsg, "status code 404") {

But it looks like the error code in this case is 422

/cc @clarketm

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/prowIssues or PRs related to prowarea/prow/peribolosIssues or PRs related to prow's peribolos componenthelp wantedDenotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.kind/bugCategorizes issue or PR as related to a bug.needs-sigIndicates an issue or PR lacks a `sig/foo` label and requires one.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions