compute-pipeline-input test: random dataset ids can collide

Open Beginner friendly
#2,424 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
78/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
sqlite, typescript
Domain
cli, testing

Research direction

Read backend/test/compute-pipeline-input.test.ts around line 135 and ADR 0068 to understand the fixture band. Start by checking how freshId creates dataset ids and how the test stores them. Make ids unique within the fixture band, then run the compute-pipeline-input test and confirm the dataset uniqueness error no longer occurs.

Written by the indexing model from the issue text.

Description

backend/test/compute-pipeline-input.test.ts:135: freshId picks dataset ids at random, and two collided once in a local run (UNIQUE constraint failed: datasets.dataset_id). Found while fixing #2351 (#2423). Fix: allocate ids from a per-file counter or check for an existing row, inside the fixture band (ADR 0068).

Dominant language
TypeScript
Stars
0
Forks
1
Avg merge
6h 26m
Merged PRs (30d)
249

Getting set up

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.

More from nemarOrg/nemar-cli

All issues in nemarOrg/nemar-cli

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.