diff --git a/content/blog/a-cli-from-one-config/index.es.md b/content/blog/a-cli-from-one-config/index.es.md index dc70f84c..cae9368a 100644 --- a/content/blog/a-cli-from-one-config/index.es.md +++ b/content/blog/a-cli-from-one-config/index.es.md @@ -108,7 +108,7 @@ El config en sí casi no llevó tiempo. Un agente escribió attio en 1 h 20 min, En linear, unas 1 h 55 min de las 2 h 54 min se fueron en los paquetes comunes. `cli-dev ready` no conocía la categoría de gestor de tareas, cli-core no tenía un fake para pasar el contrato de tareas sobre una fuente sacada de un config (son unas 930 líneas), y el test GraphQL de `api` se quedaba sin memoria. En Linear los filtros se anidan unos dentro de otros (`IssueFilter` llega a `TeamFilter` y vuelve), y el test que intentaba rellenar cada campo opcional construía filtro dentro de filtro hasta que el worker no pudo más. Ahora las 493 operaciones de Linear pasan en unos 20 segundos. -Antes de una versión, el CI exige que cada comando del CLI y cada uno de sus flags tenga al menos un test, si no `release:check` no deja pasar la versión. Después de la revisión a linear-cli aún le faltaba test a 562 de esos flags y comandos, por ejemplo `--body-file` y `--all` del grupo `api`, o los comandos de tareas. Esos tests pasaron a la plantilla, pero cubrían el gestor de tareas y no WordPress, así que a wordpress-cli le pasó lo mismo con 501. Esos también pasaron a la plantilla el mismo día. +Antes de una versión, el CI exige que cada comando del CLI y cada uno de sus flags tenga al menos un test o una razón escrita de por qué no lo tiene, si no `release:check` no deja pasar la versión. Después de la revisión a linear-cli aún le faltaba test a 562 de esos flags y comandos, por ejemplo `--body-file` y `--all` del grupo `api`, o los comandos de tareas. Esos tests pasaron a la plantilla, pero cubrían el gestor de tareas y no WordPress, así que a wordpress-cli le pasó lo mismo con 501. Esos también pasaron a la plantilla el mismo día. El tercer CLI salió varias veces más rápido que los dos primeros: unos 40 minutos hasta un `cli-dev ready` en verde, frente a 2 h 40 min de attio y 2 h 54 min de linear. El commit de la versión de wordpress, con 2 revisiones y la comprobación en vivo, llegó 1 h 20 min después de `new`. diff --git a/content/blog/a-cli-from-one-config/index.md b/content/blog/a-cli-from-one-config/index.md index bb0bb362..62376aee 100644 --- a/content/blog/a-cli-from-one-config/index.md +++ b/content/blog/a-cli-from-one-config/index.md @@ -108,7 +108,7 @@ The config itself took almost no time. An agent wrote attio in 1 h 20 min, then In linear, about 1 h 55 min of the 2 h 54 min went into the shared packages. `cli-dev ready` didn't know the tracker category, cli-core had no fake to run the tracker contract on a source from a config (that's about 930 lines), and the GraphQL `api` test ran out of memory. Linear's filters nest inside each other (`IssueFilter` reaches `TeamFilter` and back), and the test that tried to fill every optional field built filter inside filter until the worker gave up. Now all 493 Linear operations pass in about 20 seconds. -Before a release, CI wants every command of the CLI and every one of its flags to have at least one test, otherwise `release:check` won't let the version through. After the review linear-cli still had 562 such flags and commands without a test, for example `--body-file` and `--all` in the `api` group, or the tracker commands. Those tests moved into the template, but they covered the tracker and not WordPress, so wordpress-cli hit the same thing with 501 of them. They moved into the template the same day too. +Before a release, CI wants every command of the CLI and every one of its flags to have at least one test, or a written reason why it has none, otherwise `release:check` won't let the version through. After the review linear-cli still had 562 such flags and commands without a test, for example `--body-file` and `--all` in the `api` group, or the tracker commands. Those tests moved into the template, but they covered the tracker and not WordPress, so wordpress-cli hit the same thing with 501 of them. They moved into the template the same day too. The third CLI came together several times faster than the first two: about 40 minutes to a green `cli-dev ready`, against 2 h 40 min for attio and 2 h 54 min for linear. The release commit for wordpress, with 2 reviews and the live check, came 1 h 20 min after `new`. diff --git a/content/blog/a-cli-from-one-config/index.ru.md b/content/blog/a-cli-from-one-config/index.ru.md index 07aa1d0f..ea802b90 100644 --- a/content/blog/a-cli-from-one-config/index.ru.md +++ b/content/blog/a-cli-from-one-config/index.ru.md @@ -108,7 +108,7 @@ node dist/bin/acme.js work sync # копирует записи, д У linear из 2 ч 54 мин около 1 ч 55 мин ушли на общие пакеты. `cli-dev ready` не знал категорию трекера, в cli-core не было фейка, чтобы прогнать контракт трекера на источнике из конфига (это около 930 строк), а GraphQL-тест `api` падал по памяти. У Linear фильтры вложены друг в друга (`IssueFilter` доходит до `TeamFilter` и обратно), и тест, который пытался заполнить каждое необязательное поле, строил фильтр в фильтре, пока воркеру не стало плохо. Теперь все 493 операции Linear проходят где-то за 20 секунд. -Перед релизом CI требует, чтобы у каждой команды CLI и у каждого ее флага был хотя бы один тест, иначе `release:check` не пропустит версию. После ревью у linear-cli 562 таких флага и команды оставались без теста, например `--body-file` и `--all` у группы `api` или команды трекера. Эти тесты переехали в шаблон, но они покрывали трекер, а не WordPress, так что у wordpress-cli повторилось то же самое, там таких было 501. Их тоже перенесли в шаблон в тот же день. +Перед релизом CI требует, чтобы у каждой команды CLI и у каждого ее флага был хотя бы один тест или записанная причина, почему его нет, иначе `release:check` не пропустит версию. После ревью у linear-cli 562 таких флага и команды оставались без теста, например `--body-file` и `--all` у группы `api` или команды трекера. Эти тесты переехали в шаблон, но они покрывали трекер, а не WordPress, так что у wordpress-cli повторилось то же самое, там таких было 501. Их тоже перенесли в шаблон в тот же день. Третий CLI собрался в разы быстрее первых двух: около 40 минут до зеленого `cli-dev ready` против 2 ч 40 мин у attio и 2 ч 54 мин у linear. До релизного коммита, с 2 ревью и живой проверкой, у wordpress ушло 1 ч 20 мин. diff --git a/content/blog/one-reboot-broke-the-background/index.es.md b/content/blog/one-reboot-broke-the-background/index.es.md index 6dcbe8ca..cb0292e8 100644 --- a/content/blog/one-reboot-broke-the-background/index.es.md +++ b/content/blog/one-reboot-broke-the-background/index.es.md @@ -55,7 +55,7 @@ RestartSec=30 RestartPreventExitStatus=4 ``` -[`Restart=on-failure`](https://www.freedesktop.org/software/systemd/man/latest/systemd.service.html#Restart=) reinicia el servicio con cualquier código distinto de cero, y [`RestartPreventExitStatus=`](https://www.freedesktop.org/software/systemd/man/latest/systemd.service.html#RestartPreventExitStatus=) impide el reinicio con los códigos de la lista, diga lo que diga `Restart=`. El 4 está en esa lista porque con una sesión revocada o perdida el servicio falla igual en cada reintento, así que reiniciarlo no tiene sentido. En max el motivo es aún más serio - un servicio que se reinicia tras un inicio de sesión rechazado volvería a iniciar sesión cada 30 segundos, y cada uno de esos inicios añadiría un dispositivo más a la cuenta de MAX. Por eso max no tiene solo el 4 en la lista, también el límite de peticiones (8) y el error del proveedor (11). +[`Restart=on-failure`](https://www.freedesktop.org/software/systemd/man/latest/systemd.service.html#Restart=) reinicia el servicio con cualquier código distinto de cero, y [`RestartPreventExitStatus=`](https://www.freedesktop.org/software/systemd/man/latest/systemd.service.html#RestartPreventExitStatus=) impide el reinicio con los códigos de la lista, diga lo que diga `Restart=`. El 4 está en esa lista porque con una sesión revocada o perdida el servicio falla igual en cada reintento, así que reiniciarlo no tiene sentido. En max el motivo es aún más serio - un servicio que se reinicia tras un inicio de sesión rechazado volvería a iniciar sesión cada 30 segundos, y MAX contaría cada uno de esos intentos contra la cuenta. Por eso max no tiene solo el 4 en la lista, también el límite de peticiones (8) y el error del proveedor (11). Y max con el keyring bloqueado también salía con 4. Así que, aunque la unit hubiera estado habilitada, serve habría arrancado con el sistema, no habría leído el token, habría salido con 4, y systemd, tal como se le pidió, no lo habría vuelto a tocar hasta el siguiente reinicio, que habría terminado igual. tg ya devolvía 12 en este caso, max no. Por eso por la mañana el agente arrancó los dos servicios a mano, pero no activó el arranque automático: antes de iniciar sesión el keyring está bloqueado, y el servicio fallaría. diff --git a/content/blog/one-reboot-broke-the-background/index.md b/content/blog/one-reboot-broke-the-background/index.md index 35e53f62..e6445827 100644 --- a/content/blog/one-reboot-broke-the-background/index.md +++ b/content/blog/one-reboot-broke-the-background/index.md @@ -55,7 +55,7 @@ RestartSec=30 RestartPreventExitStatus=4 ``` -[`Restart=on-failure`](https://www.freedesktop.org/software/systemd/man/latest/systemd.service.html#Restart=) restarts the service on any non-zero exit code, and [`RestartPreventExitStatus=`](https://www.freedesktop.org/software/systemd/man/latest/systemd.service.html#RestartPreventExitStatus=) prevents the restart for the listed codes, whatever `Restart=` says. 4 is on that list because with a revoked or missing sign-in the service fails the same way on every retry, so restarting it makes no sense. With max the reason is even more serious - a service that restarts on a refused sign-in would sign in again every 30 seconds, and each of those sign-ins would add one more device to the MAX account. That's why max has not only 4 on the list, but also rate limit (8) and provider error (11). +[`Restart=on-failure`](https://www.freedesktop.org/software/systemd/man/latest/systemd.service.html#Restart=) restarts the service on any non-zero exit code, and [`RestartPreventExitStatus=`](https://www.freedesktop.org/software/systemd/man/latest/systemd.service.html#RestartPreventExitStatus=) prevents the restart for the listed codes, whatever `Restart=` says. 4 is on that list because with a revoked or missing sign-in the service fails the same way on every retry, so restarting it makes no sense. With max the reason is even more serious - a service that restarts on a refused sign-in would sign in again every 30 seconds, and MAX would count each of those attempts against the account. That's why max has not only 4 on the list, but also rate limit (8) and provider error (11). And max exited with 4 on a locked keyring too. So even if the unit had been enabled, serve would have started at boot, failed to read the token, exited with 4, and systemd, as it was told, would never touch it again until the next reboot, which would end the same way. tg already returned 12 in this case, max didn't. That's why the agent started both services by hand in the morning but didn't turn on autostart: before login the keyring is locked, and the service would fail. diff --git a/content/blog/one-reboot-broke-the-background/index.ru.md b/content/blog/one-reboot-broke-the-background/index.ru.md index d92c5c4d..1d81f850 100644 --- a/content/blog/one-reboot-broke-the-background/index.ru.md +++ b/content/blog/one-reboot-broke-the-background/index.ru.md @@ -55,7 +55,7 @@ RestartSec=30 RestartPreventExitStatus=4 ``` -[`Restart=on-failure`](https://www.freedesktop.org/software/systemd/man/latest/systemd.service.html#Restart=) перезапускает службу на любом ненулевом коде, а [`RestartPreventExitStatus=`](https://www.freedesktop.org/software/systemd/man/latest/systemd.service.html#RestartPreventExitStatus=) отменяет перезапуск для перечисленных кодов, что бы ни стояло в `Restart=`. А 4 в этом списке потому, что с отозванным или пропавшим входом служба на каждом повторе падает одинаково, и перезапускать ее бессмысленно. У max причина еще серьезнее - служба, которая перезапускается на отказанном входе, логинилась бы заново каждые 30 секунд, и каждый такой вход добавлял бы в аккаунт MAX еще одно устройство. Поэтому у max в этом списке не только 4, но и rate limit (8) и ошибка провайдера (11). +[`Restart=on-failure`](https://www.freedesktop.org/software/systemd/man/latest/systemd.service.html#Restart=) перезапускает службу на любом ненулевом коде, а [`RestartPreventExitStatus=`](https://www.freedesktop.org/software/systemd/man/latest/systemd.service.html#RestartPreventExitStatus=) отменяет перезапуск для перечисленных кодов, что бы ни стояло в `Restart=`. А 4 в этом списке потому, что с отозванным или пропавшим входом служба на каждом повторе падает одинаково, и перезапускать ее бессмысленно. У max причина еще серьезнее - служба, которая перезапускается на отказанном входе, логинилась бы заново каждые 30 секунд, и каждую такую попытку MAX засчитывал бы аккаунту. Поэтому у max в этом списке не только 4, но и rate limit (8) и ошибка провайдера (11). И вот max на закрытом keyring тоже отвечал 4. Так что даже если бы unit был включен, serve стартовал бы при загрузке, не прочитал токен, вышел с 4, и systemd, как ему и сказали, больше бы его не трогал до следующей перезагрузки, а она закончилась бы так же. tg в этом случае уже отвечал 12, а max нет. Поэтому агент утром запустил обе службы руками, а автозапуск включать не стал: до входа keyring закрыт, и служба упала бы.