Skip to content

Screenshots from a new run are added to the same build when scenarioName is provided #347

@sumeetp26

Description

@sumeetp26

Description

When scenarioName is set to the same value as the screenshot/image name and platform + env are not provided, VRT reuses the existing build on a subsequent run instead of creating a new one. As a result, screenshots from the new run are appended to the previous build rather than being tracked as a separate run.

Steps to Reproduce

  1. Create a test run with:
    • ciBuildId set to some build identifier
    • scenarioName set to the same value as the screenshot/image name
    • platform and env left unset / not provided
  2. Submit screenshots — build is created and screenshots are associated correctly.
  3. Trigger a new run (new CI execution) with the same configuration.
  4. Observe that the new screenshots are added into the existing build instead of a new one being created.

Expected Behavior

A new run should always create a new build entry. The build resolution logic should not reuse an existing build when a fresh run is initiated, regardless of whether scenarioName matches the screenshot name and platform/env are absent.

Actual Behavior

When scenarioName equals the screenshot name and platform/env are omitted, VRT finds the existing build by matching on scenarioName alone and appends new run screenshots to it instead of creating a new build.

Root Cause (suspected)

The build lookup query likely matches on scenarioName without also requiring a unique run identifier, causing it to collide when platform and env are null/empty and the scenarioName mirrors the image name.

Impact

  • Build history is polluted with screenshots from multiple runs merged into one build.
  • Difficult to distinguish which screenshots belong to which CI execution.

Environment

  • Self-hosted on GCP VM via Docker Compose
  • VRT backend: 5.1.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    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