Skip to content

Rename -pixelsPerUnit to a clearer -pricingUnitSize flag #3949

Description

@rickstaa

What

Add -pricingUnitSize as the clearer primary flag for the pricing scale factor, and keep -pixelsPerUnit as a deprecated alias writing to the same config value (following the existing datadir/dataDir deprecation pattern).

pixelsPerUnit is really just a pricing scale factor: the number of work units that one quoted price covers (price_per_work_unit = pricePerUnit / pixelsPerUnit). The "pixels" name is transcoding-era legacy and is confusing for non-video / BYOC / general-runner workloads, where there are no pixels.

Why

The value is the size of one pricing unit, measured in work units. -pricingUnitSize reads as a matched set with -pricePerUnit / -maxPricePerUnit, makes the direction unambiguous (a larger value means a coarser price bucket), and stays self-documenting in config files and run commands. This matters for the live runner and other BYOC workloads where "pixels" has no meaning.

Changes

  • -pricingUnitSize flag (primary) + -pixelsPerUnit kept as a [Deprecated] alias to the same cfg.PixelsPerUnit.
  • Updated -pricePerUnit / -maxPricePerUnit help text to reference pricingUnitSize.
  • Unit test asserting both flags set PixelsPerUnit.

Compatibility

No wire or config-format changes. The proto field (PriceInfo.pixelsPerUnit), the config struct field, discovery JSON, and the pixels_per_unit / pixelsperunit keys in -maxPricePerCapability / -pricePerGateway JSON are all untouched. Only the user-facing flag is renamed, with the old name still accepted. A coordinated, versioned rename of the proto/JSON field is intentionally out of scope.

Implementation

Implemented in #3942.

Metadata

Metadata

Assignees

Labels

status: triagethis issue has not been evaluated yet

Type

No type

Fields

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