Repository navigation
Commit 193df0f
fix(processing): respect session region when waiting for processing jobs (#6369)
Processor.run / FrameworkProcessor.run waited via self.latest_job.wait(),
whose generated refresh() resolves a default, global SageMaker client
(Base.get_sagemaker_client()) rather than the region of the sagemaker_session
that created the job. With a non-default-region session the wait/describe
and log tailing hit the wrong region and fail (issue #5796).
Route the wait path through the session instead:
- logs=True -> logs_for_processing_job(sagemaker_session, ...), which already
resolves clients from sagemaker_session; also fix it to describe via
sagemaker_session.sagemaker_client (region-aware) instead of
ProcessingJob.get(...).refresh() (the chained refresh used the global client
and read PascalCase keys off a snake_case resource __dict__).
- logs=False -> new _wait_for_processing_job(sagemaker_session, job_name),
which polls describe_processing_job through the session's region-aware client
and raises on failure.
Add unit tests covering both wait paths and _wait_for_processing_job.
Relates-to #5796
Co-authored-by: Roja Reddy Sareddy <rsareddy@amazon.com>1 parent 241bd62 commit 193df0f
2 files changed
Lines changed: 127 additions & 15 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
361 | 361 | | |
362 | 362 | | |
363 | 363 | | |
364 | | - | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
365 | 375 | | |
366 | 376 | | |
367 | 377 | | |
| |||
929 | 939 | | |
930 | 940 | | |
931 | 941 | | |
932 | | - | |
| 942 | + | |
| 943 | + | |
| 944 | + | |
| 945 | + | |
| 946 | + | |
| 947 | + | |
| 948 | + | |
| 949 | + | |
| 950 | + | |
| 951 | + | |
| 952 | + | |
933 | 953 | | |
934 | 954 | | |
935 | 955 | | |
| |||
1832 | 1852 | | |
1833 | 1853 | | |
1834 | 1854 | | |
| 1855 | + | |
| 1856 | + | |
| 1857 | + | |
| 1858 | + | |
| 1859 | + | |
| 1860 | + | |
| 1861 | + | |
| 1862 | + | |
| 1863 | + | |
| 1864 | + | |
| 1865 | + | |
| 1866 | + | |
| 1867 | + | |
| 1868 | + | |
| 1869 | + | |
| 1870 | + | |
| 1871 | + | |
| 1872 | + | |
| 1873 | + | |
| 1874 | + | |
| 1875 | + | |
| 1876 | + | |
| 1877 | + | |
| 1878 | + | |
| 1879 | + | |
| 1880 | + | |
| 1881 | + | |
| 1882 | + | |
| 1883 | + | |
| 1884 | + | |
1835 | 1885 | | |
1836 | 1886 | | |
1837 | 1887 | | |
| |||
1847 | 1897 | | |
1848 | 1898 | | |
1849 | 1899 | | |
1850 | | - | |
1851 | | - | |
1852 | | - | |
1853 | | - | |
1854 | | - | |
| 1900 | + | |
| 1901 | + | |
| 1902 | + | |
1855 | 1903 | | |
1856 | 1904 | | |
1857 | 1905 | | |
| |||
1901 | 1949 | | |
1902 | 1950 | | |
1903 | 1951 | | |
1904 | | - | |
1905 | | - | |
1906 | | - | |
1907 | | - | |
1908 | | - | |
1909 | | - | |
| 1952 | + | |
| 1953 | + | |
1910 | 1954 | | |
1911 | 1955 | | |
1912 | 1956 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| 26 | + | |
26 | 27 | | |
27 | 28 | | |
28 | 29 | | |
| |||
1099 | 1100 | | |
1100 | 1101 | | |
1101 | 1102 | | |
| 1103 | + | |
1102 | 1104 | | |
1103 | 1105 | | |
1104 | 1106 | | |
| |||
1110 | 1112 | | |
1111 | 1113 | | |
1112 | 1114 | | |
1113 | | - | |
1114 | | - | |
| 1115 | + | |
| 1116 | + | |
| 1117 | + | |
| 1118 | + | |
| 1119 | + | |
| 1120 | + | |
| 1121 | + | |
| 1122 | + | |
| 1123 | + | |
| 1124 | + | |
| 1125 | + | |
| 1126 | + | |
1115 | 1127 | | |
1116 | 1128 | | |
1117 | 1129 | | |
1118 | 1130 | | |
| 1131 | + | |
| 1132 | + | |
| 1133 | + | |
| 1134 | + | |
| 1135 | + | |
| 1136 | + | |
| 1137 | + | |
| 1138 | + | |
| 1139 | + | |
| 1140 | + | |
| 1141 | + | |
| 1142 | + | |
| 1143 | + | |
| 1144 | + | |
| 1145 | + | |
| 1146 | + | |
| 1147 | + | |
| 1148 | + | |
| 1149 | + | |
| 1150 | + | |
| 1151 | + | |
| 1152 | + | |
| 1153 | + | |
| 1154 | + | |
| 1155 | + | |
| 1156 | + | |
| 1157 | + | |
| 1158 | + | |
| 1159 | + | |
| 1160 | + | |
| 1161 | + | |
| 1162 | + | |
| 1163 | + | |
| 1164 | + | |
| 1165 | + | |
| 1166 | + | |
| 1167 | + | |
| 1168 | + | |
| 1169 | + | |
| 1170 | + | |
| 1171 | + | |
| 1172 | + | |
| 1173 | + | |
| 1174 | + | |
| 1175 | + | |
| 1176 | + | |
| 1177 | + | |
| 1178 | + | |
| 1179 | + | |
| 1180 | + | |
| 1181 | + | |
| 1182 | + | |
| 1183 | + | |
| 1184 | + | |
| 1185 | + | |
| 1186 | + | |
1119 | 1187 | | |
1120 | 1188 | | |
1121 | 1189 | | |
| |||
0 commit comments