From: Markus Armbruster <armbru@pond.sub.org>
To: John Snow <jsnow@redhat.com>
Cc: qemu-devel@nongnu.org, crosa@redhat.com, marcandre.lureau@redhat.com
Subject: Re: [PATCH] python/qemu: Don't choke on unknown members in QMP replies
Date: Fri, 20 Nov 2026 05:35:41 +0100 [thread overview]
Message-ID: <87qzgg86hu.fsf@pond.sub.org> (raw)
In-Reply-To: <CAFn=p-bz6_SW7OR-wxTcLPQfq5D2G5YRXLuH9wc+cORh8E8=1A@mail.gmail.com> (John Snow's message of "Thu, 19 Nov 2026 13:11:02 -0500")
John Snow <jsnow@redhat.com> writes:
> On Wed, Nov 18, 2026 at 1:20 PM Markus Armbruster <armbru@redhat.com> wrote:
>>
>> The recent addition of @qapi-type to ObjectPropertyInfo and
>> ObjectPropertyValue broke the corresponding classes in
>> qemu/utils/qom_common. Reproducer:
>
> Do we need that qapi-type for anything in the client?
Not yet, but I'm working on a followup series that uses it.
>>
>> $ bld/run qom-list -s qmp-socket /chardevs
>> Traceback (most recent call last):
>> File "/work/armbru/qemu/bld/pyvenv/bin/qom-list", line 8, in <module>
>> sys.exit(QOMList.entry_point())
>> ~~~~~~~~~~~~~~~~~~~^^
>> File "/work/armbru/qemu/python/qemu/utils/qom_common.py", line 230, in entry_point
>> return cls.command_runner(args)
>> ~~~~~~~~~~~~~~~~~~^^^^^^
>> File "/work/armbru/qemu/python/qemu/utils/qom_common.py", line 215, in command_runner
>> return cmd.run()
>> ~~~~~~~^^
>> File "/work/armbru/qemu/python/qemu/utils/qom.py", line 179, in run
>> rsp = self.qom_list(self.path)
>> File "/work/armbru/qemu/python/qemu/utils/qom_common.py", line 192, in qom_list
>> return [ObjectPropertyInfo.make(x) for x in rsp]
>> ~~~~~~~~~~~~~~~~~~~~~~~^^^
>> File "/work/armbru/qemu/python/qemu/utils/qom_common.py", line 52, in make
>> assert value.keys() <= {'name', 'type', 'description', 'default-value'}
>> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>> AssertionError
>>
>> This asserts "no members we don't know". There are two more like it.
>>
>> Adding @qapi-type broke them.
>>
>> docs/devel/qapi-code-gen.rst section "Compatibility considerations"
>> stipulates that "clients are expected to ignore [members] they don't
>> know."
>>
>> Delete / relax these assertions.
>>
>> Fixes: 0eee31cf1085 ("qapi/qom: add qapi-type to qom-list, qom-list-properties, qom-list-get")
>> Fixes: c750c02891a8 ("python/qmp: Add qom script rewrites")
>> Signed-off-by: Markus Armbruster <armbru@redhat.com>
>
> Reviewed-by: John Snow <jsnow@redhat.com>
Thanks!
prev parent reply other threads:[~2026-11-20 4:36 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-18 18:20 [PATCH] python/qemu: Don't choke on unknown members in QMP replies Markus Armbruster
2026-11-19 11:36 ` Daniel P. Berrangé
2026-11-19 18:11 ` John Snow
2026-11-20 4:35 ` Markus Armbruster [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=87qzgg86hu.fsf@pond.sub.org \
--to=armbru@pond.sub.org \
--cc=crosa@redhat.com \
--cc=jsnow@redhat.com \
--cc=marcandre.lureau@redhat.com \
--cc=qemu-devel@nongnu.org \
/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.