-
Notifications
You must be signed in to change notification settings - Fork 77
Description
There is a formatting issue in the event arc golden files which was called out in #1740 (comment)
gapic-generator-python/tests/integration/goldens/eventarc/google/cloud/eventarc_v1/types/channel.py
Lines 104 to 107 in 4eee261
| 1. The SaaS provider disconnected from this | |
| Channel. 2. The Channel activation token has | |
| expired but the SaaS provider wasn't | |
| connected. |
There number of spaces between the words provider and wasn't is excessive.
The current parsing logic does not remove the extra spaces which appear in the source proto as a result of indenting subsequent lines in lists.
See source proto here: https://github.com/googleapis/googleapis/blob/eda81ef50cbc08ddf39e9e0689e116421581a234/google/cloud/eventarc/v1/channel.proto#L59C1-L64C28
The extra spaces added in the example below specifically for indentation of subsequent lines in lists is the cause of the formatting issue.
// The INACTIVE state indicates that the Channel cannot receive events
// permanently. There are two possible cases this state can happen:
//
// 1. The SaaS provider disconnected from this Channel.
// 2. The Channel activation token has expired but the SaaS provider
// wasn't connected.
The following correction in the source protos would not result in a gap in the generated output.
// The INACTIVE state indicates that the Channel cannot receive events
// permanently. There are two possible cases this state can happen:
//
// 1. The SaaS provider disconnected from this Channel.
// 2. The Channel activation token has expired but the SaaS provider
// wasn't connected.
We can fix this problem by completing one or more of the following
- Update the source proto for event arc to remove indentation for subsequent lines in lists
- Updating AIPs and linter rule to prevent indentation for subsequent lines in lists
- Update the proto documentation parsing logic to remove the extra spaces which can be introduced due to the indentation of subsequent lines in lists.