Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion packages/adcp-reporting-storage/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,8 @@ Install `adcp>=10.0.0b7` with this release.
| 0.1.0b4+ (SDK 9 line) | 1 | `>=9.0.0,<10` |
| 0.2.0b0 | 1 | `>=9.0.0,<11` (**do not pair with 10.0.0b4+**: 10.0.0b4 and b5 install beside it and fail, b7+ refuse it, [#1763](https://github.com/adcontextprotocol/adcp-client-python/issues/1763)) |
| 0.2.0b1–0.2.0b4 | 2 | `>=10.0.0b4,<11` |
| 0.2.0b5+ | 3 | first adcp of contract 3 (10.0.0b24) |
| 0.2.0b5–0.2.0b9 | 3 | first adcp of contract 3 (10.0.0b24) |
| 0.2.0b11+ | 4 | first adcp of contract 4 (10.2.0); 0.2.0b10 was never published |

`adcp` never imports this package; a test in the main repository enforces that.

Expand Down
13 changes: 6 additions & 7 deletions packages/adcp-reporting-storage/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,12 @@ dependencies = [
# major means a new release here.
#
# The floor is the first adcp release whose storage contract this package
# implements (``adcp_reporting_storage.contract``). Contract 3 is
# ``media_buy_scope`` on configurations (migration 0009), first read by
# 10.0.0b24; an older adcp installed beside it would fail every reporting
# turn, as 10.0.0b4 did beside 0.2.0b0 (#1763). Move the floor together with
# STORAGE_CONTRACT; RELEASING.md orders the two releases of a contract bump.
# At ratification the range narrows to ``adcp>=10.0.0,<11``.
"adcp>=10.0.0b24,<11",
# implements (``adcp_reporting_storage.contract``). Contract 4 is sub-daily
# reliable reporting (#2021), first read by 10.2.0; an older adcp installed
# beside it would fail every reporting turn, as 10.0.0b4 did beside 0.2.0b0
# (#1763). Move the floor together with STORAGE_CONTRACT; RELEASING.md orders
# the two releases of a contract bump.
"adcp>=10.2.0,<11",
# RFC 8785 canonical JSON for row bodies and object keys; the same pin as adcp.
"rfc8785>=0.1.4",
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
#: The reporting storage contract this distribution's DDL and stores implement.
STORAGE_CONTRACT = 4
#: The first adcp release that reads the ledger with :data:`STORAGE_CONTRACT`.
_FIRST_ADCP = "10.0.0"
_FIRST_ADCP = "10.2.0"
#: The last adcp-reporting-storage release of each earlier contract.
_LAST_STORAGE = {1: "0.2.0b0", 2: "0.2.0b4", 3: "0.2.0b9"}

Expand Down
4 changes: 2 additions & 2 deletions tests/test_release_configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -191,15 +191,15 @@ def test_storage_distribution_pins_one_adcp_major() -> None:

The floor is the first adcp release of the storage contract the package
implements (``adcp_reporting_storage.contract``): on next that is
10.0.0b24, the first to read ``media_buy_scope`` (contract 3). A floor
10.2.0, the first to read sub-daily reliable reporting (contract 4). A floor
below the contract lets an adcp of another contract install beside the
storage and fail every reporting turn, as 10.0.0b4 did beside 0.2.0b0
(#1763). The ceiling stays the next major (see RELEASING.md).
"""
pyproject = (STORAGE / "pyproject.toml").read_text()
if (ROOT / "release-please-config.next.json").exists():
assert re.search(
r'"adcp>=10\.0\.0b24,<11"', pyproject
r'"adcp>=10\.2\.0,<11"', pyproject
), "next's storage floor is the first adcp of its storage contract"
else:
assert re.search(r'"adcp>=9\.0\.0(?:b\d+)?,<10"', pyproject), "adcp range must be one major"
2 changes: 1 addition & 1 deletion tests/test_reporting_storage_facade.py
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ def test_a_postgres_store_refuses_an_adcp_of_another_contract(monkeypatch) -> No
assert error.code == "REPORTING_SCHEMA_BEHIND" and error.recovery == "correctable"
assert error.config_field == "adcp-reporting-storage"
assert "storage contract 1" in str(error) and "implements contract 4" in str(error)
assert "Install adcp 10.0.0 or later" in str(error)
assert "Install adcp 10.2.0 or later" in str(error)
assert "adcp-reporting-storage 0.2.0b0 with this adcp" in str(error)
monkeypatch.setattr(contract, "adcp_storage_contract", lambda: 5)
with pytest.raises(ReliableReportingConfigurationError, match="newer than"):
Expand Down