Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dashboard breaks when pipeline has never executed #4466

Closed
ketan opened this issue Mar 1, 2018 · 2 comments

Comments

Projects
None yet
3 participants
@ketan
Copy link
Member

commented Mar 1, 2018

Issue Type
  • Bug Report
Summary

I don't have a useful stacktrace in the browser, but here's the stacktrace in the browser.

I suspect this has to do with the pipeline upload_addons_to_download_server the JSON response is:

{
  "_links" : {
    "self" : {
      "href" : "https://build.gocd.org/go/api/dashboard"
    },
    "doc" : {
      "href" : "https://api.go.cd/current/#dashboard"
    }
  },
  "_embedded" : {
    "pipeline_groups" : [ {
      "_links" : {
        "doc" : {
          "href" : "https://api.go.cd/current/#pipeline-groups"
        },
        "self" : {
          "href" : "https://build.gocd.org/go/api/config/pipeline_groups"
        }
      },
      "name" : "enterprise",
      "pipelines" : [ "upload_addons_to_download_server" ],
      "can_administer" : true
    } ],
    "pipelines" : [ {
      "_links" : {
        "self" : {
          "href" : "https://build.gocd.org/go/api/pipelines/upload_addons_to_download_server/history"
        },
        "doc" : {
          "href" : "https://api.go.cd/current/#pipelines"
        },
        "unlock" : {
          "href" : "https://build.gocd.org/go/api/pipelines/upload_addons_to_download_server/unlock"
        },
        "schedule" : {
          "href" : "https://build.gocd.org/go/api/pipelines/upload_addons_to_download_server/schedule"
        },
        "pause" : {
          "href" : "https://build.gocd.org/go/api/pipelines/upload_addons_to_download_server/pause"
        },
        "unpause" : {
          "href" : "https://build.gocd.org/go/api/pipelines/upload_addons_to_download_server/unpause"
        }
      },
      "name" : "upload_addons_to_download_server",
      "last_updated_timestamp" : 1519887146084,
      "locked" : false,
      "pause_info" : {
        "paused" : false,
        "paused_by" : null,
        "pause_reason" : null
      },
      "can_operate" : true,
      "can_administer" : true,
      "can_unlock" : true,
      "can_pause" : true
    } ]
  }
}
new_dashboard-1918296705f20fc8083a.js:1 Uncaught TypeError: Cannot read property 'instances' of undefined
    at new u (new_dashboard-1918296705f20fc8083a.js:1)
    at new_dashboard-1918296705f20fc8083a.js:1
    at m (vendor-and-helpers.chunk-d7c96d548c2d8515bb38.js:1)
    at Function.fs [as reduce] (vendor-and-helpers.chunk-d7c96d548c2d8515bb38.js:1)
    at Function.a.fromJSON (new_dashboard-1918296705f20fc8083a.js:1)
    at u.initialize (new_dashboard-1918296705f20fc8083a.js:1)
    at e (new_dashboard-1918296705f20fc8083a.js:1)
    at Object.<anonymous> (new_dashboard-1918296705f20fc8083a.js:1)
    at Object.<anonymous> (vendor-and-helpers.chunk-d7c96d548c2d8515bb38.js:24)
    at u (vendor-and-helpers.chunk-d7c96d548c2d8515bb38.js:24)
@arvindsv

This comment has been minimized.

Copy link
Member

commented Mar 1, 2018

This is a duplicate of the bug fixed by #4456. Doing a quick edit makes this happen on build 18.2.0 (6188-f8093bbfc729dc30eb2ae7b868747137c1c1bb93). Fixed by b9247f2.

However, I'll keep this open as an issue, where a problem during JSON generation does not cause an invalid JSON to be sent to the output, and the client has no way of knowing something bad happened.

@arvindsv arvindsv added this to the Release 18.3 milestone Mar 1, 2018

@arvindsv arvindsv self-assigned this Mar 1, 2018

arvindsv added a commit to arvindsv/gocd that referenced this issue Apr 4, 2018

gocd#4466 - Make JSON output invalid on error
When an exception is thrown during JSON creation, the output written to the writer should be
made an invalid JSON so that clients can realize that there is a problem.

arvindsv added a commit to arvindsv/gocd that referenced this issue Apr 4, 2018

gocd#4466 - Make JSON output invalid on error
When an exception is thrown during JSON creation, the output written to the writer should be
made an invalid JSON so that clients can realize that there is a problem.

arvindsv added a commit to arvindsv/gocd that referenced this issue Apr 4, 2018

gocd#4466 - Make JSON output invalid on error
When an exception is thrown during JSON creation, the output written to the writer should be
made an invalid JSON so that clients can realize that there is a problem.

arvindsv added a commit to arvindsv/gocd that referenced this issue Apr 5, 2018

gocd#4466 - Make JSON output invalid on error
When an exception is thrown during JSON creation, the output written to the writer should be
made an invalid JSON so that clients can realize that there is a problem.

arvindsv added a commit to arvindsv/gocd that referenced this issue Apr 5, 2018

gocd#4466 - Make JSON output invalid on error
When an exception is thrown during JSON creation, the output written to the writer should be
made an invalid JSON so that clients can realize that there is a problem.

arvindsv added a commit to arvindsv/gocd that referenced this issue Apr 5, 2018

gocd#4466 - Make JSON output invalid on error
When an exception is thrown during JSON creation, the output written to the writer should be
made an invalid JSON so that clients can realize that there is a problem.

arvindsv added a commit to arvindsv/gocd that referenced this issue Apr 5, 2018

gocd#4466 - Make JSON output invalid on error
When an exception is thrown during JSON creation, the output written to the writer should be
made an invalid JSON so that clients can realize that there is a problem.

ketan added a commit that referenced this issue Apr 5, 2018

#4466 - Make JSON output invalid on error (#4612)
When an exception is thrown during JSON creation, the output written to the writer should be
made an invalid JSON so that clients can realize that there is a problem.
@arvindsv

This comment has been minimized.

Copy link
Member

commented Apr 10, 2018

@rajiesh I think this can be closed.

@rajiesh rajiesh closed this Apr 18, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.