Visual-Regression-Tracker / Visual-Regression-Tracker/backend

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

Open
#347 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
15
Forks
18
Avg merge
15h 50m
Merged PRs (30d)
2

Description

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

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No source file or test is named. Start by tracing the backend build-resolution path for submissions using ciBuildId, scenarioName, platform, and env, then reproduce the two-run case described here. Done means separate runs create separate build entries and the relevant regression coverage passes.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.