update-clouds strips "DO NOT EDIT" warning

Bug #1569529 reported by Aaron Bentley
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Canonical Juju
Expired
Medium
Unassigned

Bug Description

Using a juju that had been tweaked to use https://s3.amazonaws.com/temp-streams/clouds/clouds.syaml rather than the streams.canonical.com location, I ran update-clouds. ~/.local/share/juju/public-clouds.syaml was updated, but the comment at the top was stripped.

This comment read: # DO NOT EDIT, will be overwritten, use “juju update-clouds” to refresh.

AIUI, this warning is meant to be present in local copies of clouds.syaml. It was provided in juju-core's cloud/fallback-public-cloud.yaml on which https://s3.amazonaws.com/temp-streams/clouds/clouds.syaml was based.

There are other formatting differences, but no content differences, leading me to think that the syaml file was parsed and then dumped from structured data, rather than being copied verbatim. This process would naturally strip comments as well.

There are several ways to address this
- Make the local copy a verbatim copy, with signature intact
- Make the local copy a verbatim copy of the body, with the signature stripped
- Prepend a new copy of the warning when dumping
- Use clouds.yaml and clouds.yaml.pgp as the source, and make local a verbatim copy of clouds.yaml.
- Use a comment-preserving yaml parser/dumper

Aaron Bentley (abentley)
description: updated
Aaron Bentley (abentley)
tags: added: ci
affects: juju-core → juju
Revision history for this message
Canonical Juju QA Bot (juju-qa-bot) wrote :

This bug has not been updated in 5 years, so we're marking it Expired. If you believe this is incorrect, please update the status.

Changed in juju:
status: Triaged → Expired
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.