Skip to content

Avoid session sidecars for in-memory storage - #1535

Open
bmehta001 wants to merge 7 commits into
microsoft:mainfrom
bmehta001:bhamehta/avoid-in-memory-session-sidecar
Open

bmehta001 wants to merge 7 commits into
microsoft:mainfrom
bmehta001:bhamehta/avoid-in-memory-session-sidecar

Conversation

@bmehta001

Copy link
Copy Markdown
Contributor

Summary

  • treat SQLite's :memory: cache path as non-file-backed for session data
  • prevent creation or deletion attempts for a physical :memory:.ses sidecar
  • add regression coverage for create, reset, and delete

Borrowed from the fix in microsoft/onnxruntime#32538, where ONNX Runtime currently carries this as a dependency patch. This upstreams the behavior so consumers can receive it without maintaining a local patch.

Validation

  • WSL/Ubuntu 24.04: LogSessionDataFuncTests.* (5/5 passed)
  • Windows/Visual Studio 2026: changed production and test translation units compile; the existing functional-test target then fails to link on unresolved AITelemetrySystem because Azure Monitor headers are auto-detected while its implementation is not linked
  • git diff --check
  • clang-format 20.1.8 on changed line ranges

Treat SQLite's :memory: cache path as non-file-backed so telemetry fallback does not leave a physical .ses file in the working directory.

Files changed:
- lib/offline/LogSessionDataProvider.cpp
- tests/functests/LogSessionDataFuncTests.cpp

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: f2382f49-919c-48fe-b04f-5c2b9b2c744c
bmehta001 and others added 2 commits September 14, 2026 13:52
Generate ephemeral session metadata when SQLite uses :memory: so session events remain valid without creating a sidecar file.

Files changed:
- lib/offline/LogSessionDataProvider.cpp
- tests/functests/LogSessionDataFuncTests.cpp

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: f2382f49-919c-48fe-b04f-5c2b9b2c744c
@bmehta001

Copy link
Copy Markdown
Contributor Author

Fixed the cross-platform LoggerTests.LogSession_CanEventPropertiesBeSentReturnsTrue_CallsSubmit failure in 89ebcc5. The :memory: path now generates ephemeral session timestamp/UID values while still suppressing the .ses sidecar. The exact failing unit test and the strengthened in-memory sidecar functional test pass on both Visual Studio 2026 and WSL.

@bmehta001 bmehta001 self-assigned this Sep 14, 2026
bmehta001 and others added 4 commits September 14, 2026 16:38
Reference the cache path directly after removing the local inMemory variable, restoring compilation across all native targets.

Files changed:
- lib/offline/LogSessionDataProvider.cpp

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: f2382f49-919c-48fe-b04f-5c2b9b2c744c
Adapt legacy SQLite targets produced by older CMake FindSQLite3 modules and stop Android setup from requesting the removed tools package.

Files changed:
- .github/workflows/build-android.yml
- .github/workflows/codeql-analysis.yml
- cmake/MSTelemetryConfig.cmake.in
- cmake/MatsdkDependencyTargets.cmake

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: f2382f49-919c-48fe-b04f-5c2b9b2c744c
@bmehta001

Copy link
Copy Markdown
Contributor Author

Merged #1532 and fixed the two deterministic CI regressions from its new main state in 6bc46bf: older CMake FindSQLite3 modules are adapted from SQLite::SQLite3 to SQLite3::SQLite3, and Android setup no longer requests the removed SDK ools package. Local validation: installed system-package consumer 10/10 on CMake 3.28; focused session tests pass on Visual Studio 2026.

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.

1 participant