cf-platform-eng/tile-generator

Multi-line strings are not being preserved properly

Closed this issue · 1 comments

I have a multi-line description in tile.yml:

forms:
# <snip>
- name: compatibility
  label: Compatibility
  description: Legacy Compatibility Options
  properties:
  - name: gsb_compatibility_three_to_four
    type: boolean
    default: false
    label: Compatibility with GCP Service Broker v3.X
    description: |-
      Enable compatibility with the GCP Service Broker v3.x.
      Before version 4.0, each installation generated its own plan UUIDs, after 4.0 they have been standardized.
      This option installs a compatibility layer which checks if a service is using the correct plan GUID.
      If the service does not use the correct GUID, the request will fail with a message about how to upgrade.
    configurable: true

When running tile build I get the following:

DeprecationWarning: gcp_service_broker expected, got gcp-service-broker !!!

name: gcp-service-broker
label: Google Cloud Platform Service Broker
description: A service broker for Google Cloud Platform services
version: 4.0.3
sha1: False
stemcell: ubuntu-trusty 3586

bosh init-release
bosh generate-package gcp-service-broker
bosh add-blob /HOME/go/src/github.com/GoogleCloudPlatform/gcp-service-broker/release/gcp-service-broker/blobs/gcp-service-broker/gcp-service-broker.zip gcp-service-broker/gcp-service-broker.zip
bosh generate-package cf_cli
bosh add-blob /HOME/go/src/github.com/GoogleCloudPlatform/gcp-service-broker/release/gcp-service-broker/blobs/cf_cli/cf-linux-amd64.tgz cf_cli/cf-linux-amd64.tgz
bosh add-blob /HOME/go/src/github.com/GoogleCloudPlatform/gcp-service-broker/release/gcp-service-broker/blobs/cf_cli/all_open.json cf_cli/all_open.json
bosh generate-job deploy-all
bosh generate-job delete-all
bosh upload-blobs
release/gcp-service-broker
/bin/sh: /tmp/_MEIc6lfPf/libtinfo.so.5: no version information available (required by /bin/sh)
/HOME/go/src/github.com/GoogleCloudPlatform/gcp-service-broker/.git
bosh create-release --force --final --tarball gcp-service-broker-4.0.3.tgz --version 4.0.3
Building a release from directory '/HOME/go/src/github.com/GoogleCloudPlatform/gcp-service-broker/release/gcp-service-broker':
  - Constructing jobs from manifest:
      - Reading job from '/HOME/go/src/github.com/GoogleCloudPlatform/gcp-service-broker/release/gcp-service-broker/jobs/delete-all':
          Collecting job files:
            Unmarshalling job spec '/HOME/go/src/github.com/GoogleCloudPlatform/gcp-service-broker/release/gcp-service-broker/jobs/delete-all/spec':
              yaml: line 105: could not find expected ':'
      - Reading job from '/HOME/go/src/github.com/GoogleCloudPlatform/gcp-service-broker/release/gcp-service-broker/jobs/deploy-all':
          Collecting job files:
            Unmarshalling job spec '/HOME/go/src/github.com/GoogleCloudPlatform/gcp-service-broker/release/gcp-service-broker/jobs/deploy-all/spec':
              yaml: line 105: could not find expected ':'

Exit code 1

This is caused by the multiline description not being handled correctly:

$ cat -n /HOME/go/src/github.com/GoogleCloudPlatform/gcp-service-broker/release/gcp-service-broker/jobs/delete-all/spec
# snip
    97	    description: A comma delimited list of roles (minus the role/ prefix) that can be used when creating bound users for this service
    98	  gsb_service_google_spanner_whitelist:
    99	    description: A comma delimited list of roles (minus the role/ prefix) that can be used when creating bound users for this service
   100	  gsb_service_google_storage_whitelist:
   101	    description: A comma delimited list of roles (minus the role/ prefix) that can be used when creating bound users for this service
   102	  gsb_compatibility_three_to_four:
   103	    description: Enable compatibility with the GCP Service Broker v3.x.
   104	Before version 4.0, each installation generated its own plan UUIDs, after 4.0 they have been standardized.
   105	This option installs a compatibility layer which checks if a service is using the correct plan GUID.
   106	If the service does not use the correct GUID, the request will fail with a message about how to upgrade.
   107	  bigtable_custom_plans:
   108	    description: bigtable_custom_plans
# snip

Versions:

$ tile --version
tile version 12.0.7
$ bosh --version
version 5.1.1-a6a06002-2018-08-07T16:31:00Z

This can be fixed manually in the short term, but our tile forms are auto-generated because it helps reduce mistakes so it would be awesome to have this fixed or if nothing else have the field validated ahead of time.

We have created an issue in Pivotal Tracker to manage this. Unfortunately, the Pivotal Tracker project is private so you may be unable to view the contents of the story.

The labels on this github issue will be updated when the story is started.