From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate001.proxmox.com (gate001.proxmox.com [IPv6:2a0f:8001:1:32::40]) by lore.proxmox.com (Postfix) with ESMTPS id 4A6ED1FF0AE for ; Tue, 13 Oct 2026 11:58:57 +0200 (CEST) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id 084BA21260; Tue, 13 Oct 2026 11:58:57 +0200 (CEST) From: Thomas Lamprecht To: pdm-devel@lists.proxmox.com, Lukas Wagner Subject: applied: [PATCH datacenter-manager/proxmox v6 00/21] inject application context via API macro for easier integration testing Date: Tue, 13 Oct 2026 11:49:31 +0200 Message-ID: <179188496691.3526342.16241457518757230292.b4-ty@b4> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20261002093616.206933-1-l.wagner@proxmox.com> References: <20261002093616.206933-1-l.wagner@proxmox.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1791885533542 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.436 Adjusted score from AWL reputation of From: address DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment (newer systems) KAM_LOTSOFHASH 0.25 Emails with lots of hash-like gibberish RCVD_IN_DNSWL_MED -2.3 Sender listed at https://www.dnswl.org/, medium trust SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Message-ID-Hash: B725DXUUEL5BPPGPFQI7KYHPRCXTJVL5 X-Message-ID-Hash: B725DXUUEL5BPPGPFQI7KYHPRCXTJVL5 X-MailFrom: t.lamprecht@proxmox.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Proxmox Datacenter Manager development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: On Fri, 02 Oct 2026 11:35:55 +0200, Lukas Wagner wrote: > TL;DR: Inject essential runtime config, client factory, etc. as an application > context object and allow to retrieve this object easily in an API handler via > the API macro. This allows us directly call API handler implementations from > integration tests. The aim is to make it easier to write good tests on a larger > level. > > ## Rationale > > [...] Applied, many thanks! With some small changes on top: - proxmox: added "api-macro: recognize fully qualified Option types" before the #[state] patch, which got tests for it. The Option detection only recognized a bare Option, so a #[state] parameter spelled std::option::Option was treated as required and looked up as the Option type itself. - small comment and commit message fix up folded in to replaced the roadmap note in context::init with the invariant the second remote-config instance relies on, and corrected the message of "context: provide api-cache on the app object", as the cache stays in the runtime directory and the creation option helpers are part of proxmox-product-config. - pdm follow-ups: the subscription test config now derives its digest from the serialized config and takes a real lock file, so the stale-digest checks and the locking are actually exercised, and a new test calls the handlers through the generated wrappers with REST and CLI environments to cover the #[state] extraction itself. [datacenter-manager] applied to git/proxmox-datacenter-manager.git (master) [01/17] context: promote context to a dir-style module commit: ac20748db1be890017ecd27c477ff0f185f219b4 [02/17] pdm-config: remotes: rename trait methods to read/write/lock commit: d5f9a1eedefeae7cf291e6923e327d0a344f93bb [03/17] pdm-config: subscriptions: rename trait methods to read/write/lock commit: a19f08d663857acb5523d98b354db43904a8add5 [04/17] context: introduce a ContextFactory to build application context commit: 5a2e820b4fcef0bc47755052a7b1500c26b1e43f [05/17] context: establish PdmApplication object commit: 6ca07ad609a510496f9441b58b7f3ba37436472b [06/17] context: register PdmApplication in router commit: 162a9fa9d5c2fa227a5ad6969682a13b6a85bf67 [07/17] connection: use client factory from PdmApplication handle commit: 5b49145d65df379d2686ab48d6dda3dcc0d17ffc [08/17] remote iterator: pass remote config reader explicitly commit: fbdf04ecc3f4c81f7d3367c74e775c60c6a09473 [09/17] parallel fetcher: pass arguments to closure in a single type commit: 0d063b2e3b6fe5468ad45b50524a488919b257d7 [10/17] server: migrate existing ParallelFetcher users to use PdmApplication commit: 321da9ba287f053c79c90644ab2169cbc0a04581 [11/17] tests: add helpers for building API-handler-level integration tests commit: 0f880122469295bad86efd763c23b1e0c9c84a11 [12/17] tests: add example tests for SDN API routes commit: f9048e5588fefb7c9ef188c990f7ccc2a8074ba5 [13/17] api-cache: add wrapper type commit: 09c7f8c0811b548672d48793bac6ad3fcf293925 [14/17] context: provide api-cache on the app object commit: a196d00c3a5ed28048eda24bf73e8b38c3a8eb2d [15/17] api: subscriptions: use PdmApplication instead of globals commit: 6490f95ac479099774782532eb836f5f702d4249 [16/17] pdm-config: subscriptions: drop unused accessor functions commit: 2f1f8e6b24948af2b577e77ae0178d024323f404 [17/17] tests: add example tests for remote subscription management commit: 948853e7d7929dd87daf331ef200657c6537a44d [proxmox] applied to git/proxmox.git (master) [1/4] router: introduce shared state commit: 225eab6210a01b954171d2188c2b0c7e09cdba2d [2/4] rest-server: allow to inject shared state commit: eec01261f096350934deadb3e39225199b07b6c0 [3/4] api-macro: support #[state] attribute for state injection commit: 00985f3784d129fcc41d97f98eb0e658e868237b [4/4] product-config: add ProductConfig type commit: 62099460c87a64498f64c2955be216bb118f6741