Skip to content

[MS-1093] Implement bulk session event generation and insertion logic#1295

Merged
meladRaouf merged 1 commit into
mainfrom
generate-bulk-events
Aug 5, 2025
Merged

[MS-1093] Implement bulk session event generation and insertion logic#1295
meladRaouf merged 1 commit into
mainfrom
generate-bulk-events

Conversation

@meladRaouf
Copy link
Copy Markdown
Collaborator

@meladRaouf meladRaouf commented Aug 4, 2025

JIRA ticket
Will be released in: 2025.3.0

Notable changes

This PR introduces the ability for developers and E2E tests to generate bulk session events using predefined SQL templates stored in the assets folder.
Instead of relying on the existing event repository (which maps events to DbEvent objects and was significantly slow—~1 minute for 15 sessions), this implementation uses raw SQL insertion templates. As a result, the same 15 sessions are now generated in approximately 450 milliseconds

Testing guidance

  • Check the module's README.md file for instructions on how to use the event generator and details on the available parameters.

Additional work checklist

  • Effect on other features and security has been considered
  • Design document marked as "In development" (if applicable)
  • External (Gitbook) and internal (Confluence) Documentation is up to date (or ticket created)
  • Test cases in Testiny are up to date (or ticket created)
  • Other teams notified about the changes (if applicable)

@cla-bot cla-bot Bot added the ... label Aug 4, 2025
@meladRaouf meladRaouf requested a review from luhmirin-s August 4, 2025 06:23
@meladRaouf meladRaouf force-pushed the generate-bulk-events branch from 3182cff to c145617 Compare August 4, 2025 06:23
@meladRaouf meladRaouf requested review from a team, BurningAXE, TristramN, alex-vt, alexandr-simprints and ybourgery and removed request for a team August 4, 2025 06:23
@meladRaouf meladRaouf force-pushed the generate-bulk-events branch from c145617 to bc8f44d Compare August 4, 2025 06:27
Copy link
Copy Markdown
Contributor

@luhmirin-s luhmirin-s left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added a couple of suggestions, otherwise looks great.

@@ -0,0 +1 @@
INSERT INTO DbEvent VALUES('__event_id__','AUTHORIZATION','__project_id__','__session_id__','{"id":"__event_id__","payload":{"createdAt":{"ms":1754153597998,"isTrustworthy":false},"eventVersion":2,"result":"AUTHORIZED","userInfo":{"projectId":"__project_id__","userId":{"className":"TokenizableString.Raw","value":"__module_id__"}},"type":"AUTHORIZATION"},"type":"AUTHORIZATION","scopeId":"__scope_id__","projectId":"__project_id__"}',1754153597998,0,NULL);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we format SQL files for improved readability?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes this is good Idea.
Done

@meladRaouf meladRaouf force-pushed the generate-bulk-events branch 2 times, most recently from 1a5125e to 006d20f Compare August 4, 2025 08:02
@meladRaouf meladRaouf force-pushed the generate-bulk-events branch from 006d20f to 904aea0 Compare August 4, 2025 08:11
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented Aug 4, 2025

@meladRaouf meladRaouf merged commit f06c614 into main Aug 5, 2025
22 of 23 checks passed
@meladRaouf meladRaouf deleted the generate-bulk-events branch August 5, 2025 06:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants