all lists on lists.proxmox.com
 help / color / mirror / Atom feed
From: Thomas Lamprecht <t.lamprecht@proxmox.com>
To: pdm-devel@lists.proxmox.com, Lukas Wagner <l.wagner@proxmox.com>
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	[thread overview]
Message-ID: <179188496691.3526342.16241457518757230292.b4-ty@b4> (raw)
In-Reply-To: <20261002093616.206933-1-l.wagner@proxmox.com>

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<T> 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




      parent reply	other threads:[~2026-10-13  9:58 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-02  9:35 [PATCH datacenter-manager/proxmox v6 00/21] inject application context via API macro for easier integration testing Lukas Wagner
2026-10-02  9:35 ` [PATCH proxmox v6 01/21] router: introduce shared state Lukas Wagner
2026-10-02  9:35 ` [PATCH proxmox v6 02/21] rest-server: allow to inject " Lukas Wagner
2026-10-02  9:35 ` [PATCH proxmox v6 03/21] api-macro: support #[state] attribute for state injection Lukas Wagner
2026-10-02  9:35 ` [PATCH proxmox v6 04/21] product-config: add ProductConfig type Lukas Wagner
2026-10-02  9:36 ` [PATCH datacenter-manager v6 05/21] context: promote context to a dir-style module Lukas Wagner
2026-10-02  9:36 ` [PATCH datacenter-manager v6 06/21] pdm-config: remotes: rename trait methods to read/write/lock Lukas Wagner
2026-10-02  9:36 ` [PATCH datacenter-manager v6 07/21] pdm-config: subscriptions: " Lukas Wagner
2026-10-02  9:36 ` [PATCH datacenter-manager v6 08/21] context: introduce a ContextFactory to build application context Lukas Wagner
2026-10-02  9:36 ` [PATCH datacenter-manager v6 09/21] context: establish PdmApplication object Lukas Wagner
2026-10-02  9:36 ` [PATCH datacenter-manager v6 10/21] context: register PdmApplication in router Lukas Wagner
2026-10-02  9:36 ` [PATCH datacenter-manager v6 11/21] connection: use client factory from PdmApplication handle Lukas Wagner
2026-10-02  9:36 ` [PATCH datacenter-manager v6 12/21] remote iterator: pass remote config reader explicitly Lukas Wagner
2026-10-02  9:36 ` [PATCH datacenter-manager v6 13/21] parallel fetcher: pass arguments to closure in a single type Lukas Wagner
2026-10-02  9:36 ` [PATCH datacenter-manager v6 14/21] server: migrate existing ParallelFetcher users to use PdmApplication Lukas Wagner
2026-10-02  9:36 ` [PATCH datacenter-manager v6 15/21] tests: add helpers for building API-handler-level integration tests Lukas Wagner
2026-10-02  9:36 ` [PATCH datacenter-manager v6 16/21] tests: add example tests for SDN API routes Lukas Wagner
2026-10-02  9:36 ` [PATCH datacenter-manager v6 17/21] api-cache: add wrapper type Lukas Wagner
2026-10-02  9:36 ` [PATCH datacenter-manager v6 18/21] context: provide api-cache on the app object Lukas Wagner
2026-10-02  9:36 ` [PATCH datacenter-manager v6 19/21] api: subscriptions: use PdmApplication instead of globals Lukas Wagner
2026-10-02  9:36 ` [PATCH datacenter-manager v6 20/21] pdm-config: subscriptions: drop unused accessor functions Lukas Wagner
2026-10-02  9:36 ` [PATCH datacenter-manager v6 21/21] tests: add example tests for remote subscription management Lukas Wagner
2026-10-13  9:49 ` Thomas Lamprecht [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=179188496691.3526342.16241457518757230292.b4-ty@b4 \
    --to=t.lamprecht@proxmox.com \
    --cc=l.wagner@proxmox.com \
    --cc=pdm-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal