[pve-devel] applied: [PATCH installer] fetch-answer: add `$fetchinfo` meta-field to HTTP POST payload

Thomas Lamprecht t.lamprecht at proxmox.com
Thu Nov 14 21:05:58 CET 2024


Am 13.11.24 um 10:06 schrieb Christoph Heiss:
> This adds a metadata-field `$fetchinfo` containing a single key
> `version` (for now) to the POST payload json, indicating which schema
> version (and thus structure) this document uses.
> 
> The version field follows the format "<major>.<minor>" and applies
> semantic versioning meaning for both the major and minor number. A patch
> version is left out here, as it doesn't make much sense in this context.
> 
> Works in the same manner as the post-hook does it [0]. Useful to have it
> for this too, as we might change/expand this structure too in the
> future.
> 
> In the resulting JSON, this will look like this:
> {
>     "$fetchinfo": {
> 	"version": "1.0"
>     },
>     "product": ..,
>     ..
> }
> 
> [0] https://lore.proxmox.com/pve-devel/20241112145405.929194-1-c.heiss@proxmox.com/
> 
> Signed-off-by: Christoph Heiss <c.heiss at proxmox.com>
> ---
>  proxmox-auto-installer/src/sysinfo.rs         |  5 --
>  proxmox-fetch-answer/Cargo.toml               |  2 +
>  .../src/fetch_plugins/http.rs                 | 65 ++++++++++++++++++-
>  3 files changed, 66 insertions(+), 6 deletions(-)
> 
>

applied, thanks!

But I made a follow-up to rename both meta keys, i.e. this and the post-hook
one, to `$format-info`. Reasoning is mostly consistency for similar things,
IMO users might wonder slightly why they are called different things and we
really do not want to change those anymore.

Anyhow, I'm not fixated on these specific names, feel free to change them,
and I'm not blocking different names, but I'd like some good reasoning for
why not call the keys the same thing if they tell the user the same thing.




More information about the pve-devel mailing list