Skip to content
This repository was archived by the owner on Jun 13, 2021. It is now read-only.
This repository was archived by the owner on Jun 13, 2021. It is now read-only.

Render error of a variable with the colon, space and asterisk symbol #797

Open
@johnbizokk

Description

@johnbizokk

Description

When we are trying to parametrize the template with the variable, the value of which contains the colon, space (one or more), and asterisk symbol in a row - docker app binary produces a render error. The problem doesn't appear when we do not add the space between the colon and the asterisk symbols.

I also attached the working examples - see the Annex №4,5,6 below.

Steps to reproduce the issue:

  1. Have the docker-compose file with the following content - see the Annex №1 below.
  2. Have the parameters.yml file with the following content - see the Annex №2 below.
  3. Have the metadata.yml file with the following content - see the Annex №3 below.
  4. Execute the following render command - docker app render.

Describe the results you received:

Unfortunately, we've got the following error:
render failed: Action "com.docker.app.render" failed: yaml: did not find expected alphabetic or numeric character

Describe the results you expected:

We are expecting from the docker app binary to render the template correctly.

Output of docker version:

Client: Docker Engine - Community
 Version:           19.03.5
 API version:       1.40
 Go version:        go1.12.12
 Git commit:        633a0ea
 Built:             Wed Nov 13 07:22:37 2019
 OS/Arch:           windows/amd64
 Experimental:      true

Server: Docker Engine - Community
 Engine:
  Version:          19.03.5
  API version:      1.40 (minimum version 1.12)
  Go version:       go1.12.12
  Git commit:       633a0ea
  Built:            Wed Nov 13 07:29:19 2019
  OS/Arch:          linux/amd64
  Experimental:     true
 containerd:
  Version:          v1.2.10
  GitCommit:        b34a5c8af56e510852c35414db4c1f4fa6172339
 runc:
  Version:          1.0.0-rc8+dev
  GitCommit:        3e425f80a8c931f88e6d94a8c831b9d5aa481657
 docker-init:
  Version:          0.18.0
  GitCommit:        fec3683

Output of docker-app version:

Version:               v0.8.0
Git commit:            7eea32b7
Built:                 Wed Nov 13 07:39:54 2019
OS/Arch:               windows/amd64
Experimental:          off
Renderers:             none
Invocation Base Image: docker/cnab-app-base:v0.8.0

Output of docker info:

Client:
 Debug Mode: false
 Plugins:
  app: Docker Application (Docker Inc., v0.8.0)
  buildx: Build with BuildKit (Docker Inc., v0.3.1-tp-docker)

Server:
 Containers: XX
  Running: XX
  Paused: XX
  Stopped: XX
 Images: XX
 Server Version: 19.03.5
 Storage Driver: overlay2
  Backing Filesystem: tmpfs
  Supports d_type: true
  Native Overlay Diff: true
 Logging Driver: local
 Cgroup Driver: cgroupfs
 Plugins:
  Volume: local
  Network: bridge host ipvlan macvlan null overlay
  Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
 Swarm: inactive
 Runtimes: runc
 Default Runtime: runc
 Init Binary: docker-init
 containerd version: b34a5c8af56e510852c35414db4c1f4fa6172339
 runc version: 3e425f80a8c931f88e6d94a8c831b9d5aa481657
 init version: fec3683
 Security Options:
  seccomp
   Profile: default
 Kernel Version: 4.19.76-linuxkit
 Operating System: Docker Desktop
 OSType: linux
 Architecture: x86_64
 CPUs: XX
 Total Memory: XX.XGiB
 Name: docker-desktop
 ID: XXXX
 Docker Root Dir: /var/lib/docker
 Debug Mode: false
 Registry: https://index.docker.io/v1/
 Labels:
 Experimental: true
 Insecure Registries:
  127.0.0.0/8
 Live Restore Enabled: false
 Product License: Community Engine

Annex №1 (docker-compose.yml) - render error - group №1

version: '3.8'
services:
  application:
    x-enabled: "${enable-application}"
    image: "image"
    deploy:
      labels:
        traefik.frontend.headers.customResponseHeaders: "${application.headers}"

Annex №2 (parameters.yml) - render error - group №1

enable-application: true
application:
  headers: 'Access-Control-Allow-Origin: *'

Annex №3 (metadata.yml) - render error - group №1

version: 1.0.0
name: application
description: "application bundle"
namespace: "namespace"
maintainers:
  - name: Maintainer
    email: "[email protected]"

Annex №4 (docker-compose.yml) - successful render - group №2

version: '3.8'
services:
  application:
    x-enabled: "${enable-application}"
    image: "image"
    deploy:
      labels:
        traefik.frontend.headers.customResponseHeaders: "${application.headers}"

Annex №5 (parameters.yml) - successful render - group №2

enable-application: true
application:
  headers: 'Access-Control-Allow-Origin:*'

Annex №6 (metadata.yml) - successful render - group №2

version: 1.0.0
name: application
description: "application bundle"
namespace: "namespace"
maintainers:
  - name: Maintainer
    email: "[email protected]"

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions