Skip to content

Don't allow unsupported combinations of CPU and RAM #1191

@mattgallagher92

Description

@mattgallagher92

Farmer throws if an unsupported combination of CPU and RAM is configured for a container app.

let private supportedResourceCombinations =
Set [
0.25<VCores>, 0.5<Gb>
0.5<VCores>, 1.0<Gb>
0.75<VCores>, 1.5<Gb>
1.0<VCores>, 2.0<Gb>
1.25<VCores>, 2.5<Gb>
1.5<VCores>, 3.0<Gb>
1.75<VCores>, 3.5<Gb>
2.0<VCores>, 4.<Gb>
]

It's better that it throws rather than (presumably) failing on Azure. However, finding this out at runtime is annoying (particularly if it's only caught during pipeline execution) it'd be even nicer if it prevented an invalid configuration at compile time rather than at runtime.

My suggestion is:

  • Add new custom operation(s) that set both CPU and memory
  • Mark the old custom operations that set them individually as deprecated
  • Remove the old custom operations in the future

New API design TBD, suggestions welcome!

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