[pbs-devel] [PATCH proxmox v2 0/3] fix #6161: time: Split parse_time_spec parser into two

Thomas Lamprecht t.lamprecht at proxmox.com
Wed Aug 27 11:02:02 CEST 2025


On 27/08/2025 10:40, Maximiliano Sandoval wrote:
>> What about the backward compat concerns from Dominik and Fiona, I see
>> nothing written anywhere in this series addressing them, or did I just
>> overlooked that?
>>
>> Could we treat only serializing strict and deserializing not?
> I am not sure if it is possible or something we do in general. We would
> need to be strict when de-serializing from the web UI (to prevent wrong
> entries from reaching the configuration file) but be more lenient when
> de-serializing from the configuration file.
> 

Yes, that's the idea ;-) It is a pattern we employed quite a few times
in the past already.
I.e., accept and directly map legacy variants to the "good format" on
parse, then when it gets serialized out again it will be automatically
in the modern "correct" format.

As all that was parsed got transformed to new one can safely block any
legacy variant on serialization, as there such old variants must come
from the API then. Rejecting this in the UI already is rather extra
convenience that is nice to have but not a bare necessity.




More information about the pbs-devel mailing list