replicatedhq/ship

Config Options of type "label" should not be written to state.json

Offen

#906 geöffnet am 10.04.2019

 (1 Kommentar) (0 Reaktionen) (0 zugewiesene Personen)Go (68 Forks)auto 404
good first issuetype::bug

Repository-Metriken

Stars
 (635 Sterne)
PR-Merge-Metriken
 (PR-Metriken ausstehend)

Beschreibung

Expected behavior

With this config item:

      - name: https_label
        when: '{{repl ConfigOptionEquals "enable_ssl" "1" }}'
        title: Requests will be encrypted. HTTP requests will be redirected to HTTPS.
        type: label

is used, it should not have any effect on state.json, as its merely around presentation logic.

Actual behavior

The following is added to state.json#config.v1

      "https_label": "",

Information

  • Ship version: 0.39.0

Steps to reproduce

Use the following ship.yaml

assets:
  v1: []

config: 
  v1:
    - name: group
      items: 
      - name: https_label
        when: '{{repl ConfigOptionEquals "enable_ssl" "1" }}'
        title: Requests will be encrypted. HTTP requests will be redirected to HTTPS.
        type: label

lifecycle:
  v1:
     - config: {}
     - render: {}

and then

ship init path/to/yaml

then inspect state.json

cat .ship/state.json

Contributor Guide