Skip to content

Fix D-Bus docs after ZFCP and Questions changes#628

Merged
mvidner merged 9 commits intomasterfrom
doc-dbus-fix
Jun 20, 2023
Merged

Fix D-Bus docs after ZFCP and Questions changes#628
mvidner merged 9 commits intomasterfrom
doc-dbus-fix

Conversation

@mvidner
Copy link
Copy Markdown
Contributor

@mvidner mvidner commented Jun 14, 2023

Problem

After merging the ZFCP changes (#594) to master, CI fails because it thinks the D-Bus API and its docs have diverged. Well it has, but...

Solution

  • seed the new API. TODO add the seeding to CI
  • document new API... kindof
  • run that check in the branches already, not only as part of publishing the docs in master

The diff is messy because Ruby and Rust have random differences in equivalent introspection XML :-/
Reviewing by commits helps that a bit.

Testing

  • existing CI tests

@mvidner mvidner changed the title Doc dbus fix Fix D-Bus docs after ZFCP and Questions changes Jun 14, 2023
@coveralls
Copy link
Copy Markdown

coveralls commented Jun 14, 2023

Pull Request Test Coverage Report for Build 5322725513

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 76.798%

Totals Coverage Status
Change from base Build 5320333180: 0.0%
Covered Lines: 5637
Relevant Lines: 7095

💛 - Coveralls

<arg type="s" direction="out"/>
</method>
</interface>
<interface name="org.opensuse.Agama.Questions1.Generic">
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Questions1.Generic is defined three times (Questions1.bus.xml, Questions1.Generic.bus.xml and Questions1.LuksActivation.bus.xml). Is that expected? I am not sure if that is the best way for documenting objects with dynamic interfaces.

Copy link
Copy Markdown
Contributor

@joseivanlopez joseivanlopez Jun 15, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In fact, I think the file names could be misleading. For example, I would expect that doc/dbus/bus/org.opensuse.Agama.Questions1.Generic.bus.xml defines the Questions1.Generic interface, but it defines all the interfaces of an object that only includes Questions1.Generic interface.

I would expect to have both, object docs and interface docs. And an object doc only includes the name of the interfaces, for example:

doc/dbus/objects/question/generic.xml
<node name="/org/opensuse/Agama/Storage1/questions/[0-9]+">
  <interface name="org.freedesktop.DBus.Introspectable" />
  <interface name="org.freedesktop.DBus.Peer" />
  <interface name="org.opensuse.Agama.Questions1.Generic" />
</node

doc/dbus/objects/question/luks_activation.xml
<node name="/org/opensuse/Agama/Storage1/questions/[0-9]+>
  <interface name="org.freedesktop.DBus.Introspectable" />
  <interface name="org.freedesktop.DBus.Peer" />
  <interface name="org.opensuse.Agama.Questions1.Generic" />
  <interface name="org.opensuse.Agama.Questions1.LuksActivation" />
</node

doc/dbus/interfaces/org.opensuse.Agama.Questions1.Generic.xml
<interface name="org.opensuse.Agama.Questions1.Generic">
  <property name="Answer" type="s" access="readwrite"/>
  <property name="DefaultOption" type="s" access="read"/>
  <property name="Id" type="u" access="read"/>
  <property name="Options" type="as" access="read"/>
  <property name="Text" type="s" access="read"/>
</interface>

In general, something similar to what UDisks2 does. What do you think?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Questions1.Generic is defined three times (Questions1.bus.xml, Questions1.Generic.bus.xml and Questions1.LuksActivation.bus.xml).

Well no, it is documented once in .doc.xml, and mentioned in the introspection output of a generic question, and of a Luks question which must include it because it is a subclass. I'll improve bus/README.md about this.

ooAQ1.Generic.doc.xml
bus/ooAQ1.Generic.bus.xml
bus/ooAQ1.LuksActivation.bus.xml

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would expect to have both, object docs and interface docs.

Very good point, I have so far concentrated on the automated part and limited the output to the interfaces.
We also need documenting the objects (object trees) and which interfaces they implement. Probably some manually written pieces.

Copy link
Copy Markdown
Contributor

@joseivanlopez joseivanlopez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, but opening a discussion about the doc organization.

@mvidner mvidner merged commit bd7c81e into master Jun 20, 2023
@mvidner mvidner deleted the doc-dbus-fix branch June 20, 2023 13:02
@imobachgs imobachgs mentioned this pull request Aug 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants