Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

admin/doc-requirements: bump sphinx to 4.4.0 #45266

Merged
merged 7 commits into from Mar 9, 2022
Merged

Conversation

tchaikov
Copy link
Contributor

@tchaikov tchaikov commented Mar 5, 2022

bump sphinx to latest stable. to address following build failure

ERROR: sphinx-autodoc-typehints 1.17.0 has requirement Sphinx>=4, but you'll have sphinx 3.5.4 which is incompatible.
ERROR: sphinx-substitution-extensions 2022.2.16 has requirement sphinx>=4.0.0, but you'll have sphinx 3.5.4 which is incompatible.

also bump bump sphinx-rtd-theme

otherwise we'd have

ERROR: sphinx-rtd-theme 0.5.2 has requirement docutils<0.17, but you'll have docutils 0.17.1 which is incompatible.

Signed-off-by: Kefu Chai tchaikov@gmail.com

Checklist

  • Tracker (select at least one)
    • References tracker ticket
    • Very recent bug; references commit where it was introduced
    • New feature (ticket optional)
    • Doc update (no ticket needed)
    • Code cleanup (no ticket needed)
  • Component impact
    • Affects Dashboard, opened tracker ticket
    • Affects Orchestrator, opened tracker ticket
    • No impact that needs to be tracked
  • Documentation (select at least one)
    • Updates relevant documentation
    • No doc update is appropriate
  • Tests (select at least one)
Show available Jenkins commands
  • jenkins retest this please
  • jenkins test classic perf
  • jenkins test crimson perf
  • jenkins test signed
  • jenkins test make check
  • jenkins test make check arm64
  • jenkins test submodules
  • jenkins test dashboard
  • jenkins test dashboard cephadm
  • jenkins test api
  • jenkins test docs
  • jenkins render docs
  • jenkins test ceph-volume all
  • jenkins test ceph-volume tox
  • jenkins test windows

@tchaikov
Copy link
Contributor Author

tchaikov commented Mar 5, 2022

jenkins test docs

@tchaikov
Copy link
Contributor Author

tchaikov commented Mar 5, 2022

retest this please.

bump sphinx to latest stable. to address following build failure

ERROR: sphinx-autodoc-typehints 1.17.0 has requirement Sphinx>=4, but you'll have sphinx 3.5.4 which is incompatible.
ERROR: sphinx-substitution-extensions 2022.2.16 has requirement sphinx>=4.0.0, but you'll have sphinx 3.5.4 which is incompatible.

also bump bump sphinx-rtd-theme, otherwise we'd have following
build failure:

ERROR: sphinx-rtd-theme 0.5.2 has requirement docutils<0.17, but you'll have docutils 0.17.1 which is incompatible.

Signed-off-by: Kefu Chai <tchaikov@gmail.com>
@ljflores
Copy link
Contributor

ljflores commented Mar 5, 2022

jenkins test docs

@tchaikov
Copy link
Contributor Author

tchaikov commented Mar 6, 2022

jenkins test docs

this allows the "rpc"ized methods of OrchestratorClientMixin to
have the docstring defined by the original methods.

Signed-off-by: Kefu Chai <tchaikov@gmail.com>
this helps to silence the warning from sphinx, like

src/pybind/mgr/orchestrator/_interface.py:docstring of orchestrator._interface.Orchestrator.remove_osds:9: WARNING: Field list ends without a blank line; unexpected unindent.

Signed-off-by: Kefu Chai <tchaikov@gmail.com>
breathe calls doxygen for extracting/generating docs from code.
while doxygen complains at seeing undocumented fields/func. these
warnings could fail the sphinx-build command, if it takes warnings
as errors.

in this change, these warnings are silenced.

Signed-off-by: Kefu Chai <tchaikov@gmail.com>
@tchaikov tchaikov requested a review from a team as a code owner March 6, 2022 06:29
@tchaikov
Copy link
Contributor Author

tchaikov commented Mar 6, 2022

@ljflores hi Laura, thanks for your review and approval. but it seems sphinx 4.x is more picky, and it considers the warnings as errors and hence fails the sphinx-build command. i just added a couple commits to address the warnings. but two of the new changes are related to the orchestrator, so i am adding @sebastian-philipp as another reviewer so he could help review the related change. also, could you help review the new changes added on top of the existing commits, namely the "doc/conf.py: silence warnings from breathe change.

@sebastian-philipp hi Sebastian, could you please help review the orchestrator related change? the goal is to silence the new warnings from Sphinx 4.4.0. like

WARNING: Cannot handle as a local function: "orchestrator.OrchestratorClientMixin.add_daemon" (use @functools.wraps)
WARNING: Cannot handle as a local function: "orchestrator.OrchestratorClientMixin.add_host" (use @functools.wraps)
WARNING: Cannot handle as a local function: "orchestrator.OrchestratorClientMixin.add_host_label" (use @functools.wraps)
WARNING: Cannot handle as a local function: "orchestrator.OrchestratorClientMixin.apply" (use @functools.wraps)
WARNING: Cannot handle as a local function: "orchestrator.OrchestratorClientMixin.apply_alertmanager" (use @functools.wraps)
WARNING: Cannot handle as a local function: "orchestrator.OrchestratorClientMixin.apply_crash" (use @functools.wraps)
WARNING: Cannot handle as a local function: "orchestrator.OrchestratorClientMixin.apply_drivegroups" (use @functools.wraps)
WARNING: Cannot handle as a local function: "orchestrator.OrchestratorClientMixin.apply_grafana" (use @functools.wraps)
WARNING: Cannot handle as a local function: "orchestrator.OrchestratorClientMixin.apply_ingress" (use @functools.wraps)
WARNING: Cannot handle as a local function: "orchestrator.OrchestratorClientMixin.apply_iscsi" (use @functools.wraps)
WARNING: Cannot handle as a local function: "orchestrator.OrchestratorClientMixin.apply_mds" (use @functools.wraps)
WARNING: Cannot handle as a local function: "orchestrator.OrchestratorClientMixin.apply_mgr" (use @functools.wraps)
WARNING: Cannot handle as a local function: "orchestrator.OrchestratorClientMixin.apply_mon" (use @functools.wraps)
WARNING: Cannot handle as a local function: "orchestrator.OrchestratorClientMixin.apply_nfs" (use @functools.wraps)
WARNING: Cannot handle as a local function: "orchestrator.OrchestratorClientMixin.apply_node_exporter" (use @functools.wraps)
WARNING: Cannot handle as a local function: "orchestrator.OrchestratorClientMixin.apply_prometheus" (use @functools.wraps)
WARNING: Cannot handle as a local function: "orchestrator.OrchestratorClientMixin.apply_rbd_mirror" (use @functools.wraps)
WARNING: Cannot handle as a local function: "orchestrator.OrchestratorClientMixin.apply_rgw" (use @functools.wraps)
WARNING: Cannot handle as a local function: "orchestrator.OrchestratorClientMixin.apply_snmp_gateway" (use @functools.wraps)
WARNING: Cannot handle as a local function: "orchestrator.OrchestratorClientMixin.available" (use @functools.wraps)
WARNING: Cannot handle as a local function: "orchestrator.OrchestratorClientMixin.blink_device_light" (use @functools.wraps)
WARNING: Cannot handle as a local function: "orchestrator.OrchestratorClientMixin.cancel_completions" (use @functools.wraps)
WARNING: Cannot handle as a local function: "orchestrator.OrchestratorClientMixin.create_osds" (use @functools.wraps)
WARNING: Cannot handle as a local function: "orchestrator.OrchestratorClientMixin.daemon_action" (use @functools.wraps)
WARNING: Cannot handle as a local function: "orchestrator.OrchestratorClientMixin.describe_service" (use @functools.wraps)
WARNING: Cannot handle as a local function: "orchestrator.OrchestratorClientMixin.drain_host" (use @functools.wraps)
WARNING: Cannot handle as a local function: "orchestrator.OrchestratorClientMixin.enter_host_maintenance" (use @functools.wraps)
WARNING: Cannot handle as a local function: "orchestrator.OrchestratorClientMixin.exit_host_maintenance" (use @functools.wraps)
WARNING: Cannot handle as a local function: "orchestrator.OrchestratorClientMixin.get_facts" (use @functools.wraps)
WARNING: Cannot handle as a local function: "orchestrator.OrchestratorClientMixin.get_feature_set" (use @functools.wraps)
WARNING: Cannot handle as a local function: "orchestrator.OrchestratorClientMixin.get_hosts" (use @functools.wraps)
WARNING: Cannot handle as a local function: "orchestrator.OrchestratorClientMixin.get_inventory" (use @functools.wraps)
WARNING: Cannot handle as a local function: "orchestrator.OrchestratorClientMixin.host_ok_to_stop" (use @functools.wraps)
WARNING: Cannot handle as a local function: "orchestrator.OrchestratorClientMixin.list_daemons" (use @functools.wraps)
WARNING: Cannot handle as a local function: "orchestrator.OrchestratorClientMixin.plan" (use @functools.wraps)
WARNING: Cannot handle as a local function: "orchestrator.OrchestratorClientMixin.preview_osdspecs" (use @functools.wraps)
WARNING: Cannot handle as a local function: "orchestrator.OrchestratorClientMixin.remove_daemons" (use @functools.wraps)
WARNING: Cannot handle as a local function: "orchestrator.OrchestratorClientMixin.remove_host" (use @functools.wraps)
WARNING: Cannot handle as a local function: "orchestrator.OrchestratorClientMixin.remove_host_label" (use @functools.wraps)
WARNING: Cannot handle as a local function: "orchestrator.OrchestratorClientMixin.remove_osds" (use @functools.wraps)
WARNING: Cannot handle as a local function: "orchestrator.OrchestratorClientMixin.remove_osds_status" (use @functools.wraps)
WARNING: Cannot handle as a local function: "orchestrator.OrchestratorClientMixin.remove_service" (use @functools.wraps)
WARNING: Cannot handle as a local function: "orchestrator.OrchestratorClientMixin.service_action" (use @functools.wraps)
WARNING: Cannot handle as a local function: "orchestrator.OrchestratorClientMixin.stop_remove_osds" (use @functools.wraps)
WARNING: Cannot handle as a local function: "orchestrator.OrchestratorClientMixin.update_host_addr" (use @functools.wraps)
WARNING: Cannot handle as a local function: "orchestrator.OrchestratorClientMixin.upgrade_available" (use @functools.wraps)
WARNING: Cannot handle as a local function: "orchestrator.OrchestratorClientMixin.upgrade_status" (use @functools.wraps)
WARNING: Cannot handle as a local function: "orchestrator.OrchestratorClientMixin.zap_device" (use @functools.wraps)
/home/jenkins-build/build/workspace/ceph-pr-docs/src/pybind/mgr/orchestrator/_interface.py:docstring of orchestrator._interface._mk_orch_methods.<locals>.shim.<locals>.inner:5: WARNING: Field list ends without a blank line; unexpected unindent.

@tchaikov
Copy link
Contributor Author

tchaikov commented Mar 6, 2022

so it can be rendered by sphinx in a better way.

Signed-off-by: Kefu Chai <tchaikov@gmail.com>
add an empty line before a doctest block would help
sphinx to tell where the session starts.

see also https://www.sphinx-doc.org/en/master/usage/restructuredtext/basics.html#doctest-blocks

Signed-off-by: Kefu Chai <tchaikov@gmail.com>
otherwise sphinx takes "Typical use" and the following line as a
field. see also

https://www.sphinx-doc.org/en/master/usage/restructuredtext/basics.html#field-lists

Signed-off-by: Kefu Chai <tchaikov@gmail.com>
@ljflores
Copy link
Contributor

ljflores commented Mar 7, 2022

jenkins test api

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants