Skip to content

Reapply: extend session events to cover raw connections and commands - #497

Closed
dagreen-st wants to merge 10 commits into
master-servicetitanfrom
reapply-async-events-493
Closed

Reapply: extend session events to cover raw connections and commands#497
dagreen-st wants to merge 10 commits into
master-servicetitanfrom
reapply-async-events-493

Conversation

@dagreen-st

@dagreen-st dagreen-st commented Aug 5, 2026

Copy link
Copy Markdown
Collaborator

Summary

Reapplies #493, which was reverted after merge (commits 8e9144d and 1f127aa). This PR is a straight revert-of-the-reverts — no changes beyond restoring the original diff.

Discussion: https://servicetitan.enterprise.slack.com/archives/C0BP3S50BGQ

dagreen-st and others added 10 commits July 31, 2026 15:49
The ORM's own DbCommandExecuting/Executed events only fire for
commands run through its own execution path, and there was no hook
for a connection's first genuine open or for a raw connection handed
out without a DbCommand. Code using DirectSqlAccessor, or needing the
raw connection directly, had no way to observe any of this.

Adds a DbConnectionOpened event fired on the Closed to Open
transition, an EventNotifyingDbCommand wrapper so
DirectSqlAccessor.CreateCommand() raises the same execute events ORM
commands do, and an async GetConnectionAsync with an awaitable
raw-connection-accessed hook so callers that need the connection
itself can hook in without blocking a thread.
Five workflows still built Orm.sln, which was removed by the .slnx
migration (#386), so every push to master-servicetitan has been
failing CI with MSB1009. Points all of them at Orm.slnx instead.
The gawk pattern expected a 4-part version (x.y.z.w) to find a build
number to increment, but Version.props now uses a 3-part scheme
(e.g. 7.3.24), so it silently matched nothing and left the file
unchanged. Matches through the second dot and increments the patch
component instead.
fix CI build workflows to reference Orm.slnx
@dagreen-st

dagreen-st commented Aug 5, 2026

Copy link
Copy Markdown
Collaborator Author

superseded by #498

@dagreen-st dagreen-st closed this Aug 5, 2026
Comment thread Version.props
<PropertyGroup>
<DoVersion>7.3.24</DoVersion>
<DoVersion>7.3.25</DoVersion>
<DoVersionSuffix>servicetitan</DoVersionSuffix>

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Suggested change
<DoVersionSuffix>servicetitan</DoVersionSuffix>
<DoVersionSuffix>servicetitan-test-async</DoVersionSuffix>

@dagreen-st
dagreen-st deleted the reapply-async-events-493 branch August 5, 2026 18:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants