php / php/infrastructure

Enable/recreate automatic emails from manual build/render failures, and repo commits

Open
#49 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Shell
Stars
12
Forks
5
PR merge metrics
No merged PRs in 30d

Description

The PHP Manual, published on the main site, uses a very intensive process that is somewhat fragile and very prone to accumulate errors and warnings. This is still more relevant for small translation teams, where the absence of automatic emails would make these accumulated warnings and errors to go effectively invisible from months to years.

As it can be observed on news-web.php.net, only doc-en has the privilege of having commit emails, a marvelous tool that incentives peer review.

And in the old times, there were also the automatic emails called This PHP Manual build is broken, that was nagging, but again essential for small teams. The last one was emitted on 2024-07-09, then lost on a server migration.

The PHP manual build process is well documented, and it is running (otherwise the manual won't be updated on the main site), so in this PR I ask:

  • To re-enable the repository commits on translations, as it now occurs on doc-en;
  • To re-enable or recreate the automatic emails of manual build/render, at least weekly.

There are two main contents for the manual build emails:

  1. The output of doc-base/configure.php runs, if it does not return EXIT_SUCCESS (0).
  2. The output of phd/phd, same condition.

The (1) was the original contents of This PHP Manual build is broken, but also adding (2) may be important so warnings/errors do not go unnoticed in the long run.

One simple way to achieve that is to capture these outputs and then serve or upload them, with the respective returns, where the mail server can reach, and then on scheduled event, inspect these the returns and send the emails.

It may be the case that some languages complain that the commit emails or the manual broken emails are not wanted. If it comes to be, it will be possible to create a new command line options on doc-base/languages.php, as to report a list of language codes expecting --list-commit-emails and --list-build-emails.

So the same server that builds and renders the manual, produces the all the artefacts, will be producing some new artefacts:

  1. The build logs of doc-base/configure.php and phd/, with the respective return codes;
  2. The list of languages wanting these emails, controled here.

It's important to note that doc-base/languages.php is already used as the source of truth for the PHP Manual automatic building process itself. So pushing here the configuration of any related automatic emails makes sense.

See the two mentions of languages.php on https://github.com/php/web-doc.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the PHP manual build documentation and the two references to languages.php in web-doc, then trace how doc-base/configure.php and phd/phd are run by the infrastructure playbooks. Define how build logs, return codes, language preferences, commit notifications, and scheduled failure emails are produced. Done means translated repositories can opt into commit emails and failed builds or renders generate inspectable outputs and notifications.

Written by the indexing model from the issue text.

Assessment

Tech stack
ansible, php, shell
Domain
build-system, devops, infrastructure
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.