certbot/certbot-ci
ohemorange b00e3de9d2
Completely aligns deploy and renew hook behaviors, fully fixing #9978 (#10534)
https://github.com/certbot/certbot/pull/10146 was supposed to do this,
but because of multiple code paths, it did not. This PR simplifies the
code by creating a single code path.

In particular:

- `hooks.renew_hook()` is removed. There are now only calls to
`hooks.deploy_hook()`, which is called during certonly, run, and renew,
and runs both cli and directory hooks.
- `cli_config.renew_hook` is removed. Both `--renew-hook` (hidden option
kept for backwards compatibility purposes and `--deploy-hook` now set
`cli_config.deploy_hook`, which is used internally. When either or both
flags are used multiple times, the last value is kept, which is the
argparse default.
- references to running a "renew hook" internally are changed to "deploy
hook"
- To maintain downgrade compatibility, `deploy_hook` is written out to
renewal config files as `renew_hook`. This is achieved by translating to
and from `renew_hook` in `storage.py` and changing
`renewal.STR_CONFIG_ITEMS` to contain `deploy_hook`.

This results in the following behavior changes:
- Directory hooks are now run when getting a new cert using certonly/run
- If someone set a renew hook on the cli using `--renew-hook`, it would
previously not be run when getting a new (non-renewed) cert, but now
will be. But this option is hidden and should no longer be used anyway.
- When using `certbot reconfigure`, if someone sets `--renew-hook`
certbot will now also ask if someone would like to do a test run of the
new hook, whereas before it would only do so for `--deploy-hook`.

---------

Co-authored-by: Brad Warren <bmw@users.noreply.github.com>
2026-01-29 16:03:20 -08:00
..
src Completely aligns deploy and renew hook behaviors, fully fixing #9978 (#10534) 2026-01-29 16:03:20 -08:00
MANIFEST.in Add --use-pep517 flag to pip to silence warning in tools/venv.py, and switch codebase to src-layout (#10249) 2025-04-11 19:30:33 +00:00
pyproject.toml remove email address (#10533) 2026-01-07 19:03:03 +00:00
setup.py Bump version to 5.3.0 2025-12-03 11:48:10 -08:00