googleapis / gapic-generator-python

Generate Python API client libraries from Protocol Buffers.
Apache License 2.0
116 stars 66 forks source link

Docs build in google-cloud-datacatalog and google-cloud-batch fail with `Bullet list ends without a blank line; unexpected unindent.` #1722

Open parthea opened 11 months ago

parthea commented 11 months ago

See build log here which shows the docs build failure with error message Bullet list ends without a blank line; unexpected unindent.. The issue is that lines in some list items are not indented. The list exists here , but it is not indented properly in the generated output here. For example, see this error below

sphinx.errors.SphinxWarning: /usr/local/google/home/partheniou/git/google-cloud-python/packages/google-cloud-datacatalog/google/cloud/datacatalog_v1beta1/types/usage.py:docstring of google.cloud.datacatalog_v1beta1.types.usage.UsageStats:8:Bullet list ends without a blank line; unexpected unindent.

https://github.com/googleapis/googleapis-gen/blob/7e8867efbed7dbfe5ef6ec3c2c92a4bce4280f7a/google/cloud/datacatalog/v1beta1/datacatalog-v1beta1-py/google/cloud/datacatalog_v1beta1/types/usage.py#L35-L42

We have

class UsageStats(proto.Message):
    r"""Detailed counts on the entry's usage.
    Caveats:

    - Only BigQuery tables have usage stats
    - The usage stats only include BigQuery query jobs
    - The usage stats might be underestimated, e.g. wildcard table
      references are not yet counted in usage computation
    https://cloud.google.com/bigquery/docs/querying-wildcard-tables

but sphinx expects the hyperlink in the final list item to be indented

class UsageStats(proto.Message):
    r"""Detailed counts on the entry's usage.
    Caveats:

    - Only BigQuery tables have usage stats
    - The usage stats only include BigQuery query jobs
    - The usage stats might be underestimated, e.g. wildcard table
      references are not yet counted in usage computation
      https://cloud.google.com/bigquery/docs/querying-wildcard-tables
parthea commented 11 months ago

I manually fixed the docs build in https://github.com/googleapis/google-cloud-python/pull/11539/commits/9b6b3230c8da61dc66414a48ddfaeb9f80207233 to unblock the owlbot PR https://github.com/googleapis/google-cloud-python/pull/11539. I'll start working on a fix in the generator.

parthea commented 1 month ago

There is a similar issue in google-cloud-batch. See https://github.com/googleapis/google-cloud-python/pull/12693/commits/c077ebe9d2307583dea236bbb32ea49695dafa77

Change

            - Batch known failures as
            https://cloud.google.com/batch/docs/troubleshooting#reserved-exit-codes.
            - Batch runnable execution failures: You can
              rely on Batch logs for further diagnose:
              https://cloud.google.com/batch/docs/analyze-job-using-logs.

to

            - Batch known failures as
              https://cloud.google.com/batch/docs/troubleshooting#reserved-exit-codes.
            - Batch runnable execution failures: You can
              rely on Batch logs for further diagnose:
              https://cloud.google.com/batch/docs/analyze-job-using-logs.

The formatting in the proto looks ok

https://github.com/googleapis/googleapis/blob/e3a34df5b36e38a1ee0b1544ed4ae3b99cdf0f91/google/cloud/batch/v1/task.proto#L110-L116