Skip to content
This repository was archived by the owner on Oct 17, 2024. It is now read-only.
This repository was 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

@emalm

Description

@emalm

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

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