Repository navigation
Add pipeline-level description field - #9661
Conversation
57aa63a to
f0fc335
Compare
There was a problem hiding this comment.
Thanks for the PR and happy to see your excitement around adding such a feature!
As I mentioned in the discussion post, I think using the existing user_data field would be useful here. #9489
user_data feels like a good fit for data like "pipeline description" since it was meant as a catch-all for arbitrary information. We could have heuristics where if the value of user_data is a string we render it in markdown, or the UI can look for a description field and only display and render that field as markdown. Otherwise, render the entire user_data as YAML.
Another motivation I have to use the user_data config instead of adding a new top-level config option to the pipeline is that it reduces the amount of code needed to implement the feature. You can eliminate all the atc/ code and focus purely on the frontend changes. Means less future maintenance for the project as well.
Regarding the design, I don't like the way this looks. It feels like a sticky note has been attached to the screen. I'm also generally wary about adding new visual stuff to the pipeline overview page. It can already get really noisy with a lot of resources, jobs, and groups.
I'd prefer to not display this information by default and instead hide it behind a button. I'd be fine with rendering it as a modal (I don't think we do modals anywhere else in the UI at the moment, so new ground to be broken here if going in that direction) or on a new page. A new page would be simplest.
I'd use the information-outline icon for the button: https://pictogrammers.com/library/mdi/icon/information-outline/
I'd probably add the button to the top-right with the existing set of buttons.
Concourse has no field for a pipeline to carry its own documentation text. The closest existing thing, display.background_image, has real layout limitations for that purpose (see the linked discussion for the concrete problems this hit in practice). Add Config.Description as a plain string field, mirroring the existing Display field's plumbing through validation, DB storage, and the API response: a new "description" text column on the pipelines table, the db.Pipeline interface/getter, and atc.Pipeline's API-facing struct via the existing presenter. Kept as a top-level Config field rather than nested under display, since it's a documentation concern rather than a visual one, and given DB storage: unlike Display (a struct with several fields, justifying jsonb), a plain scalar string fits a plain text column more naturally. No new validation was added - there's no existing precedent in configvalidate for constraining free-text fields like this, and none seemed warranted. https://github.com/orgs/concourse/discussions/9660 Signed-off-by: Tobias Macey <[email protected]>
Decode the new description field onto Concourse.Pipeline and render it on the pipeline page as a panel positioned as a flow sibling of the groups bar - a sibling of .pipeline-content inside the flex-column #pipeline-container, not a child of it. This matters: .pipeline-content is where the background image div and the job graph SVG both live, both position: absolute and both filling the container completely with no coordination between them. A description rendered there would just be one more thing competing for the same pixels. As a flow sibling before it, the same way the groups bar already works, it reserves its own space and pushes the graph down instead. Rendered as markdown via dillonkearns/elm-markdown's defaultHtmlRenderer, left unmodified rather than adding a custom html renderer - its default (html = Markdown.Html.oneOf []) means raw HTML embedded in the markdown source doesn't render, which matters here since a pipeline's description is visible to anyone with view access, including anonymous viewers on public pipelines. Falls back to the raw (still-escaped, so still safe) text on any parse or render failure. Two other call sites construct a full Concourse.Pipeline record literal outside the decoder and needed the new field added: Dashboard.toConcoursePipeline (the dashboard's own, separate Pipeline type doesn't carry description at all - out of scope here, tracked as a follow-up) and the tests/Data.elm fixture builder, which also gets a withDescription helper alongside the existing withBackgroundImage one. https://github.com/orgs/concourse/discussions/9660 Signed-off-by: Tobias Macey <[email protected]>
Empty commit to retrigger concourse-ci/validate-labels, which ran before the "enhancement" label was applied to the PR and has no re-run affordance available to outside contributors (it's a legacy Status API check, not a Checks API run). Signed-off-by: Tobias Macey <[email protected]>
…o button Reworks the pipeline-description feature per review feedback on concourse#9661, in two parts. First, drop the new top-level `description` config entirely and read the existing `user_data` field instead. `user_data` landed in concourse#9489 as a catch-all for arbitrary pipeline metadata, is already plumbed through db.Pipeline and the presenter, and is already exposed as `user_data` on the API's pipeline payload - nothing on the Elm side consumed it yet. Reading it there means the whole atc/ side of this change goes away: no `Config.Description`, no `description` column and migration, no db.Pipeline getter, no presenter field, no regenerated fake. Less code to carry, and no new pipeline config surface to support forever. Second, stop rendering it in the pipeline overview by default. The overview is already dense with jobs, resources and groups, and an always-on panel added to that. The content now lives at /teams/:team/pipelines/:pipeline/info, reached from an information-outline button in the existing top-right button group. The button is only rendered when the pipeline actually has `user_data`, so pipelines without it look exactly as they do today. A page rather than a modal: `user_data` is arbitrary and potentially long, and a page scrolls without a height ceiling and gives the content a shareable URL, which suits something read as documentation. `user_data` is an opaque JSON value, so the page picks a rendering from its shape: a bare string is markdown; an object with a string `description` renders that as markdown with the remaining keys as YAML underneath; anything else renders wholesale as YAML. The YAML renderer is a small local module rather than a new dependency. It preserves the author's key order instead of sorting (this is read as documentation), renders multi-line strings as literal block scalars, and quotes conservatively - anything that could otherwise be read back as a number, bool, null, or YAML syntax. Markdown still goes through dillonkearns/elm-markdown's defaultHtmlRenderer unmodified, so raw HTML embedded in the source does not render (`html = Markdown.Html.oneOf []`). `user_data` is visible to anyone with pipeline view access, including anonymous viewers on public pipelines, so opting into a raw-HTML-passthrough renderer would be a mistake. Parse or render failure falls back to the raw, still-escaped text. Decoding treats an explicit `"user_data": null` as unset the same way an absent key is; `Json.Decode.value` on its own would accept null and break the encode/decode round-trip. Adds coverage for the YAML renderer, the routing, the button's visibility and target, and each of the three rendering shapes. Signed-off-by: Tobias Macey <[email protected]>
1aecf59 to
2200eda
Compare
|
Thanks for the thorough review — this was the right call on both counts. Reworked in 2200eda and rebased onto latest
|
user_data |
rendering |
|---|---|
| a string | markdown |
object with a string description |
that key as markdown, remaining keys as YAML below |
| anything else | YAML |
The YAML renderer is a small local module (web/elm/src/Yaml.elm) rather than a new dependency. It preserves the author's key order instead of sorting — this is read as documentation — renders multi-line strings as literal block scalars, and quotes conservatively: anything that would otherwise read back as a number, bool, null, or YAML syntax.
Markdown still goes through dillonkearns/elm-markdown's defaultHtmlRenderer unmodified, so raw HTML in the source doesn't render (html = Markdown.Html.oneOf []). user_data is visible to anyone with pipeline view access, including anonymous viewers on public pipelines, so opting into raw-HTML passthrough would be a mistake here. Parse/render failure falls back to the raw, still-escaped text.
One decoder subtlety worth flagging: an explicit "user_data": null is now treated as unset, the same as an absent key. Json.Decode.value accepts null happily, which broke the existing pipeline encoding/decoding are inverses test — caught by the suite rather than by inspection.
Tests
Added coverage for the parts that now have real logic — the YAML renderer, the routing, the button's visibility and link target, and each of the three rendering shapes, plus the raw-HTML case. 3084 Elm tests pass (was 3036).
concourse-ci/watsjs
This one is unrelated to the PR — worth a look if it's recurring. Every test in every file failed identically in beforeEach with TimeoutError: Waiting for selector '#user-id' failed, including smoke › reaching the internet, before the job hit timeout exceeded. #user-id is the login/top-bar user menu, and this PR touches no auth, top-bar, or login code. Reads like the test cluster never came up rather than anything in the diff. It'll re-run against the reworked code on this push.
Still open
The dashboard tiles still don't surface user_data — they use a separate Pipeline type that doesn't carry it. Deliberately out of scope here, happy to follow up if it's wanted.
I don't have a Concourse instance handy to grab fresh screenshots of the new page — the ones in the description are of the old inline panel and no longer reflect the UI. Glad to add current ones if that's useful for review.
A transient fetch failure set RemoteData.Failure, which getUpdateMessage reports as UpdateMsg.NotFound, bouncing the user to the not-found page on any network blip. Only a 404 actually means the pipeline isn't there; everything else now leaves the model alone so the five-second poll can recover on its own. Signed-off-by: Tobias Macey <[email protected]>
Adding dillonkearns/elm-markdown made `yarn build-elm` silently produce a zero-byte elm.min.js, which is the file index.html actually loads - so the entire web UI rendered blank. Two separate faults combined. The Elm compiler emits Char literals verbatim, and elm-markdown's Markdown.InlineParser.isWhitespace matches U+2028 (LINE SEPARATOR) and U+2029 (PARAGRAPH SEPARATOR). Both are line terminators in ECMAScript before ES2019, so a literal one inside a string literal is a syntax error to an ES5-era parser. uglify-js is ES5-only and rejected the bundle with "Unterminated string constant". The generated JavaScript is valid; the minifier just predates the spec change. hack/escape-js-line-separators rewrites those two characters to their equivalent escape sequences before minification, which is semantically identical. That alone would have been a loud failure, except build-elm piped `uglifyjs | uglifyjs --mangle --output`. A shell pipeline reports the exit status of its *last* command, so the first stage dying left the second reading empty stdin and writing an empty file - exit 0, no output, broken bundle. Replacing the pipe with an intermediate file and `&&` makes any stage's failure fatal. This is what failed concourse-ci/watsjs: with no Elm loaded the page never renders, so every test timed out in beforeEach waiting for the `#user-id` selector, including `smoke > reaching the internet`. Signed-off-by: Tobias Macey <[email protected]>
Verified against a local Concourse: with both a description and extra keys, the YAML block sat flush against the last markdown paragraph, since the markdown's own last-child margin is zeroed. Laying the body out as a flex column with a gap spaces them without either block needing a margin that would double up on the container padding when it is the only child. Also corrects the Yaml module's claim that it preserves the pipeline author's key order. It preserves the order it receives, but that is not the authored order: user_data is an `any` on the Go side, so encoding/json has already sorted the map keys alphabetically before the frontend ever sees them. Signed-off-by: Tobias Macey <[email protected]>
The previous two showed the inline description panel, which no longer exists. Captured against a local Concourse (docker-compose) running the reworked branch. Signed-off-by: Tobias Macey <[email protected]>
|
Correction to my last comment, plus screenshots. I was wrong about
|
has user_data |
no user_data |
|---|---|
![]() |
![]() |
Object with a description — markdown plus the remaining keys as YAML:
The other two shapes (bare string → markdown, anything else → YAML) and the empty state are in the description.
Two smaller things from testing against a real server
- The YAML block sat flush against the last markdown paragraph, because the markdown's own last-child margin is zeroed. Fixed in 71a065b.
- I'd claimed the YAML renderer preserves the author's key order. It preserves the order it receives, but that isn't the authored order —
user_datais ananyon the Go side, soencoding/jsonhas already sorted the map keys alphabetically before the frontend sees them. Comment and PR text corrected; you can see the alphabetization in the screenshots.
Behaviour verified in-browser as well as in unit tests: button present with user_data, absent without, correct link target, and the empty state on /info for a pipeline with none.
concourse-ci/unit runs `yarn analyse`, which failed on two single-field
records this PR introduced:
src/Routes.elm Record has only one field
src/PipelineInfo/PipelineInfo.elm Record has only one field
Both were records purely out of habit, matching neighbouring routes that
happen to carry more than one field. Neither needs to be:
- Routes.PipelineInfo now takes Concourse.PipelineIdentifier
positionally, like FlySuccess does with its arguments, rather than
wrapping it in a { id = ... } record.
- PipelineInfo's Flags alias wrapped a lone pipelineLocator, so init
and changeToPipeline now take the identifier directly and the alias
is gone.
`elm-analyse` is clean (0 messages) and the Elm suite still passes at
3084 tests.
Signed-off-by: Tobias Macey <[email protected]>
|
Love it! One tiny nitpick, is the missing vertical dash between the pin and info buttons intended? :) |
|
CI update on 21c5044 — both bugs I introduced are now confirmed fixed by CI, not just locally.
One more real bug, found and fixed
Both were records out of habit, copying neighbouring routes that happen to carry more than one field. The
|
Spotted in review by @bcersows: there was no vertical divider between the pin and info buttons, unlike every other pair in the top-right group. Not intentional - the style was simply missing what its siblings have. Two things were off. The container had no `border-left`, which every other item in that group carries (`favoritedIcon`, `pauseToggle`, and PinMenu all use `1px solid Colors.background` over `Colors.topBarBackground`). And it sized itself with horizontal padding around a 20px icon, so even once the border was added it only spanned the icon's height rather than the bar's. The neighbours get their height from a 17px margin on the icon itself: 17 + 20 + 17 is exactly the 54px top bar, which is what makes their dividers full-height. Matching that pattern rather than inventing a padding-based one makes the divider line up with the rest. Verified against a local Concourse - all four dividers in the group are now identical. Signed-off-by: Tobias Macey <[email protected]>
|
@bcersows Not intentional — good catch, thanks. Fixed in d3f836f. Two things were wrong, and the second is why it wasn't just a one-liner. The container had no -- favoritedIcon, pauseToggle, and PinMenu all do this
style "border-left" <| "1px solid " ++ Colors.background
style "background-color" Colors.topBarBackgroundBut adding the border alone gave a divider only as tall as the icon, still visibly different from its neighbours. The others size themselves with a Now matching the sibling pattern rather than a padding-based one of my own: All four dividers in the group are identical now. Verified against a local Concourse rather than by inspection — the intermediate short-divider state looked fine in code and only showed up in the screenshot. |
|
Thanks for all the work on this and TY @bcersows for reviewing it! I like everything I'm seeing in the screenshots. Super simple and no frills 👍 I'll play around with it a bit and review the code before merging. Thanks for your patience. |
taylorsilva
left a comment
There was a problem hiding this comment.
Thanks for your patience! This looks pretty good, just two cosmetic changes I'd like to change and of course swapping out uglify-js for terser.
I left my musings about Yaml.elm, no change needed there though. I appreciate the tests added alongside it.
nit: like all LLM things, tons of comments. The one's explaining "why" aren't bad, but lots of "this function does xyz" type of comments. If you can remove them I'd appreciate it. Not a blocker.
uglify-js is ES5-only and predates the ES2019 spec change that made a literal U+2028/U+2029 inside a string legal, so it broke on Elm-emitted Char literals containing them -- the reason hack/escape-js-line-separators existed. terser's parser handles them natively, so the escape step is gone along with the dependency. Co-Authored-By: Claude Sonnet 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01JomxG7u4nzXBLkQga5VrUi
Views.Styles.fontFamilyDefault is the font already used for monospace text elsewhere instead of a bare "Courier, monospace" fallback stack, and the opacity on the empty-state text made it harder to read for no benefit. Co-Authored-By: Claude Sonnet 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01JomxG7u4nzXBLkQga5VrUi
|
Addressed the round from 21c5044c/79f88fcf: swapped uglify-js for terser and dropped hack/escape-js-line-separators (9fb10ec), and fixed the two Styles.elm nits -- shared monospace font, no more opacity on the empty state (badd076). Both pushed to pipeline-description and all four threads replied to and resolved. Re-checked the comment density across the diff (PipelineInfo.elm, Yaml.elm, Styles.elm, tests) for the 'tons of comments' note in the last review -- every comment left is a why-explanation (e.g. the null-vs-absent user_data decode, the 404-vs-transient-error handling, the YAML quoting rules), nothing restating what the code does, so no changes made there. |
taylorsilva
left a comment
There was a problem hiding this comment.
New day, fresh eyes and mind!
I realized there is some untested behaviour for the changes made in Pipeline/Pipeline.elm. Tests should be added in web/elm/tests/PipelineTests.elm:
- Add tests that verify the info icon is present when
user_datais present, and the inverse - The info icon has
margin: 17pxset on it. A test should fail if this is changed/removed
You can refer to the existing icon tests for examples:
concourse/web/elm/tests/PipelineTests.elm
Line 751 in 9f3f88f
In web/elm/tests/PipelineInfoTests.elm add a test that ensures line-height is set to create the gap between the markdown and yaml blocks.
Why leave comments when you can have the code + tests do all the explaining :)
Some comments should be replaced by tests. See PR review for list of suggested tests. Co-authored-by: Taylor Silva <[email protected]>
…page gap Moves the info-button tests from PipelineInfoTests to PipelineTests, where the code under test lives, and pins the two style values whose explanatory comments were dropped: the icon's 17px margin (what makes its divider full-height alongside the favourite and pause controls) and the info page body's flex gap and line-height. Verified each new assertion fails against the unpinned code: changing margin to 10px fails "icon has the same 17px margin as its neighbours", and removing gap/line-height fails "the markdown and YAML blocks are separated by a gap". Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
|
Tests added in afb8dd1 for all three asks.
Three of these existed but lived in
Confirmed each assertion fails against unpinned code rather than just passing against the current one:
Reverted both after checking. Full suite: 3086 pass, On the comment nit — your |
taylorsilva
left a comment
There was a problem hiding this comment.
Tooltip doesn't work. Hovering over the info icon prints a warning to the console.
Here's a patch that will fix it and add tests. Includes a bonus wiring up that we missed:
diff --git a/web/elm/src/Application/Application.elm b/web/elm/src/Application/Application.elm
index 68a5e12a7..27170b32b 100644
--- a/web/elm/src/Application/Application.elm
+++ b/web/elm/src/Application/Application.elm
@@ -666,6 +666,9 @@ routeMatchesModel route model =
( Routes.Dashboard _, SubPage.DashboardModel _ ) ->
True
+ ( Routes.PipelineInfo _, SubPage.PipelineInfoModel _ ) ->
+ True
+
_ ->
False
diff --git a/web/elm/src/Message/Effects.elm b/web/elm/src/Message/Effects.elm
index 63d227c85..24f511f27 100644
--- a/web/elm/src/Message/Effects.elm
+++ b/web/elm/src/Message/Effects.elm
@@ -943,6 +943,9 @@ toHtmlID domId =
TopBarPinIcon ->
"top-bar-pin-icon"
+ TopBarInfoIcon ->
+ "top-bar-info-icon"
+
CommentBar id ->
"comment-bar-" ++ toHtmlID id
diff --git a/web/elm/tests/PipelineTests.elm b/web/elm/tests/PipelineTests.elm
index 15fd65879..6aa0b2d1f 100644
--- a/web/elm/tests/PipelineTests.elm
+++ b/web/elm/tests/PipelineTests.elm
@@ -895,6 +895,25 @@ all =
, image = Assets.InformationOutlineIcon
}
)
+ , test "renders under the DOM id that hovering looks up" <|
+ -- a DomID with no toHtmlID branch falls through to the
+ -- catch-all "", so hovering calls getElementById("") and
+ -- the tooltip never resolves
+ \_ ->
+ withUserData
+ |> Common.queryView
+ |> Query.has [ id <| Effects.toHtmlID TopBarInfoIcon ]
+ , test "hovering it asks for the viewport of that element" <|
+ \_ ->
+ withUserData
+ |> Application.update
+ (Msgs.Update <| Hover <| Just TopBarInfoIcon)
+ |> Tuple.second
+ |> Common.contains (Effects.GetViewportOf TopBarInfoIcon)
+ , test "hovering it shows the pipeline info tooltip" <|
+ \_ ->
+ withUserData
+ |> Common.expectTooltip TopBarInfoIcon "pipeline info"
]
, describe "pipeline name tooltip" <|
let
toHtmlID falls through to a catch-all "" for any DomID without an explicit
branch, so hovering the info icon called getElementById("") and the tooltip
never appeared (it logged a warning instead).
Also adds PipelineInfo to routeMatchesModel. SubPage.urlUpdateValid already
had a Routes.PipelineInfo case calling PipelineInfo.changeToPipeline, but
without the matching branch here that path was never reached, so info page
to info page navigation re-initialized the subpage instead.
Patch by @taylorsilva in review 5071428535.
Co-Authored-By: Taylor Silva <[email protected]>
Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01WRYF5b3qTFywDCNqtQHzYh
|
Applied your patch verbatim in 014947b. Confirmed the No test for the 3089 tests pass, |
…5989) * feat(concourse): populate pipeline user_data for the upcoming info-page description Concourse already stores an opaque user_data field through the set-pipeline/get-pipeline cycle (concourse/concourse#9489, shipped in our pinned 8.3.0), but the web UI doesn't render it until concourse/concourse#9661 ("Add pipeline-level description field", merged 2026-09-01) lands in a release we've upgraded to. This sets user_data on every pipeline generator now so the description starts rendering automatically once we bump CONCOURSE_VERSION past that release, instead of waiting to author 60+ descriptions after the fact. - Adds pipeline_json_with_user_data() (pipelines/pipeline_output.py), which merges user_data into a Pipeline's serialized JSON. The installed ol-concourse package's Pipeline model has no typed user_data field yet and uses extra="forbid", so it can't go through Pipeline(...) directly. - Wires every pipeline.py, meta.py, and standalone image-build script under src/ol_concourse/pipelines/ to use it, with a description grounded in what that pipeline actually builds/deploys, plus team and category (matching docs/plans/concourse-dashboard-reorganization.md §3's dashboard clusters). - Covers meta-driven per-instance registries (simple_pulumi's 39 apps, k8s_apps' 9 apps, container_images' 8 image builds, the open_edx release/deployment families, mfe's per-deployment and per-site pipelines, grader images) as well as the meta pipelines themselves. Co-Authored-By: Claude Sonnet 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01YBq4p2BbA7GzbZUSoUYtT8 * fix(concourse): cover the three definition.json-write patterns a filename grep missed A fresh code review of the prior commit found 4 pipeline generators under src/ol_concourse/pipelines/ that never got wired to pipeline_json_with_user_data(): the original discovery pass grepped for open("definition.json"), which missed jupyter_courses.py (writes github_definition.json/s3_definition.json for its two instance-group templates) and libraries/meta.py + libraries/api_clients_pipeline.py (write only to stdout, piped to a file by the Concourse task that calls them, not via a local open() call). Also fixes a real bug the same review caught in mfe/site_pipeline.py: __main__ re-derived deployment -> SiteProjectConfig via a raw dict subscript (_by_name[deployment]) ahead of the safe, validated lookup site_pipeline() already does internally, so an unknown deployment name now crashed with a bare KeyError instead of the existing friendly "Unknown deployment ... Supported deployments: ..." message. Extracted that lookup into _resolve_site_project() so both call sites share the one validated path. Also corrects a docstring in container_images/meta.py that still said `fly -t pr-inf` after the prior commit fixed the actual runtime command to `fly -t pr-main` (container-images-meta lives on the main team per docs/plans/concourse-dashboard-reorganization.md §3). Co-Authored-By: Claude Sonnet 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01YBq4p2BbA7GzbZUSoUYtT8 * fix(concourse): correct meta-pipeline team labels and a stdout-redirect JSON break Addresses Copilot's review on PR #5989: - libraries/meta.py: the fly hint printed after the JSON write landed on stdout, which set_self_job() redirects straight into generated-pipeline/meta-pipeline-definition.json via `> {definition_path}`, making that file invalid JSON and breaking the self-update SetPipelineStep. Moved the hint to stderr. - codejail_v3/edx_notes_v3/xqueue/xqwatcher meta.py: each registers its own "meta" self-pipeline on team "main" (`pipeline_team = "main"` in build_meta_job), but the user_data describing that same self-pipeline said "infrastructure". Fixed all four to "main". - mfe/meta.py had the same team mismatch, not flagged by the review but caught by the same check: docs/plans/concourse-dashboard-reorganization.md §3 lists mfe-meta-pipeline under main's meta cluster, matching the other four. Fixed to "main". - AGENTS.md: scoped the "every __main__ block should use the helper" rule to production pipeline generators and named the pipelines/examples/hello.py exception explicitly, so it no longer contradicts that pipeline's deliberate exclusion. Co-Authored-By: Claude Sonnet 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01YBq4p2BbA7GzbZUSoUYtT8 --------- Co-authored-by: Claude Sonnet 5 <[email protected]>




Changes proposed by this PR
Surfaces a pipeline's
user_datain the web UI, on its own page behind a button. Proposed in https://github.com/orgs/concourse/discussions/9660; reworked from the original approach per review — see this comment for the before/after.Frontend-only.
user_dataalready exists end-to-end from #9489 —db.Pipeline.UserData(), the presenter, anduser_dataon the API pipeline payload — so there are noatc/changes here, and no new pipeline config surface.New route
/teams/:team/pipelines/:pipeline/infoand page module (web/elm/src/PipelineInfo/).Reached from an
information-outlinebutton in the pipeline page's existing top-right button group, alongside the pin/favorite/pause controls. The button is only rendered when the pipeline actually hasuser_data.user_datais an opaque JSON value, so the page picks a rendering from its shape:user_datadescriptionYAML rendering is a small local module (
web/elm/src/Yaml.elm) rather than a new dependency. It renders multi-line strings as literal block scalars and quotes conservatively — anything that would otherwise read back as a number, bool, null, or YAML syntax. It doesn't re-sort keys; note they arrive alphabetized already, sinceuser_datais ananyon the Go side andencoding/jsonsorts map keys.Markdown renders via
dillonkearns/elm-markdown'sdefaultHtmlRenderer, left unmodified (no customhtmlrenderer) so raw HTML embedded in the source doesn't render —user_datais visible to anyone with pipeline view access, including anonymous viewers on public pipelines. Parse/render failure falls back to the raw, still-escaped text.Decoding treats an explicit
"user_data": nullas unset, the same as an absent key;Json.Decode.valueon its own acceptsnulland breaks the encode/decode round-trip.Also fixes the production Elm build, which this PR's new dependency broke — see "Build fix" below.
Dashboard tiles are out of scope — they use a separate
Pipelinetype that doesn't carryuser_data.Screenshots
All captured against a local Concourse (
docker-compose) running this branch.The button, in the existing top-right group. Only rendered when the pipeline has
user_data— with it (left) and without (right):user_datauser_dataThe pipeline page is otherwise untouched:
Object with a
description— markdown, with the remaining keys as YAML below:A bare string — rendered wholly as markdown:
Anything else — rendered wholly as YAML (note nesting, sequences, and
"#platform"quoted because#would otherwise start a comment):No
user_data— the route is still reachable by URL, so it has an empty state:Build fix
Adding
dillonkearns/elm-markdownsilently brokeyarn build-elm, producing a zero-byteelm.min.js— which is the fileindex.htmlloads, so the entire web UI rendered blank. Two faults combined:Markdown.InlineParser.isWhitespacematches U+2028 and U+2029. The Elm compiler emits Char literals verbatim, and both are line terminators in ECMAScript before ES2019, so a literal one inside a string literal is a syntax error to an ES5-era parser.uglify-jsis ES5-only and rejected the bundle withUnterminated string constant.build-elmpipeduglifyjs | uglifyjs --mangle --output. A shell pipeline reports the exit status of its last command, so the first stage dying left the second reading empty stdin and writing an empty file — exit 0, no output, broken bundle.hack/escape-js-line-separatorsrewrites those two characters to their escape sequences before minification (semantically identical), and the pipe is replaced with an intermediate file and&&so any stage's failure is fatal.This is what failed
concourse-ci/watsjson the earlier revision: with no Elm loaded the page never rendered, so every test timed out inbeforeEachwaiting for#user-id, includingsmoke > reaching the internet. I originally read that as unrelated CI flake and said so in a comment — that was wrong, and it's fixed here.Notes to reviewer
master; no conflicts.Release Note
user_datais now viewable in the web UI, from an info button on the pipeline page.