Repository navigation
Probe: what load-once caches hold after the login, in both kinds of session (runner issue 8945) - #1571
Open
StefanMaron wants to merge 7 commits into
Open
Probe: what load-once caches hold after the login, in both kinds of session (runner issue 8945)#1571StefanMaron wants to merge 7 commits into
StefanMaron wants to merge 7 commits into
Conversation
… login in both kinds of session (runner issue 8945) Cells: a cache reached through a wrapper's integration event, a cache loaded from the app's own setup rows into a List and a Dictionary, both together, a load that keeps the asked TableId, a watched list that holds User Login (9008), and login subscribers that change the rows the load reads. Claude-Session: https://claude.ai/code/session_01B5GPNVCdMf7ByZez1YeU96
…old whatever Microsoft's login writes first (runner issue 8945) Claude-Session: https://claude.ai/code/session_01B5GPNVCdMf7ByZez1YeU96
… kinds of session (runner issue 8945) Adds the cells L1 (partner memo with an empty setup, loaded on the write event path), E1 (Environment Information filled by two subscribers of one app), M1 (Application Area Cache), M2 (Conf./Personalization Mgt.), M3 (Change Log Management loaded inactive, then activated at login) and M4 (API Webhook Notification Mgt. cache) in the plain job and in the Tests-TestLibraries job. https://claude.ai/code/session_01B5GPNVCdMf7ByZez1YeU96
…ber (runner issue 8945) The login subscribers 98478 and 98479 wrote Change Log Setup in every client session. That is a Microsoft table (writer rule 12), and each write left Change Log Entry rows for table 402 that the put-back did not remove. The M3 test now activates the setup itself inside rolled-back blocks: first with triggers (Insert(true)/Modify(true)), on the cache the login loaded, then without triggers, then after InitChangeLog. It also checks that the setup row is the same before and after. Measured on a local BC 29.0 with Tests-TestLibraries: 0 entries with triggers, 0 without, 2 after InitChangeLog.
…945) Open corpus pull requests already claim table 97701 and codeunits 97707 and 97708. The new ids are free on master and in every open pull request. Claude-Session: https://claude.ai/code/session_01PQNbkr8JaH5QubJjYVRG4b
…ssue 8945) Two copies of the L1 memo with the guards a partner memo has: an empty company name and the setup table's read permission in the ask; an error-reporting call, an OnBefore event with Handled (Disabled and Loaded by var), the Disabled flag and a temporary record in the write path. Memo B passes each guard exit once before its first write event. Both end states are the same, whichever table loaded the memo. Claude-Session: https://claude.ai/code/session_01PQNbkr8JaH5QubJjYVRG4b
…ibraries job (runner issue 8945) CI run 45452409452: on BC 27.5 in the Tests-TestLibraries job at least one G3 ask before the test read took the read-permission exit (Yes); on 28.5 and 29.0, and in the plain job on all three, no ask did (No). Claude-Session: https://claude.ai/code/session_01PQNbkr8JaH5QubJjYVRG4b
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.
This probe measures what Business Central keeps in load-once caches after the login, for runner issue 8945.
First part: memo shapes (F cells)
What it measures, in a session that asks for table 9008 first and in one that does not:
Second part: caches that login subscribers fill (L1, G3, E1, M1-M4)
Tests:
tests/al-language/events/platform-triggers/LmLoginCacheTests.al(codeunits 75887 and 75888, plain job) andtests/al-language-testlibraries/test-framework/login-caches/LmLoginCacheTlTests.al(81597 and 81598, Tests-TestLibraries job). Both use the same reader and the same expected values. Login subscribers:tests/al-language-xapp-a/LmXaLoginCaches.al.Measured on a local BC 29.0 with Tests-TestLibraries installed, in both kinds of session, with the hub and the websocket runner:
Company Name: ''and an empty key. A setup row the test adds is not seen. Same in the second codeunit.Company Name: ''. The ask never saw an empty company name. It saw no missing read permission on BC 28.5 and 29.0 in both jobs and on BC 27.5 in the plain job. On BC 27.5 in the Tests-TestLibraries job, at least one ask before the test read took the read-permission exit (CI run 45452409452, both codeunits). The end states were still the same as on 28.5 and 29.0. The Tests-TestLibraries file asserts No under#if BC28PLUSand Yes in the#elsebranch (BC 27). For the runner this means the read-permission exit is reachable on BC 27 in that job; it is not dead code.M3 change in the last commit: an earlier version had two login subscribers that turned the change log on and back off in every session. They wrote Change Log Setup, which is a Microsoft table, and each session left Change Log Entry rows for table 402. The test now activates the setup itself, inside rolled-back blocks. The test's other writes to Microsoft tables (Application Area Setup, User Personalization, Change Log Setup) are all inside
asserterrorblocks and rolled back, likeFeatureKey_D_ModifyThenRollbackintests/al-language/metadata/platform-tables/AwTests.al.Expected test count per leg: 10 in the Cloud job (75887 + 75888) and 10 in the Tests-TestLibraries job (81597 + 81598).
CI run 45452409452 measured the plain job (no Backup Management) and BC 27.5 and 28.5. In the plain job all asserted L1 and G3 observations passed on all three versions, with the same expected values as the Tests-TestLibraries job, and 10 of 10 tests passed per leg. The four G3 observations that the tests ignore (A loaded by, A load table, B load table, A loaded before the login subscriber) are not visible in a passing run, so they are not measured in the plain job. The only difference was the G3 read-permission exit on 27.5 in the Tests-TestLibraries job (see G3).
Compile check: BC 29.0 compiles. BC 27.5 and 28.5 show only the known error in pages/statistics-compatibility (the 'Statistics' action), which this branch does not touch. The compile check does not build the Tests-TestLibraries app; its new
#if BC28PLUS/#elseblock holds onlyObserver.Expectlines.The same CI run had one failure outside this pull request:
MinRowVersion_FunctionIsolation_FirstTest(BC 29.0, shard 3,tests/al-language/metadata/platform-tables/MinimumActiveRowVersionStages.al), observation 1a first min/last+1wasless, expectedsame. That observation reads a database-wide value: any open write transaction in any session at that moment givesless. I don't think this pull request caused it: the shard ran the same codeunits in the same order as the earlier green run of this branch (run 45361142509) and as the master nightly run 45383544930, where all 8 MinRowVersion tests passed. In the failing shard, the two first tests of the same file that ran right before it (97987 and 97988) passed, and so did all MinRowVersion tests on BC 27.5 and 28.5. The XApp A code added since the green run writes no database table (only temporary records, and reads of Environment Information, Application Area Setup and the user's profile). I did not find this failure in the 13 other failed runs of the last day. The new CI run on the final commit shows whether it comes back.Generated by an AI agent (Claude) working for Stefan Maron.