getporter/porter

Cannot remove parameters in subsequent versions of bundles

Closed this issue · 0 comments

Describe the bug

If I have a bundle that takes a parameter in one version, it does not seem possible to upgrade to another version of the same bundle where the parameter has been deleted.

I see many scenarios where bundles need to evolve over time and remove parameters that are no longer needed/valid.

To Reproduce

Steps to reproduce the behavior:

  1. mkdir ~/param-bug

  2. porter create

  3. Edit porter.yaml to contain:
parameters:
  - name: testparam
    description: "A test param"
    type: string
    applyTo:
      - install
      - upgrade
  1. porter build

  2. porter install

  3. Modify porter.yaml again and bump the version to 0.2.0 and remove the parameters section added in step 3.
  4. porter build

  5. porter upgrade

Expected behavior

I would be able to perform an upgrade

Porter Command and Output

~/param-bug$ porter upgrade
could not apply options to installation: parameter testparam not defined in bundle
could not apply options to installation: parameter testparam not defined in bundle

Version

porter v1.0.14 (0e739d8)