[Urgent] A change without patch-sets or revisions? How is that possible in Gerrit?

49 views
Skip to first unread message

lucamilanesio

unread,
Jun 17, 2016, 4:12:33 AM6/17/16
to Repo and Gerrit Discussion
Hi all,
I have noticed on gerrit-review.googlesource.com that some changes are not returning any patch-set or revision info :-O

See below:

$ curl 'https://gerrit-review.googlesource.com/changes/?q=I18b391f5c858b8608745435d465a63596b3eccac&n=25&O=3' -H 'accept: application/json' -H 'cache-control: no-cache'  --compressed | tail -1 | jq '.'

  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current

                                 Dload  Upload   Total   Spent    Left  Speed

100   355    0   355    0     0   1661      0 --:--:-- --:--:-- --:--:--  1666

[

  {

    "id": "gerrit~master~I18b391f5c858b8608745435d465a63596b3eccac",

    "project": "gerrit",

    "branch": "master",

    "hashtags": [],

    "change_id": "I18b391f5c858b8608745435d465a63596b3eccac",

    "subject": "Add RepoOnlyOps into BatchUpdate",

    "status": "NEW",

    "created": "2016-05-31 21:40:59.000000000",

    "updated": "2016-06-17 01:13:30.000000000",

    "submit_type": "MERGE_IF_NECESSARY",

    "mergeable": false,

    "submittable": false,

    "insertions": 155,

    "deletions": 1,

    "_number": 78186,

    "owner": {

      "_account_id": 1026258

    },

    "labels": {

      "Verified": {},

      "Code-Review": {}

    },

    "revisions": {}

  }

]


How is that possible? It never happened before :-O


Can this be a side-effect of the NoteDB roll-out?


P.S. This condition caused the Gerrit CI to blow-up as he did not what to build. Will push a change on the gerrit-ci-scripts to discard the change and display a warning in the meantime.


Luca.

Dave Borowitz

unread,
Jun 17, 2016, 10:23:58 AM6/17/16
to lucamilanesio, Repo and Gerrit Discussion
Sorry for not wanting to do math, what options is O=3?

This change has 4 patch sets. 1 & 4 are drafts, 2 & 3 are published. ?o=ALL_REVISIONS returns correct results; ?o=CURRENT_REVISION "correctly" returns nothing.

{
  "id": "gerrit~master~I18b391f5c858b8608745435d465a63596b3eccac",
  "project": "gerrit",
  "branch": "master",
  "hashtags": [],
  "change_id": "I18b391f5c858b8608745435d465a63596b3eccac",
  "subject": "Add RepoOnlyOps into BatchUpdate",
  "status": "NEW",
  "created": "2016-05-31 21:40:59.000000000",
  "updated": "2016-06-17 01:13:30.000000000",
  "submittable": false,
  "insertions": 155,
  "deletions": 1,
  "_number": 78186,
  "owner": {
    "_account_id": 1026258
  },
{
  "id": "gerrit~master~I18b391f5c858b8608745435d465a63596b3eccac",
  "project": "gerrit",
  "branch": "master",
  "hashtags": [],
  "change_id": "I18b391f5c858b8608745435d465a63596b3eccac",
  "subject": "Add RepoOnlyOps into BatchUpdate",
  "status": "NEW",
  "created": "2016-05-31 21:40:59.000000000",
  "updated": "2016-06-17 01:13:30.000000000",
  "submittable": false,
  "insertions": 155,
  "deletions": 1,
  "_number": 78186,
  "owner": {
    "_account_id": 1026258
  },
  "revisions": {
    "32d9c8b2093561413bac8a0309410a0bcc550a13": {
      "_number": 2,
      "created": "2016-05-31 21:47:33.000000000",
      "uploader": {
        "_account_id": 1026258
      },
      "ref": "refs/changes/86/78186/2",
      "fetch": {
        "http": {
          "ref": "refs/changes/86/78186/2"
        }
      }
    },
    "1768a9064ed3be7fc04bf2da6a28a82729f2dc4f": {
      "_number": 3,
      "created": "2016-05-31 22:02:29.000000000",
      "uploader": {
        "_account_id": 1026258
      },
      "ref": "refs/changes/86/78186/3",
      "fetch": {
        "http": {
          "ref": "refs/changes/86/78186/3"
        }
      }
    }
  }
}


--
--
To unsubscribe, email repo-discuss...@googlegroups.com
More info at http://groups.google.com/group/repo-discuss?hl=en

---
You received this message because you are subscribed to the Google Groups "Repo and Gerrit Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to repo-discuss...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

lucamilanesio

unread,
Jun 17, 2016, 10:35:51 AM6/17/16
to Repo and Gerrit Discussion, luca.mi...@gmail.com
I see, this is a kind of tricky thing as this change has no current patch-sets and it *is correct* .... but it seems that this situation breaks the Gerrit UX as well.
I honestly never pushed a draft patch-set to a published change and neither I thought that I could actually then "unpublish" partially a change in this way.

If you open https://gerrit-review.googlesource.com/#/c/78186/ you get a nice 500 :-O

The REST API that are failing with a 500 are:

Can this be related to the same condition?
Is this really a fully supported use-case?

Luca.

Edwin Kempin

unread,
Jun 17, 2016, 10:47:55 AM6/17/16
to lucamilanesio, Repo and Gerrit Discussion
On Fri, Jun 17, 2016 at 4:35 PM, lucamilanesio <luca.mi...@gmail.com> wrote:
I see, this is a kind of tricky thing as this change has no current patch-sets and it *is correct* .... but it seems that this situation breaks the Gerrit UX as well.
I honestly never pushed a draft patch-set to a published change and neither I thought that I could actually then "unpublish" partially a change in this way.

If you open https://gerrit-review.googlesource.com/#/c/78186/ you get a nice 500 :-O

The REST API that are failing with a 500 are:

Can this be related to the same condition?
Is this really a fully supported use-case?
Draft patch sets on published changes are pretty broken. It's better to use change edits in this case.

Luca Milanesio

unread,
Jun 17, 2016, 11:07:09 AM6/17/16
to Edwin Kempin, Repo and Gerrit Discussion
On 17 Jun 2016, at 15:47, Edwin Kempin <eke...@google.com> wrote:



On Fri, Jun 17, 2016 at 4:35 PM, lucamilanesio <luca.mi...@gmail.com> wrote:
I see, this is a kind of tricky thing as this change has no current patch-sets and it *is correct* .... but it seems that this situation breaks the Gerrit UX as well.
I honestly never pushed a draft patch-set to a published change and neither I thought that I could actually then "unpublish" partially a change in this way.

If you open https://gerrit-review.googlesource.com/#/c/78186/ you get a nice 500 :-O

The REST API that are failing with a 500 are:

Can this be related to the same condition?
Is this really a fully supported use-case?
Draft patch sets on published changes are pretty broken. It's better to use change edits in this case.

Shall we then just disable the functionality until it is fixed?
I agree on change edits :-) they are working well so far and I would just rely on them for the time being !

Dave Borowitz

unread,
Jun 17, 2016, 11:26:42 AM6/17/16
to lucamilanesio, Repo and Gerrit Discussion
On Fri, Jun 17, 2016 at 10:35 AM, lucamilanesio <luca.mi...@gmail.com> wrote:
I see, this is a kind of tricky thing as this change has no current patch-sets and it *is correct* .... but it seems that this situation breaks the Gerrit UX as well.
I honestly never pushed a draft patch-set to a published change and neither I thought that I could actually then "unpublish" partially a change in this way.


Yes. Actually the 500 was supposed to be fixed by https://gerrit-review.googlesource.com/78932 which is live but apparently not.
 
Is this really a fully supported use-case?

No, if you ask me, draft patch sets are fundamentally broken.

(I think I managed to not screw anything up in the NoteDb conversion of drafts, fortunately.)

Stefan Beller

unread,
Jun 18, 2016, 3:40:28 AM6/18/16
to Dave Borowitz, repo-discuss, Luca Milanesio, Zhen Chen

+czhen thanks for showing us he interesting use cases :)

Yeah the draft patch sets are pretty broken

Reply all
Reply to author
Forward
0 new messages