atomist-attic / rug

DEPRECATED Runtime for Rugs
GNU General Public License v3.0
53 stars 13 forks source link

FileDeletion.path is undefined #638

Closed ddgenome closed 6 years ago

ddgenome commented 7 years ago

The path property on FileDeletion impacts appears to not get set in all cases. In the JSON below, the "log" value is supposed to be f.path + ":" + f.nodeTags()[0]. The nodeTag is set, but not f.path.

{
  "coordinate" : "atomist:spring-team-handlers:0.3.2:CascadeOnPushToFeatureBroadcastingProject",
  "log" : "*** file removal with impact files=undefined:FileDeletion",
  "level" : "log",
  "event-type" : "operation",
  "correlation-id" : "a86d79fb-bd10-4040-bcb8-8928e4ab4f9a",
  "name" : "CascadeOnPushToFeatureBroadcastingProject",
  "type" : "event-handler"
}

and then

{
  "duration" : "1368",
  "coordinate" : "atomist:spring-team-handlers:0.3.2:CascadeOnPushToFeatureBroadcastingProject",
  "stacktrace" : "com.atomist.rug.runtime.js.SourceLanguageRuntimeException: [Cannot read property \"substr\" from undefined] at .atomist/util/StringUtils.ts:14/13\n}\n            ^\n--via generated code--\n.atomist/util/StringUtils.js:11/1\n    return origin.substr(origin.length - target.length, target.length) === target;\n^\n",
  "event-type" : "operation",
  "correlation-id" : "a86d79fb-bd10-4040-bcb8-8928e4ab4f9a",
  "name" : "CascadeOnPushToFeatureBroadcastingProject",
  "type" : "event-handler",
  "status" : "failed"
}

Relevant info for debugging: Cortex event for Push and team Atomist (T5964N9B7)

{
  "event-type" : "event",
  "correlation-id" : "a86d79fb-bd10-4040-bcb8-8928e4ab4f9a",
  "label" : "Push",
  "id" : "145124"
}
ddgenome commented 7 years ago

Debugging and setting up breakpoints, it seems the issue is that f.path is not hitting FileDeletion.path, but presumably some other path in the hierarchy.

alankstewart commented 7 years ago

@ddgenome is this still an issue? I don't know how to reproduce this.

ddgenome commented 7 years ago

I would guess it still is. It would take me a bit to get back into this issue and provide a recipe for recreating. I'll have to get back to you.

alankstewart commented 6 years ago

:)