Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

a8n: failed creating PRs because 'assignee' doesn't exist #8113

Closed
attfarhan opened this issue Jan 29, 2020 · 3 comments
Closed

a8n: failed creating PRs because 'assignee' doesn't exist #8113

attfarhan opened this issue Jan 29, 2020 · 3 comments
Assignees
Labels
batch-changes Issues related to Batch Changes bug An error, flaw or fault that produces an incorrect or unexpected result, or behavior. estimate/1d
Milestone

Comments

@attfarhan
Copy link
Contributor

  • Sourcegraph version:
  • Platform information:

image (7)

Steps to reproduce

  1. Log into GitHub with the sd9 account
  2. Follow the instructions at https://docs.sourcegraph.com/user/automation#creating-a-campaign-from-a-set-of-patches, using the following actions file:
{
  "scopeQuery": "repo:go-* -repohasfile:INSTALL.md -repo:stripe-go",
  "steps": [
    {
      "type": "command",
      "args": ["sh", "-c", "echo '# Installation' > INSTALL.md"]
    },
    {
      "type": "docker",
      "dockerfile": "FROM alpine:3 \n CMD find /work -iname '*.md' -type f | xargs -n 1 sed -i s/this/that/g"
    },
    {
      "type": "docker",
      "image": "golang:1.13-alpine",
      "args": ["go", "fix", "/work/..."]
    }
  ]
}

Expected behavior:

PRs would be created in relevant repos. I suspect this error may be due to the particular repos being modified being on our GHE instance.

Actual behavior:

The PRs don't get created and fail with 'field assignee does not exist' error in screenshot above.

@mrnugget mrnugget added automation bug An error, flaw or fault that produces an incorrect or unexpected result, or behavior. labels Jan 29, 2020
@mrnugget mrnugget added this to the 3.13 milestone Jan 29, 2020
@mrnugget
Copy link
Contributor

@tsenart @ryanslade Is it possible that GitHub's and GHE's GraphQL API's differ that much?

@mrnugget
Copy link
Contributor

mrnugget commented Feb 11, 2020

The problem is our version of GHE. We're currently on 2.17.2 from June 19, 2019. Current version is 2.19.6 (or 2.17.17 for 2.17.x).

The error we're seeing here is because the assignee field was only added one month after the release of 2.17.2: https://developer.github.com/v4/changelog/2019-07-19-schema-changes/

The previous user field was deprecated on 2020-01-01.

I think we have two options:

  1. Decide that we don't deprecate older/deprecated versions of the GraphQL
  2. Be backwards compatible by using introspection features of the GraphQL API to decide which fields to query.

I think we should go with (1) for now, because (2) sounds simple but can easily be just the tip of the iceberg: if there are signifcant changes between API versions we need to also accomodate for that in our Go structures etc. and can't just "alias" old/deprecated fields to their new names etc.

What do you think @christinaforney @sqs?

@mrnugget
Copy link
Contributor

I'm closing this because the customers that are using and testing Automation at the moment do not use outdated GHE versions and I personally think that building in backwards-compatible support for multiple code hosts is wasted effort at the moment.

@chrispine chrispine added the batch-changes Issues related to Batch Changes label Aug 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
batch-changes Issues related to Batch Changes bug An error, flaw or fault that produces an incorrect or unexpected result, or behavior. estimate/1d
Projects
None yet
Development

No branches or pull requests

4 participants