Skip to content
This repository has been archived by the owner on Oct 17, 2024. It is now read-only.

Tracker resource should not determine story reset time from activity on blocking stories #23

Open
emalm opened this issue Jul 13, 2018 · 0 comments

Comments

@emalm
Copy link

emalm commented Jul 13, 2018

Problem

The Diego team recently observed a case in which the Tracker resource failed to deliver a finished story (#158991284) because a chore (#158945682) that was blocking it was accepted after that story was finished. Relevant set of story updates, in reverse chronological order:

$ curl -s https://www.pivotaltracker.com/services/v5/projects/1003146/stories/158991284/activity \
    | jq '.[] | select(.kind=="story_update_activity") | {kind,occurred_at,highlight,primary_resources}'
Processed response
{
  "kind": "story_update_activity",
  "occurred_at": "2018-07-13T21:15:20Z",
  "highlight": "delivered",
  "primary_resources": [
    {
      "kind": "story",
      "id": 158991284,
      "name": "Redo #140766307 taking into account issues observed on Windows cells",
      "story_type": "bug",
      "url": "https://www.pivotaltracker.com/story/show/158991284"
    }
  ]
}
{
  "kind": "story_update_activity",
  "occurred_at": "2018-07-13T16:40:34Z",
  "highlight": "accepted",
  "primary_resources": [
    {
      "kind": "story",
      "id": 158945682,
      "name": "Investigate reports of Windows Diego components not starting on certain IaaSes because of loggregator client bootstrapping exceeding its context deadline",
      "story_type": "chore",
      "url": "https://www.pivotaltracker.com/story/show/158945682"
    }
  ]
}
{
  "kind": "story_update_activity",
  "occurred_at": "2018-07-13T15:11:42Z",
  "highlight": "finished",
  "primary_resources": [
    {
      "kind": "story",
      "id": 158991284,
      "name": "Redo #140766307 taking into account issues observed on Windows cells",
      "story_type": "bug",
      "url": "https://www.pivotaltracker.com/story/show/158991284"
    }
  ]
}
{
  "kind": "story_update_activity",
  "occurred_at": "2018-07-13T12:16:10Z",
  "highlight": "started",
  "primary_resources": [
    {
      "kind": "story",
      "id": 158991284,
      "name": "Redo #140766307 taking into account issues observed on Windows cells",
      "story_type": "bug",
      "url": "https://www.pivotaltracker.com/story/show/158991284"
    }
  ]
}
{
  "kind": "story_update_activity",
  "occurred_at": "2018-07-12T16:24:13Z",
  "highlight": "accepted",
  "primary_resources": [
    {
      "kind": "story",
      "id": 158991271,
      "name": "Roll back changes introduced in #140766307 to ensure Windows Diego components can start reliably across different IaaSes",
      "story_type": "bug",
      "url": "https://www.pivotaltracker.com/story/show/158991271"
    }
  ]
}
{
  "kind": "story_update_activity",
  "occurred_at": "2018-07-11T22:25:49Z",
  "highlight": "edited",
  "primary_resources": [
    {
      "kind": "story",
      "id": 158991284,
      "name": "Redo #140766307 taking into account issues observed on Windows cells",
      "story_type": "bug",
      "url": "https://www.pivotaltracker.com/story/show/158991284"
    }
  ]
}

The second object in this list is the acceptance of the #158945682 chore, which occurs after transition of the main story #158991284 into the "finished" state and so causes the tracker resource invocation in deliver build #1077 (screenshot in details below) not to search Git history far enough back to find the diego-release commit that finished #158991284.

Screenshot of deliver build #1077

screen shot 2018-07-13 at 3 54 47 pm

Possible fix

The predicate at

if activity.Kind == "story_update_activity" && resettingStoryStates[activity.Highlight] {
should include an assertion that the ID of the story being evaluated for delivery appears as the ID of a primary story resource in the activity entry.

h/t @jvshahid

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant