-
Notifications
You must be signed in to change notification settings - Fork 21
Open
Milestone
Description
The otava regressions command supports an optional --branch argument, which specifies the feature branch to compare against the base branch.
Problem
The current implementation has several limitations:
- The feature-branch logic is implemented at the importer level, which forces every importer to either implement it or explicitly raise
NotImplementedError(as is currently the case). - The Graphite importer relies on custom interpolation logic for the
$BRANCHenvironment variable. - There is no way to configure the base branch name.
These limitations lead to several undesirable consequences:
- To configure a custom base branch, we we must manually expand the
$BRANCHenvironment variable (viaexpandvars). PostgreSQL example and e2e test illustrate this problem. - Feature-branch testing is not supported by importers other than Graphite.
- Importer behavior is inconsistent and difficult to reason about.
Proposed Solution
CLI API Changes
Replace the existing --branch argument with two explicit arguments:
-
--base-branch
Specifies the base branch to compare against.
Default:main -
--feature-branch
Specifies the feature branch to compare.
No default.
Usage semantics:
- If only
--base-branchis provided, it overrides the default base branch and tests for regressions within that branch. - If both
--base-branchand--feature-branchare provided, Otava tests the feature branch for regressions relative to the base branch. - If only
--feature-branchis provided, Otava compares the feature branch against the default base branch (main).
Configuration Interpretation Changes
regressionscommand
Otava expands the$BRANCHvariable using both the base and feature branch values.analysiscommand
Otava expands$BRANCHusing the value provided via--branch, following the same mechanism as otherConfigArgParse-controlled options.
Metadata
Metadata
Assignees
Labels
No labels