Skip to content

Commit a9a42cc

Browse files
committed
Release v2.1 🎉
1 parent 85cdc38 commit a9a42cc

File tree

2 files changed

+39
-1
lines changed

2 files changed

+39
-1
lines changed

CHANGELOG.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,41 @@
1+
# v2.1
2+
3+
First `2.x` point release! Major feature: **nested operations** (at last!).
4+
5+
Based on the changes to operations in `2.x` nested operations make it possible to generate & execute operations on the fly at execution time, rather than using the low-level connector API. This unlocks all kinds of complex deploys that were previously impossible or complex to implement. Let's look at an example:
6+
7+
```py
8+
from pyinfra import logger
9+
from pyinfra.operations import python, server
10+
11+
def callback():
12+
result = server.shell(commands=["echo output"])
13+
logger.info(f"Got result: {result.stdout}")
14+
15+
python.call(
16+
name="Execute callback function",
17+
function=callback,
18+
)
19+
```
20+
21+
Other new stuff:
22+
23+
+ Add `host.reload_fact(...)` - bypasses the fact cache to force reloading of fact data
24+
+ Add `deb.DebArch` fact
25+
+ Add `ssh_paramiko_connect_kwargs` host data used in the `@ssh` connector
26+
27+
Bugfixes:
28+
29+
+ Fix: Remove state/host arguments from apt.dist_upgrade operation (@pabloxio)
30+
+ Fix `files.put` hashing local file that doesn't exist when `assume_exists=True`
31+
+ Fix parsing of link targets in RHEL 6 systems
32+
+ Prefer `zypper` over `apt` when both present in `server.packages` operation
33+
34+
Internal changes:
35+
36+
+ Fix license link (@Lab-Brat)
37+
+ Run `black` and `isort` across the codebase, now part of CI
38+
139
# v2.0.2
240

341
+ Fix for `config.SUDO`/etc handling for operation argument defaults

pyinfra/api/operation.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -382,7 +382,7 @@ def decorated_func(*args, **kwargs):
382382
logger.warning(
383383
f"Note: nested operations are currently in beta ({get_call_location()})\n"
384384
" More information: "
385-
"https://docs.pyinfra.com/en/latest/using-operations.html#nested-operations",
385+
"https://docs.pyinfra.com/en/2.x/using-operations.html#nested-operations",
386386
)
387387
op_data["parent_op_hash"] = host.executing_op_hash
388388
log_operation_start(op_meta, op_types=["nested"], prefix="")

0 commit comments

Comments
 (0)