Commit 0c85c36
authored
fix: retry LookupAccountName with exponential backoff to prevent ERROR_NONE_MAPPED on fresh EC2 instances (#262)
* fix: avoid LookupAccountName for SYSTEM user in named pipe security attributes
When CodeBuild Windows integration tests run with LOGNAME=SYSTEM, getpass.getuser()
returns "SYSTEM" and the subsequent LookupAccountName("", "SYSTEM") call fails with
ERROR_NONE_MAPPED (1332) on freshly started reserved-fleet EC2 instances because the
LSA service hasn't finished initializing.
SYSTEM (S-1-5-18) is a well-known SID constant that never varies across Windows
machines. Use ConvertStringSidToSid("S-1-5-18") to bypass the LSA lookup entirely,
consistent with how the network SID (S-1-5-2) is already handled in the same method.
Fixes intermittent Windows integration test failures in deadline-cloud-for-cinema-4d
and 6 other DCC repos that share the LOGNAME=SYSTEM CodeBuild workaround.
Signed-off-by: leon-li-inspire <2182521+leon-li-inspire@users.noreply.github.com>
* style: fix black formatting in test_named_pipe_helper.py
Signed-off-by: Leon Li <2182521+leon-li-inspire@users.noreply.github.com>
* fix: use real PySID in tests to prevent TypeError on Windows
LookupAccountName mock must return a real PySID object (not a string)
because downstream code passes it to dacl.AddAccessAllowedAce() which
validates the type on Windows.
Signed-off-by: Leon Li <2182521+leon-li-inspire@users.noreply.github.com>
* chore: remove CHANGELOG entry, will be auto-generated at release
Signed-off-by: Leon Li <2182521+leon-li-inspire@users.noreply.github.com>
---------
Signed-off-by: leon-li-inspire <2182521+leon-li-inspire@users.noreply.github.com>
Signed-off-by: Leon Li <2182521+leon-li-inspire@users.noreply.github.com>1 parent cd2178c commit 0c85c36
2 files changed
Lines changed: 57 additions & 7 deletions
File tree
- src/openjd/adaptor_runtime_client/named_pipe
- test/openjd/adaptor_runtime/unit/named_pipe
Lines changed: 17 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
128 | 128 | | |
129 | 129 | | |
130 | 130 | | |
131 | | - | |
132 | | - | |
133 | | - | |
134 | | - | |
135 | | - | |
136 | | - | |
137 | | - | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
138 | 148 | | |
139 | 149 | | |
140 | 150 | | |
| |||
Lines changed: 40 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
100 | 100 | | |
101 | 101 | | |
102 | 102 | | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
0 commit comments