Skip to content

Formatting issue in eventarc golden files #16389

Closed

Description

@parthea

There is a formatting issue in the event arc golden files which was called out in googleapis/gapic-generator-python#1740 (comment)

https://github.com/googleapis/gapic-generator-python/blob/4eee26181e8db9fb5144eef5a76f178c1594e48a/tests/integration/goldens/eventarc/google/cloud/eventarc_v1/types/channel.py#L104-L107

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.

Activity

  1. added
    type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.
    priority: p2Moderately-important priority. Fix may not be included in next release.
    on Sep 6, 2023
  2. parthea commented on Mar 26, 2026

    @parthea
    ContributorAuthor

    Transferring to google-cloud-python as the code for gapic-generator will be migrated there.

  3. parthea commented on May 4, 2026

    @parthea
    ContributorAuthor

    Closing as obsolete as this is related to docs formatting which should be fixed upstream

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    priority: p2Moderately-important priority. Fix may not be included in next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions