Skip to content

aggregate: resolve the workload source from the stored test run #61

Description

@serhiy-bzhezytskyy

Is your feature request related to a problem?

Follow-up from #60, where @janhoy suggested this as a separate improvement:

It would of course be elegant if we auto resolved the workload location from the stored run. Perhaps as a separate improvement in addition to this more explicit one?

Today aggregate needs to be told where the workload lives (--workload-repository, or --workload-path after #60), even though it already knows which workload the runs used. The aggregator reads the workload name from the stored test run, then loads the workload spec to walk its schedule — so the name comes from the run but the location comes from the command line.

Describe the solution you'd like

aggregate resolves the workload source from the stored test run, so neither flag is needed in the common case. The flags stay as an override for the case where the workload has since moved.

Additional context — what this actually requires

Worth stating up front, because it is more than reading an existing field. The stored test run keeps the workload name, params and revision, but not where it came from:

  • TestRun.as_dict() persists workload, workload-params and workload-revision (metrics.py), and from_dict() restores those three.
  • Neither the repository name nor the workload path is persisted, so there is currently nothing in test_run.json that says whether the run used the default repository, a different repository, or a local directory.

So the work is roughly:

  1. Persist the workload source in TestRun.as_dict() / restore it in from_dict().
  2. Have the aggregator prefer the stored source, falling back to the flags.
  3. Handle test runs written before the change, which will not carry the field. There is existing precedent for that kind of grace period in metrics.py (# TODO: cluster is optional for BWC. This can be removed after some grace period.).

Two things that probably need a decision before implementation:

I can work on it once there is a view on those two points — mainly whether the new field should be optional-with-fallback indefinitely or on a deprecation clock, and whether it is worth raising with OSB first.

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