Skip to content

Schema update for nested upgrades (specifically for packages) #498

Description

@afontani

Is your feature request related to a problem? Please describe.
In our SDR yaml file we use a lot of anchors and aliases. This is great, but I feel like the schema is limited.

Here is an example upgrade package with sub-packages.

# Upgrade sub-package 1
- upgrade_name: Dual-Speed Geothermal Heat Pump with Thermally Enhanced Grout and Pipes
    package_apply_logic: *remove_nonducted_high_rise_shared
    options:
      - *dual_speed_ducted_ghp
      - *heat_pump_cooling_efficiency_ducted
      - *partial_conditioning_100_percent_ducts_only

# Upgrade sub-package 2
  - upgrade_name: Attic Floor Insulation for Unfinished Attics
    options: 
    - *attic_insulation_iecc_cz1a
    - *attic_insulation_iecc_cz2a_2b_3a_3b_3c
    - *attic_insulation_iecc_cz4b_4b_4b_5b_5b_6b_6b_7a_7b

# Package combining upgrade sub-package 1 and upgrade subpackage 2 
- upgrade_name: Package - Dual-Speed Geothermal Heat Pump with Thermally Enhanced Grout and Pipes with Attic Floor Insulation
    package_apply_logic: *remove_nonducted_high_rise_shared
    options:
      ### -- Dual-Speed Ducted GHP -- ###
      - *dual_speed_ducted_ghp
      - *heat_pump_cooling_efficiency_ducted
      - *partial_conditioning_100_percent_ducts_only
      ### -- Attic Floor Insulation -- ###
      - *attic_insulation_iecc_cz1a
      - *attic_insulation_iecc_cz2a_2b_3a_3b_3c
      - *attic_insulation_iecc_cz4b_4b_4b_5b_5b_6b_6b_7a_7b

The above example is valid and can be run. However, If the "Attic Floor Insulation for Unfinished Attics" package is updated, the modification does not translate to the package automatically. This could lead to errors moving forward if there are inconsistent definitions with upgrades (Attic Floor Insulation does not mean the same thing between the sub-package 2 and the package upgrade.

Describe the solution you'd like
I would like to be able to supply a set of nested upgrades.

Something that would look like this:

- upgrade_name: Package - Dual-Speed Geothermal Heat Pump with Thermally Enhanced Grout and Pipes with Air Sealing with Attic Floor Insulation
  - nested_upgrades:
    - Attic Floor Insulation for Unfinished Attics
    - Dual-Speed Geothermal Heat Pump with Thermally Enhanced Grout and Pipes

Where the nested_upgrades will combine the options and package_apply_logic of the upgrades listed. In this situation, if either one of the dual-speed ducted ghp upgrade or the attic floor insulation upgrade gets updated, the package that combines the two upgrades gets updated automatically.

Describe alternatives you've considered
None yet. My solution might not be right, but hopefully it is clear enough.

Additional context

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions