VersionControl:PRs/maybelle-config/262: Difference between revisions

From PickiPedia: A knowledge base of bluegrass, old time psychedelic jams, and other public domain music
Jump to navigationJump to search
DrivingThatTrain (talk | contribs)
cryptograss/maybelle-config#262, as GitHub has it
DrivingThatTrain (talk | contribs)
cryptograss/maybelle-config#262, as GitHub has it
 
(One intermediate revision by the same user not shown)
Line 5: Line 5:
|url=https://github.com/cryptograss/maybelle-config/pull/262
|url=https://github.com/cryptograss/maybelle-config/pull/262
|author=magent-cryptograss
|author=magent-cryptograss
|state=open
|state=closed
|base=production
|base=production
|branch=poller-git-identity
|branch=poller-git-identity
Line 11: Line 11:
|pushed=2026-11-01 16:32:41
|pushed=2026-11-01 16:32:41
|merged=
|merged=
|closed=
|closed=2026-11-01 16:45:52
|worked_on_by=magent, re, justin
|worked_on_by=magent, re, justin
|moods=emergence
|moods=emergence
|deploy=redeploy hunter
|deploy=redeploy hunter
}}
}}
<pre class="pr-body">Follow-up to #260. After today's deploy I'm running in `emergent-magent`. It has the only poller, and `justin-arthel` has none. But my commits still come out as **Justin Holmes**.
**Why:** the container does have all four variables. `docker inspect emergent-magent-arthel` shows `GIT_AUTHOR_NAME=magent-cryptograss` and the other three, so #260's compose change rendered as intended. But `container_startup.py` starts the poller with `su - magent -c '…'`, and `su -` begins with a clean environment. The variables never reach the poller, my turns, or git.
**The fix:** `poller_command` now puts `export GIT_…="…";` for each variable the container has into the poller's own shell line, after `poller.env` is sourced.
- **Not `.bashrc` or `poller.env`:** both are in the home `emergent-magent` shares with `justin-arthel`. Writing the identity there would make Justin commit as magent.
- **Values are left out, not quoted:** a value with any character beyond letters, digits, space and `.@+-_` is dropped. The line is wrapped in single quotes for `su`, so leaving such a value out is safer than quoting it.
- **Containers without the variables are unchanged**, which covers every container but `emergent-magent`.
**Checked:**
- Three new tests: the identity is in the line, there's no `GIT_` when the container has none, and a value that would need quoting is left out. All 67 hunter tests pass.
- I ran `env -i bash -c '&lt;the export line&gt; git var GIT_AUTHOR_IDENT'` in a clean shell. It prints `magent-cryptograss &lt;magent@cryptograss.live&gt;`.
**Also here: the log viewer's pane 0** (the follow-up promised on #261). Pane 0 used to run `docker logs -f justin-arthel`, but that container no longer runs my poller. It now tails `/tmp/mood-poller.log` in `emergent-magent-arthel`, where the poller logs its wakes, replies and costs. `docker logs` only shows container startup.
Deploy: redeploy hunter
Worked on by: magent, re, Justin, in #emergence</pre>

Latest revision as of 17:06, 9 November 2026

maybelle-config#262: hunter: the poller gets its container's git identity through su
State 🔴 closed 2026-11-01 16:45:52
Worked on by magent, re, justin
Moods #emergence
Deploy redeploy hunter
Branch poller-git-identity → production, by magent-cryptograss
Opened · last pushed 2026-11-01 16:28:13 · 2026-11-01 16:32:41
Follow-up to #260. After today's deploy I'm running in `emergent-magent`. It has the only poller, and `justin-arthel` has none. But my commits still come out as **Justin Holmes**.

**Why:** the container does have all four variables. `docker inspect emergent-magent-arthel` shows `GIT_AUTHOR_NAME=magent-cryptograss` and the other three, so #260's compose change rendered as intended. But `container_startup.py` starts the poller with `su - magent -c '…'`, and `su -` begins with a clean environment. The variables never reach the poller, my turns, or git.

**The fix:** `poller_command` now puts `export GIT_…="…";` for each variable the container has into the poller's own shell line, after `poller.env` is sourced.
- **Not `.bashrc` or `poller.env`:** both are in the home `emergent-magent` shares with `justin-arthel`. Writing the identity there would make Justin commit as magent.
- **Values are left out, not quoted:** a value with any character beyond letters, digits, space and `.@+-_` is dropped. The line is wrapped in single quotes for `su`, so leaving such a value out is safer than quoting it.
- **Containers without the variables are unchanged**, which covers every container but `emergent-magent`.

**Checked:**
- Three new tests: the identity is in the line, there's no `GIT_` when the container has none, and a value that would need quoting is left out. All 67 hunter tests pass.
- I ran `env -i bash -c '<the export line> git var GIT_AUTHOR_IDENT'` in a clean shell. It prints `magent-cryptograss <magent@cryptograss.live>`.

**Also here: the log viewer's pane 0** (the follow-up promised on #261). Pane 0 used to run `docker logs -f justin-arthel`, but that container no longer runs my poller. It now tails `/tmp/mood-poller.log` in `emergent-magent-arthel`, where the poller logs its wakes, replies and costs. `docker logs` only shows container startup.

Deploy: redeploy hunter
Worked on by: magent, re, Justin, in #emergence