Skip to content

git-node: err in CI date math #338

@srl295

Description

@srl295

node-core-utils@1.16.1

My PR: nodejs/node#27370

   ℹ  Last Lite PR Pipeline CI on 2019-04-23T17:04:57Z: https://ci.nodejs.org/job/node-test-pull-request-lite-pipeline/3341
   ℹ  Last Full PR CI on 2019-04-24T22:27:33Z: https://ci.nodejs.org/job/node-test-pull-request/22696/

but I kept getting:

⚠ Commits were pushed after the last Lite PR Pipeline CI run:

debugging i see:

{ committedDate: '2019-04-24T21:44:09Z'
a461aa39d098930d668298480cd415569e92f53a

lastCI:
{ typeName: 'Lite PR Pipeline', date: '2019-04-23T17:04:57Z' } }

so the 'lastCI' is the lite one on the 23rd, not the full on the 24th 1 hour after the fact.

===Found it===

I think this is the bug, pr_checker.js:199

       if (!lastCI || lastCI.date > ci.date) {

this will only replace a CI if it is newer we have

       if (!lastCI || lastCI.date < ci.date) {

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions