Repository navigation
Conversation
…127] With smtp_host set in the inventory, Phase 3 writes Plane's outbound mail instance settings (ENABLE_SMTP and the EMAIL_* keys) from the inventory's SMTP values and the mail token read from secret/services/smtp:plane_smtp_token. The token is read only while mail is on, as a listed read that fails the run when the key is missing. With mail off no mail key is sent and nothing is cleared. The SMTP guard is the first task of Phases 1, 3 and 4. The local-dev Plane worker joins the local-dev network so it can reach the local mail catcher. The production inventory is unchanged, so mail stays off there.
…l judgement [AC-1127] The new tests run the expressions and tasks of deploy-plane.yml as written. They cover the settings for each spelling of smtp_host and smtp_starttls, the listed read in each combination of Authentik and mail, the worker selection by compose service label, the exact success line of the test mail, and the play and task order of the Phase 4 local mail check. Nothing reaches a container, a mail server or the network: the worker listing and the test-mail command are stubbed, and every value is a placeholder.
….md rows [AC-1127] The Plane deployment notes gain an Outbound mail section: the settings written, the mail-on gate, the token path, and the local verification. AGENTS.md records that Deploy Plane now reads plane_smtp_token through _shared_reads while mail is on, and that the Authentik and Grafana deploys do not read theirs yet.
…lready sets [AC-1127] The Phase 4 play defined _monorepo_dir and _deploy_dir as play vars. No task in the play reads _monorepo_dir. The one task that reads _deploy_dir gets it from the fact that tasks/list-service-containers.yml sets earlier in the play, during the containers-stable check, so the play vars were not needed. The one remaining reader gets a comment naming where the fact comes from.
…roup [AC-1127] Each group of Plane's outbound mail cases now runs as one ansible-playbook run instead of one run per case. The Phase 3 mail settings and the converge stdin, the Phase 1 listed reads, the worker selection and the test-mail judgement each run once over one host per case. Every case still has its own test, and that test reads only its own host's result, so a red case names itself. The file went from 41 ansible-playbook runs to 4, and its run time from about 29 seconds to about 7 seconds. The mail-off converge test is folded into the converge test, parametrised over mail on and mail off. The converge test now checks the exact settings each stdin renders, in place of a second run that compared against a combined rendering. The send group's run also marks the time before the test mail, so the since-time test reads that value from the same run. Every case and near-miss from before keeps a test, and the static tests still read the playbook without running it.
…t [AC-1127] Each send case now also checks the stub's exit status and output lines, so a case that judges a failed send can no longer pass because the command never ran. The mail block's gate is compared as a set of conditions, so reordering them is not a failure.
|
Warning Review limit reached
This review includes 8 billable files and costs up to $2.00.
Reviews can continue after your included limit without a manual trigger. An admin must approve usage-based billing. Or wait 2 minutes for your next included review. View limit details
|
|
simplify: deferred |
|
Linked to Plane Work Item(s) References
This comment was auto-generated by Plane |
Reverts 210720a. The local mail check reads _deploy_dir, which that commit left to the fact tasks/list-service-containers.yml sets inside the containers-stable include. The play-vars scope guard (test_play_vars_scope.py) does not scan included task files, so it read _deploy_dir as another play's var and failed CI on #1249 (Python 2/8). Defining it in Phase 4's own vars keeps the read visible to the guard and independent of the include's order.
…lude vars [AC-1127] assert-mail-captured.yml takes its inputs as include vars or play vars. The test pins that deploy-plane.yml defines the four it passes only as include vars of the one catcher task, with no play var, block var, set_fact or register of any mail_captured_ name, so the shared task's extra-var refusal (landing in #1247) covers every source. A play-var mutant and a set_fact mutant each turn it red.
…-vars scope guard [AC-1127]
…a [AC-1127] Phase 4 declared _monorepo_dir and _deploy_dir from the Phase 1 pattern, without the compose_working_dir branch that tasks/list-service-containers.yml uses for the fact that replaces it after the containers-stable include. One variable now carries that same formula and a comment saying it exists because the play-vars scope guard does not follow includes. The catcher-inputs test walks each node's names in one flat list.
|
review: approved on No blocking finding. Checked on this head: the eight settings and their string values ( Two low findings, both in
Not verified in this round: the Plane v3.3.3 setting names, the stored form of |
# Conflicts: # AGENTS.md # docs/MISTAKES.md
|
owner check: head 4e4c573 Review. The one review round, on 85dde79, approved (PR comment of 2026-11-29T00:27:30Z, starting What changed since the reviewed head.
How the two conflicts were resolved.
Case (b) commands and their whole output. Against the merge tree, the head changes only The unit's own files are unchanged since the reviewed head. Checks.
|
What this changes
Deploy Plane now sends Plane's outbound mail through the platform SMTP settings when the inventory sets
smtp_host(plan 29, unit S6, AC-1127).configure_instance.pystep already converges:ENABLE_SMTP,EMAIL_HOST,EMAIL_PORT,EMAIL_HOST_USER,EMAIL_HOST_PASSWORD,EMAIL_USE_TLS,EMAIL_USE_SSLandEMAIL_FROM. Every value is a string, so a second run patches nothing.EMAIL_USE_TLSfollowssmtp_starttls | default(true) | bool, andEMAIL_USE_SSLstays0.plane_smtp_tokenis read fromsecret/services/smtpthrough_shared_reads, only while mail is on, and reaches Plane on the stdin of the existingno_logconfiguration task, as the OIDC secret does. No newno_logtask.tasks/assert-smtp-settings.ymlis the first task of Phases 1, 3 and 4, the three plays that read a mail variable.worker, notbeat-worker), runspython manage.py test_email <smtp_from_address>in it, and requires the exact lineEmail successfully sent, becausetest_emailexits 0 when delivery fails. It then checks the Mailpit catcher for a message to that address with subjectTest emailcreated since a time marked just before the send. Outside local-dev nothing is sent; the production test send is unit S9.compose.local.ymlputs the Planeworkeronlocal-dev, so it reachesmailpit:1025.Facts read before the change
Not verified in the current session: read by this unit's earlier owner session on local-dev from the Plane v3.3.3 image and database, names only, in proof slot 1 (local Semaphore tasks 439 dry run and 440 real run of Deploy Plane (Local) at
f918098b3):EMAIL_HOST_PASSWORD), fromInstanceConfiguration.ENABLE_SMTPis stored as the string0, and Plane's own disable endpoint writes0.settings.SKIP_ENV_VARis true in the worker and the API.test_email.pytakes one recipient, sends subjectTest email, printsEmail successfully senton success and anError:line with exit 0 on failure.EMAIL_BACKENDisdjango.core.mail.backends.smtp.EmailBackendon Django 5.2.16, whose STARTTLS context isssl.create_default_context(), so the relay's certificate and name are verified.plane_defaultonly.Tests
platform/tests/test_plane_outbound_mail.py(39 tests, 4ansible-playbookruns;uv run --locked pytest platform/tests/test_plane_outbound_mail.py -qpassed 38 in 12 s onc8c6cdb59, and--collect-onlylists 39 on85dde792d): mail off for unset,false,0, blank and null; the exact eight settings; everysmtp_starttlsspelling; the listed read only while mail is on; worker selection with near-misses; the test-mail judgement with near-misses; static checks on guard order, block gate, task order and the compose network.test_the_catcher_inputs_are_set_only_as_the_include_vars_of_the_catcher_check(added on7fa5cc9d): the fourmail_captured_*inputs are include vars of the one catcher task, and no play var, block var,set_factorregisterdefines anymail_captured_name. A play-var, aset_factand aregistermutant each turned it red, each restored. The shared task's extra-var refusal lands in feat(authentik): send outbound mail through the shared SMTP settings [AC-1125] #1247, which merges first.c7e0a310: Python (2/8) failedtest_play_vars_scope.py::test_no_play_reads_another_plays_varsonc8c6cdb5, because Phase 4 read_deploy_dironly through the fact an included task sets. Phase 4 declares it again, with the same formula astasks/list-service-containers.yml(85dde792). Recorded as adocs/MISTAKES.md5.2 repeat.platform/tests/test_service_plane.bats: one pin updated for the new_shared_readstext.Local proof
Not verified: the local proof has not run. The local stack is down after the reboot of 2026-11-28 and the coordinator holds proof slots until it is rebuilt. The dry run and real run of
platform/playbooks/deploy-plane.ymlthrough./scripts/local-dev.sh run, the catcher check and the second run with no settings change are added here, with their local task ids, when a slot runs.Review passes
/simplifyround 1 ond78913d2b: tests moved to the shared runner and batched from 41 runs to 4, dead Phase 4 variables removed. Round 2 on5c569f2b6: the send cases now prove the stubbed command ran. Deferred, until unit S4 adds the second caller: a shared local mail-check task (AC-1225) and a shared mail-on filter (AC-1226)./security-reviewon5c569f2b6: no findings at threshold. The STARTTLS certificate question it raised is answered above.85dde792d:/simplifyon30e446fc5(the CI fix, the new test and the ledger note) merged the two Phase 4 path variables into one with the shared fact's formula and a reason comment, and flattened the new test's walk (85dde792d). Skipped: reusingplaybook_yaml.defined_names, which records no task identity, so it cannot pin the one owning task./security-reviewon85dde792d: no findings.Lesson
docs/LESSONS.mdL-038 (added in 4e4c573, after the refresh againstdevat ef8dd1e): Plane'smanage.py test_emailexits 0 when delivery fails, so a task that sends a test mail through it checks for the lineEmail successfully sentin its output and then the delivery itself, never the exit code alone.