gocd: Pipeline and stage run 'Latest' counters have stopped working

Bug
  • Bug Report
  • Feature proposal
Summary
  • Since 18.something (to my memory), the UI links of the form /go/pipelines/<pipeline_name>/Latest/<stage_name>/Latest stopped working and return a 404.
  • The artifact URLs still contain the route of the form /go/files/<pipeline>/Latest/<stage>/Latest/<job>/<artifact>. This should continue to work 😄
Basic environment details
  • Go Version: 18.12
Steps to Reproduce
  1. Open a pipeline view: e.g. /go/pipelines/<pipeline>/777/default/1
  2. Replace the numbers with Latest
  3. observe 404
Expected Results
  • latest pipeline/stage run view is shown
Actual Results
  • 404
Possible Fix
  • (re-)add a route, calculating the latest counters for the view

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 16 (16 by maintainers)

Commits related to this issue

Most upvoted comments

Verified on 19.1.0 (8445-eb004d2a8df97734b224df38f04b2501c65ddd63)

Yeah, we removed the implementation because it was buggy (and undocumented) https://github.com/gocd/gocd/pull/4660#issue-181755293

I can imagine that people may have bookmarked links containing “/latest” like http://localhost:8153/go/tab/build/detail/gocd-rpi-unicorn-hat-monitor/Latest/test/Latest/unit, and if it’s useful enough, we can add support for the “latest” keyword.

Looks like counterOrLabel was the cause of ambiguity which could lead to bugs. Instead, we could use either counter or the keyword "latest". Arbitrary Labels shouldn’t be allowed though.