Skip to content

Commit cfc5367

Browse files
authored
release 0.3.1 (#9)
* failure events arrive natively, and a wake can no longer be lost events() streams refusals without a poll: the EventNotifier parks in wait_for_event and the engine wakes it for installs and refused reloads alike; failure_poll parses, warns, and does nothing. On the way, the suite caught a wake that could be LOST: the notifier thread read its baseline generation on its own first instruction, so an install racing the thread's birth folded into the baseline and was never reported — the baseline now reads on the caller's thread under the registration lock, in both notifiers. Wheels build on engine 0.8 and the 0.8 store crates with the dev-only patch block gone, and CI runs only where review happens: on the pull request. * release dynamic-config-py and dynamic-config-py-remote 0.3.1 * the conformance pin names a tag that exists The job pinned the engine tarball at v0.7.1 — written before the release, which then shipped as v0.8.0 because semver said so. The published wheel agrees with all twenty v0.8.0 cases, verified before this push.
1 parent 9e77958 commit cfc5367

32 files changed

Lines changed: 882 additions & 278 deletions

‎.github/workflows/ci.yml‎

Lines changed: 51 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,11 @@
11
name: CI
22

3-
# No push trigger for `dev`: everything on dev travels through a pull
4-
# request anyway, and a push run would twin the PR run on the same commit —
5-
# under *required* checks, a deduplicating cancellation poisons the gate
6-
# (a cancelled twin's "CI is green" reads as failure and blocks the merge).
7-
# `main` keeps its push trigger because a rebase-merge mints a new SHA that
8-
# no PR run ever checked.
3+
# No push trigger at all: everything travels through a pull request, and
4+
# main only ever receives a SQUASH of a green PR — the squashed tree is
5+
# byte-identical to the PR head the checks already ran on, so a main
6+
# re-run would test the same content twice. Merging runs release.yml
7+
# alone; workflow_dispatch stays as the manual escape hatch.
98
on:
10-
push:
11-
branches: [main]
129
pull_request:
1310
workflow_dispatch:
1411

@@ -29,6 +26,50 @@ env:
2926
RUST_BACKTRACE: 1
3027

3128
jobs:
29+
conformance:
30+
name: the three languages agree
31+
runs-on: ubuntu-latest
32+
timeout-minutes: 20
33+
steps:
34+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
35+
# The engine's conformance cases, at a PINNED ref: bumping the pin is
36+
# a visible PR diff, which is the point — semantics move only when
37+
# somebody says so.
38+
- run: |
39+
ref="v0.8.0" # the engine release these wheels build against
40+
curl -sSL "https://github.com/dynamic-config-rs/dynamic-config/archive/refs/tags/${ref}.tar.gz" \
41+
| tar -xz --strip-components=1 --wildcards '*/conformance/'
42+
- uses: actions/setup-python@2e3e4b15a884dc73a63f962bff250a855150a234 # v6
43+
with:
44+
python-version: "3.12"
45+
- run: pip install dynamic-config-py
46+
- run: CONFORMANCE_DIR=conformance/cases python scripts/conformance.py
47+
48+
msrv:
49+
name: the declared floor compiles
50+
runs-on: ubuntu-latest
51+
timeout-minutes: 30
52+
steps:
53+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
54+
- uses: dtolnay/rust-toolchain@6c977a6ca4077a0ceb28ffbe03f59d46e9ac8772 # master
55+
with:
56+
toolchain: stable
57+
# The stores reach `etcd-client`, whose build script compiles protos.
58+
- run: sudo apt-get update && sudo apt-get install -y protobuf-compiler
59+
# A lockfile resolved by stable, then checked by the floor — the
60+
# combination `pip install` + our build actually produces. This job
61+
# did not exist before the 1.88 raise; a floor nobody compiles
62+
# against is a number in a manifest.
63+
- run: cargo generate-lockfile
64+
- uses: dtolnay/rust-toolchain@6c977a6ca4077a0ceb28ffbe03f59d46e9ac8772 # master
65+
with:
66+
toolchain: "1.88"
67+
- uses: Swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 # v2
68+
with:
69+
shared-key: msrv
70+
- run: cargo +1.88 check -p dynamic-config-python --locked --lib
71+
- run: cargo +1.88 check -p dynamic-config-python-remote --locked --lib
72+
3273
# What changed, so the expensive jobs below can sit out a run that cannot
3374
# affect them. Deliberately a *job* rather than `on.pull_request.paths`:
3475
# a workflow filtered out at the trigger never reports at all, and a
@@ -419,6 +460,8 @@ jobs:
419460
- python-free-threaded
420461
- docs-links
421462
- actionlint
463+
- msrv
464+
- conformance
422465
if: always()
423466
runs-on: ubuntu-latest
424467
timeout-minutes: 5

‎.github/workflows/nightly.yml‎

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Nightly
2+
3+
# The binding-side leak budget: callback and notifier lifecycles are
4+
# where leaks hide even when the Rust core is clean. The engine's
5+
# nightly carries the 5-hour soak; these legs churn the binding's own
6+
# machinery a million times and hold the deltas to a budget.
7+
on:
8+
schedule:
9+
- cron: "23 1 * * *"
10+
workflow_dispatch:
11+
12+
permissions:
13+
contents: read
14+
15+
jobs:
16+
leak:
17+
name: a million reloads leak nothing
18+
runs-on: ubuntu-latest
19+
timeout-minutes: 90
20+
steps:
21+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
22+
- uses: actions/setup-python@2e3e4b15a884dc73a63f962bff250a855150a234 # v6
23+
with:
24+
python-version: "3.12"
25+
- run: pip install dynamic-config-py
26+
- run: LEAK_RELOADS=1000000 python scripts/leak.py

‎.github/workflows/publish-dry-run.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ name: Publish dry run
66
# manifests change, not when the code does.
77
on:
88
push:
9-
branches: [main, dev]
9+
branches: [dev]
1010
paths:
1111
- "**/Cargo.toml"
1212
- "**/README.md"

‎.github/workflows/release.yml‎

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -293,22 +293,27 @@ jobs:
293293
&& (needs.decide.outputs.release == 'true' || github.event_name == 'workflow_dispatch')
294294
runs-on: ubuntu-latest
295295
timeout-minutes: 15
296+
permissions:
297+
# Trusted publishing: PyPI verifies THIS workflow's OIDC identity
298+
# and mints a short-lived token — no PYPI_TOKEN to store, leak or
299+
# rotate. Both projects (`dynamic-config-py`,
300+
# `dynamic-config-py-remote`) carry a Trusted Publisher entry on
301+
# PyPI naming this repository and this file; that console entry is
302+
# a release-train prerequisite and OUTSTANDING.md spells it out.
303+
id-token: write
296304
steps:
297305
- uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4
298306
with:
299307
pattern: wheels-*
300308
merge-multiple: true
301309
path: dist
302-
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5
310+
# `skip-existing`: a version on PyPI is permanent, so the only way
311+
# forward after a partial failure is a rerun that publishes the
312+
# remainder.
313+
- uses: pypa/gh-action-pypi-publish@dc37677b2e1c63e2034f94d8a5b11f265b73ba33 # v1.14.2
303314
with:
304-
python-version: "3.13"
305-
# what is already uploaded: a version on PyPI is permanent, so the
306-
# only way forward after a partial failure is a rerun that publishes
307-
# the remainder.
308-
- run: pip install maturin
309-
- run: maturin upload --skip-existing dist/*
310-
env:
311-
MATURIN_PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
315+
packages-dir: dist
316+
skip-existing: true
312317

313318
tag-and-release:
314319
name: tag and GitHub release

‎.github/workflows/security.yml‎

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@ name: Security
77
# No push trigger for `dev` — same reasoning as ci.yml: dev travels through
88
# pull requests, and a push twin under required checks poisons the gate.
99
on:
10-
push:
11-
branches: [main]
1210
pull_request:
1311
schedule:
1412
- cron: "17 6 * * 1"
@@ -23,6 +21,24 @@ permissions:
2321
contents: read
2422

2523
jobs:
24+
policy:
25+
name: the security policy names the current line
26+
runs-on: ubuntu-latest
27+
timeout-minutes: 5
28+
steps:
29+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
30+
# The stale-table drift this org has already lived through once:
31+
# SECURITY.md said 0.0.x while the workspace shipped 0.7. The table's
32+
# top row must name the line that is actually published.
33+
- run: |
34+
version=$(grep -m1 '^version = ' dynamic-config-python/Cargo.toml | cut -d'"' -f2)
35+
line="${version%.*}.x"
36+
if ! grep -qF "| ${line}" SECURITY.md; then
37+
echo "::error file=SECURITY.md::the supported-versions table does not name ${line} (workspace is ${version})"
38+
exit 1
39+
fi
40+
echo "SECURITY.md names ${line} — current"
41+
2642
deny:
2743
name: advisories, licences, sources
2844
runs-on: ubuntu-latest
@@ -149,7 +165,7 @@ jobs:
149165
# — which is the whole point of running it.
150166
security-ok:
151167
name: Security is green
152-
needs: [deny, unsafe, osv, supply-chain]
168+
needs: [policy, deny, unsafe, osv, supply-chain]
153169
if: always()
154170
runs-on: ubuntu-latest
155171
timeout-minutes: 5

0 commit comments

Comments
 (0)