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

Formatting issue in eventarc golden files #1754

Open
parthea opened this issue Sep 6, 2023 · 0 comments
Open

Formatting issue in eventarc golden files #1754

parthea opened this issue Sep 6, 2023 · 0 comments
Labels
priority: p2 Moderately-important priority. Fix may not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.

Comments

@parthea
Copy link
Contributor

parthea commented Sep 6, 2023

There is a formatting issue in the event arc golden files which was called out in #1740 (comment)

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.
@parthea parthea added type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. priority: p2 Moderately-important priority. Fix may not be included in next release. labels Sep 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: p2 Moderately-important priority. Fix may not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Projects
None yet
Development

No branches or pull requests

1 participant