engine_report doesn't output valid yaml

Bug #1937112 reported by Simon Richardson
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Canonical Juju
Triaged
Low
Unassigned

Bug Description

Engine reports don't output valid yaml, even though we yaml.Marshal the content. This requires tools that consume the engine reports to jump over the non-yaml headers of the reports.

The fix is simple[1]:

diff --git a/worker/introspection/worker.go b/worker/introspection/worker.go
index 6105381a4f..6961b1043b 100644
--- a/worker/introspection/worker.go
+++ b/worker/introspection/worker.go
@@ -245,7 +245,7 @@ func (h depengineHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {

        w.Header().Set("Content-Type", "text/plain; charset=utf-8")

- fmt.Fprint(w, "Dependency Engine Report\n\n")
+ fmt.Fprint(w, "# Dependency Engine Report\n\n")
        _, _ = w.Write(bytes)
 }

1. https://github.com/juju/juju/blob/8b080b830f5d7138743e7f2b554439e5be535cc8/worker/introspection/worker.go#L248

Revision history for this message
Simon Richardson (simonrichardson) wrote :

We can leave the test/plain content-type as this generally gets saved to a file and we don't care about this.

John A Meinel (jameinel)
Changed in juju:
importance: Undecided → Medium
status: New → Triaged
Revision history for this message
Canonical Juju QA Bot (juju-qa-bot) wrote :

This Medium-priority bug has not been updated in 60 days, so we're marking it Low importance. If you believe this is incorrect, please update the importance.

Changed in juju:
importance: Medium → Low
tags: added: expirebugs-bot
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.