redis-developer / redis-developer/redis-vl-typescript
Log a warning when `path` is supplied on HASH storage
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 1
- Forks
- 3
- Avg merge
- 34m
- Merged PRs (30d)
- 3
Description
IndexSchema.makeField currently has a silent TODO:
// src/schema/schema.ts:206
} else {
// For HASH storage, path should always be null
if (path !== null && path !== undefined) {
// TODO: log a warning
}
field.path = null;
}
Users who set a JSON path on a HASH-storage field get their value silently dropped. A warning would surface the misconfiguration.
Acceptance criteria
- Warn (via
console.warnor a logger if one is introduced) when a non-emptypathis supplied for a HASH-storage field. - Include the field name and the storage type in the warning.
- Unit test covering the warning surface.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at src/schema/schema.ts:206 in IndexSchema.makeField and inspect the existing HASH-storage path handling. Add coverage to the relevant unit tests for a non-empty path, checking that the warning includes the field name and storage type; also verify that empty or absent paths do not warn. Done means the misconfiguration is surfaced without changing the existing null path behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- databases
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 68/100