-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Improve seeds 3 #12740
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve seeds 3 #12740
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR Summary
Major update to workspace seeding functionality, replacing static test data with dynamic generators and improving data distribution.
- Implemented sophisticated message seeding with 600 messages across threads, realistic timestamps, and weighted channel distribution (40% Tim, 20% Jony, etc.)
- Added 800 calendar events generated from 12 templates with realistic business hours, including proper participant distribution and response statuses
- Reorganized workspace configurations to support different metadata seeds per workspace (Apple vs YCombinator)
- Fixed custom object seeding issue by preventing duplicate view creation and ensuring correct icon assignment
14 files reviewed, 11 comments
Edit PR Review Bot Settings | Greptile
...ver/src/engine/workspace-manager/dev-seeder/metadata/services/dev-seeder-metadata.service.ts
Show resolved
Hide resolved
...src/engine/workspace-manager/dev-seeder/data/constants/calendar-event-data-seeds.constant.ts
Show resolved
Hide resolved
...server/src/engine/workspace-manager/dev-seeder/data/constants/message-data-seeds.constant.ts
Outdated
Show resolved
Hide resolved
...rver/src/engine/workspace-manager/dev-seeder/core/services/dev-seeder-permissions.service.ts
Outdated
Show resolved
Hide resolved
...c/engine/workspace-manager/dev-seeder/data/constants/calendar-channel-data-seeds.constant.ts
Show resolved
Hide resolved
...manager/dev-seeder/data/constants/message-channel-message-association-data-seeds.constant.ts
Show resolved
Hide resolved
...manager/dev-seeder/data/constants/message-channel-message-association-data-seeds.constant.ts
Show resolved
Hide resolved
...manager/dev-seeder/data/constants/message-channel-message-association-data-seeds.constant.ts
Outdated
Show resolved
Hide resolved
...-manager/dev-seeder/data/constants/calendar-channel-event-association-data-seeds.constant.ts
Show resolved
Hide resolved
...-manager/dev-seeder/data/constants/calendar-channel-event-association-data-seeds.constant.ts
Show resolved
Hide resolved
🚀 Preview Environment Ready! Your preview environment is available at: http://bore.pub:45653 This environment will automatically shut down when the PR is closed or after 5 hours. |
73be95f
to
d994e42
Compare
…/data/constants/message-data-seeds.constant.ts Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
…/metadata/services/dev-seeder-metadata.service.ts Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR Summary
Enhanced test suite and seeding improvements with focus on data validation and predictability.
- Fixed seeding inconsistency in
message-channel-message-association-data-seeds.constant.ts
whereDate.now()
usage created non-deterministic seeds across environments - Updated calendar events test expectations from 1 to 60 records in
calendar-events.integration-spec.ts
for better coverage - Improved view identification in object records permissions test by using stable name ('All Pets') instead of volatile icon property
- Added null check validation for workspace configuration in
dev-seeder-metadata.service.ts
to prevent runtime errors - Enhanced timeline activity seeding with proper batching and improved type safety in activity name formatting
7 files reviewed, 1 comment
Edit PR Review Bot Settings | Greptile
const timelineActivityId = this.generateTimelineActivityId( | ||
entityType, | ||
index + 1, | ||
); | ||
const creationDate = new Date().toISOString(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
style: Using new Date() for creation dates will make seeds non-deterministic. Consider using a fixed date or deriving from the index
Hello there, encountering some flakiness on related updated tests from this PR in this ci https://github.com/twentyhq/twenty/actions/runs/15775251585/attempts/1?pr=12755 |
@prastoin thanks for the ping - will raise a fix! |
Uh oh!
There was an error while loading. Please reload this page.