Repository navigation
test: make the timeDecay boost test meaningful and await users role setup - #496
Open
dudanogueira wants to merge 1 commit into
Open
dudanogueira wants to merge 1 commit into
dudanogueira wants to merge 1 commit into
Conversation
…etup The timeDecay boost decays from 2024-01-01 with a 35d scale, but every object's createdAt was within the last 14 days, so each decay was ~1e-20 and the boost had no effect; the test passed only because the near-zero values happened to break the tie between the two objects with the same vector. Spread createdAt around the origin so the object at the origin gets a real boost. beforeAll in the users suite fired roles.delete / roles.create without awaiting them, so the role-assignment tests could start before the test role existed.
There was a problem hiding this comment.
Orca Security Scan Summary
| Status | Check | Issues by priority | |
|---|---|---|---|
| Infrastructure as Code | View in Orca | ||
| SAST | View in Orca | ||
| Secrets | View in Orca | ||
| Vulnerabilities | View in Orca |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Ports the two fixes from #486 that still apply to
mainafter thepackages/restructure (#307). #486 now targetsweaviate-client, which still has the oldtest/layout.timeDecay boost test (
packages/test/node/query/integration.test.ts)The boost decays from
2024-01-01with a35dscale, but #307 setcreatedAtto 14 days ago, 7 days ago and now. That is about 29 scale-lengths from the origin, so every object's decay factor is around 1e-20 and the boost has no real effect.not.toEqual(baseline)passes only because the near-zero values happen to break the tie betweenblueandgreen, which share a vector.createdAtis now spread around the origin (origin, +30d, +1y), sored, which is at the origin and ranks last on vector distance alone, gets a real boost.users (
packages/test/node/users/integration.test.ts)beforeAllfiredroles.delete/roles.createwithout awaiting them, so the role-assignment tests could start before thetestrole existed. This failed onmainon 9 Oct ("should be able to assign a role to a user").Testing
eslint and prettier pass. The boost suite passed 3 out of 3 runs locally against Weaviate 1.38.2. The users suite needs the RBAC instance on :8091 and is covered by CI.