|
24 | 24 | - See Slack thread with Eng |
25 | 25 | - Amped the `dev/query_logs.py` script in the meantime |
26 | 26 |
|
27 | | -- Build up log event context, ex. canonical logs, and be able to retrieve this context in cmd.log_process_status() |
| 27 | +- Build up log event context, ex. canonical logs |
| 28 | + - And be able to retrieve this context in cmd.log_process_status() |
28 | 29 |
|
29 | 30 | - Enhance error events with automatic error context capture and correlation IDs |
30 | 31 | - Remote server response errors, ex. svn: E175012: Connection timed out |
31 | 32 | - Decorators and context managers for logging context? |
32 | 33 |
|
33 | 34 | - Log a repo status event at the end of the svn.py module |
34 | | - - Status (up to date / out of date) |
| 35 | + - Remote |
| 36 | + - SVN |
| 37 | + - Revs remaining to convert |
| 38 | + - Total rev count |
| 39 | + - Local |
| 40 | + - Git |
| 41 | + - Last rev from git log at start |
| 42 | + - Last rev from git log at end |
35 | 43 | - Last run's status (success / fail) |
36 | 44 | - Progress (% of revs converted) |
37 | | - - Revs converted |
38 | | - - Revs remaining |
39 | | - - Total revs |
40 | 45 |
|
41 | 46 | - Amp's suggestion |
42 | 47 | - Context Managers: Git operations and command execution use context managers to automatically inject relevant metadata for all logs within their scope. |
|
52 | 57 | - `svn log` commands |
53 | 58 | - Longest commands, which seem to be timing out and causing issues |
54 | 59 | - What do we use them for? Why? |
55 | | - - The big one: Count all revs remaining to convert, as a progress indicator |
56 | | - - The small one: Get first and last rev numbers to start and end this batch |
57 | | - - The smallest one: Log recent commits, to visually verify a successful fetch |
| 60 | + - The big one: Count all revs remaining to convert, as a progress indicator - Disabled this by default |
| 61 | + - The small one: Get first and last rev numbers to start and end this batch - Seems to be necessary, but combined into one, and limited to batch size |
| 62 | + - The smallest one: Log recent commits, to visually verify a successful fetch - Disabled by default |
58 | 63 | - We may be able to make the conversion process much smoother if we can use fewer of these log commands |
59 | 64 | - Keep the output revision numbers from `git svn log --xml` commands in a file on disk |
60 | 65 | - Append to this file when there are new revisions, so getting counts of revisions in each repo is slow once, fast many times |
|
168 | 173 | ## Processes |
169 | 174 |
|
170 | 175 | - How do I get more information about the child PID which was reaped in these lines, in `./src/utils/signal_handler.py`? |
| 176 | + |
171 | 177 | ```python |
172 | 178 | if os.WIFEXITED(status) and os.WEXITSTATUS(status) != 0: |
| 179 | + # "message": "SIGCHLD handler reaped child PID 10747 with exit code 129", |
173 | 180 | log(ctx, f"SIGCHLD handler reaped child PID {pid} with exit code {os.WEXITSTATUS(status)}", "warning") |
174 | 181 | ``` |
175 | 182 | - Maintain a list of processes, with their metadata, from when they're launched, and updated on an interval, then look up that information in the signal handler |
|
220 | 227 | - gha-env-vars-workflow-dispatch.sh |
221 | 228 | - Wolfi Python base image for Docker / podman build |
222 | 229 | - Container runAs user |
223 | | - - src serve-git and repo-converter both run as root, which is not ideal |
224 | | - - Need to create a new user on the host, add it to the host's sourcegraph group, get the UID, and configure the runAs user for the containers with this UID |
| 230 | + - It seems like the only way this works for both Podman and Docker Compose, is to: |
| 231 | + - Bake the image with a specific UID/GID, |
| 232 | + - and change the app service user account's UID/GID on the host OS to match |
| 233 | + - Changed the UID of the service account on the host to 10001, and GID to 10002 |
| 234 | + - I hope I'm wrong on this limitation, adding this to the TODO list to figure out later |
225 | 235 |
|
226 | 236 | ## Dev |
227 | 237 |
|
|
0 commit comments