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

chore: fix spelling errors #20581

Merged
merged 3 commits into from
Jun 7, 2024
Merged

chore: fix spelling errors #20581

merged 3 commits into from
Jun 7, 2024

Conversation

github-prbot
Copy link
Contributor

@github-prbot github-prbot commented Jun 6, 2024

This PR fixes typos in the codebase.
Please review it, and merge if everything is fine.
If there are proto changes, run make proto-gen and commit the changes.

Summary by CodeRabbit

  • Documentation
    • Added detailed design documentation for a built-in query indexer for Cosmos SDK applications, including user stories and desired features for UI developers, node operators, and module developers.
    • Outlined the decision to implement a query indexer with a state decoder and a PostgreSQL-based indexer, exposing a GraphQL endpoint for enhanced query experiences.

@github-prbot github-prbot requested a review from a team as a code owner June 6, 2024 12:04
@tac0turtle tac0turtle closed this Jun 6, 2024
@tac0turtle tac0turtle deleted the bot/fix-typos branch June 6, 2024 12:05
Copy link
Contributor

coderabbitai bot commented Jun 6, 2024

Walkthrough

The changes in docs/architecture/adr-073-indexer.md introduce a built-in query indexer for Cosmos SDK applications. This indexer consists of a state decoder and a PostgreSQL-based indexer, exposing a GraphQL endpoint for simplified client queries. The design aims to minimize node storage requirements, support older SDK versions, and ease module developers' indexing efforts.

Changes

Files Change Summary
docs/architecture/adr-073-indexer.md Added design details for a built-in query indexer, user stories, and requirements for different user groups.

Sequence Diagram(s) (Beta)

sequenceDiagram
    participant User
    participant CosmosSDKApp
    participant StateDecoder
    participant PostgreSQLIndexer
    participant GraphQLEndpoint

    User->>CosmosSDKApp: Queries data
    CosmosSDKApp->>StateDecoder: Decodes state data
    StateDecoder->>PostgreSQLIndexer: Sends decoded data
    PostgreSQLIndexer->>GraphQLEndpoint: Indexes data and exposes via GraphQL
    User->>GraphQLEndpoint: Queries indexed data
    GraphQLEndpoint->>User: Returns query results
Loading

Possibly related issues

  • Epic: in-process off chain indexing  #20352: This PR addresses the need for an in-process off-chain indexer, simplifying complex front-end development and reducing the state machine's IO overhead as described in the issue.

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

Share
Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (invoked as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@julienrbrt julienrbrt restored the bot/fix-typos branch June 7, 2024 06:42
@julienrbrt julienrbrt reopened this Jun 7, 2024
@julienrbrt julienrbrt marked this pull request as draft June 7, 2024 06:42
@tac0turtle
Copy link
Member

postgressql is a title it follows the spelling of how its meant to be spelled. We should keep it this way

@tac0turtle tac0turtle closed this Jun 7, 2024
@tac0turtle tac0turtle deleted the bot/fix-typos branch June 7, 2024 06:56
@julienrbrt
Copy link
Member

I cannot re-open it anymore 🙁

@julienrbrt
Copy link
Member

julienrbrt commented Jun 7, 2024

postgressql is a title it follows the spelling of how its meant to be spelled. We should keep it this way

No it is PostgreSQL (with one s less). The bot will re-open a PR everyday until we fix that one letter issue.
Additionally I was trying to include those fixes in this PR: #20580 (4d4b057)

@tac0turtle tac0turtle restored the bot/fix-typos branch June 7, 2024 08:03
@tac0turtle tac0turtle reopened this Jun 7, 2024
@tac0turtle tac0turtle marked this pull request as ready for review June 7, 2024 08:07
@sontrinh16 sontrinh16 enabled auto-merge June 7, 2024 08:08
@sontrinh16 sontrinh16 added this pull request to the merge queue Jun 7, 2024
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

Outside diff range and nitpick comments (8)
docs/architecture/adr-073-indexer.md (8)

Line range hint 71-71: Correct the verb form for clarity.

- which can consumed by an indexer
+ which can be consumed by an indexer

Line range hint 77-77: Consider simplifying these phrases to enhance readability.

- in order to expose for decoding functionality and saner naming of map keys and values
+ to expose decoding functionality and improve naming of map keys and values

- In order to support indexing from any height (`N3`)
+ To support indexing from any height (`N3`)

- in order to provide a full-featured query experience
+ to provide a full-featured query experience

Also applies to: 80-80, 93-93


Line range hint 103-103: Adjust the noun for correct agreement.

- a lot of module refactoring
+ a lot of module refactorings

Line range hint 104-104: Simplify the expression for conciseness.

- at the moment
+ currently

Line range hint 104-104: Add a comma for correct punctuation.

- Also we want to provide a more batteries-included experience
+ Also, we want to provide a more batteries-included experience

Line range hint 105-105: Consider using a synonym for stylistic improvement.

- it would be hard to configure custom indexes and views
+ it would be challenging to configure custom indexes and views

Line range hint 115-115: Correct the adjective for proper hyphenation.

- client friendly
+ client-friendly

Line range hint 129-129: Remove the comma for grammatical correctness.

- concerned out of the scope of the design, because it is either much more complex from an
+ concerned out of the scope of the design because it is either much more complex from an
Review details

Configuration used: .coderabbit.yml
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 439f2f9 and 5270a21.

Files selected for processing (1)
  • docs/architecture/adr-073-indexer.md (4 hunks)
Additional context used
Path-based instructions (1)
docs/architecture/adr-073-indexer.md (1)

Pattern **/*.md: "Assess the documentation for misspellings, grammatical errors, missing documentation and correctness"

LanguageTool
docs/architecture/adr-073-indexer.md

[style] ~50-~50: This phrase is redundant. Consider writing “point” or “time”. (MOMENT_IN_TIME)
Context: ... complete query index starting from any point in time without necessarily needing to replay a...


[grammar] ~71-~71: The past tense is already expressed by ‘can’. Did you mean “consume”? (HOW_DID_THAT_HAPPEN)
Context: ...ecode it into logical packets which can consumed by an indexer. It should define an inte...


[style] ~77-~77: Consider a shorter alternative to avoid wordiness. (IN_ORDER_TO_PREMIUM)
Context: ...changes to collections will be needed in order to expose for decoding functionality and s...


[style] ~80-~80: Consider a shorter alternative to avoid wordiness. (IN_ORDER_TO_PREMIUM)
Context: ...onfigured at the module or node level. In order to support indexing from any height (N3)...


[grammar] ~91-~91: The plural noun “batteries” cannot be used with the article “a”. Did you mean “a full batterie”, “a full battery” or “full batteries”? (A_NNS)
Context: ...thout needing to go through Comet. For a full batteries included, client friendly query experie...


[style] ~93-~93: Consider a shorter alternative to avoid wordiness. (IN_ORDER_TO_PREMIUM)
Context: ... the query indexer in the configuration in order to provide a full-featured query experienc...


[misspelling] ~101-~101: Use ‘short-term’ only as an adjective. For the adverbial phrase, use “short term”. (THE_SHORT_TERM)
Context: ... this would simplify our efforts in the short-term, it still doesn't provide a full-featur...


[grammar] ~103-~103: Possible agreement error. The noun refactoring seems to be countable; consider using: “a lot of module refactorings”. (A_LOT_OF_NN)
Context: ...e-based indexer, however, would require a lot of module refactoring, likely custom code, and wouldn't take ...


[style] ~104-~104: For conciseness, consider replacing this expression with an adverb. (AT_THE_MOMENT)
Context: ...ecodable schema for collections which at the moment is fairly complex. It is easier to use ...


[uncategorized] ~104-~104: A comma may be missing after the conjunctive/linking adverb ‘Also’. (SENT_START_CONJUNCTIVE_LINKING_ADVERB_COMMA)
Context: ...uage for a separate process to consume. Also we want to provide a more batteries-inc...


[style] ~105-~105: To elevate your writing, try using a synonym here. (HARD_TO)
Context: ...ient only indexes in state, it would be hard to configure custom indexes and views, ...


[uncategorized] ~115-~115: The adjective “client-friendly” is spelled with a hyphen. (NN_FRIENDLY_HYPHEN)
Context: ...g of collections and orm schemas is client friendly. Also, because we are separating the d...


[formatting] ~129-~129: If the ‘because’ clause is essential to the meaning, do not use a comma before the clause. (COMMA_BEFORE_BECAUSE)
Context: ...concerned out of the scope of the design, because it is either much more complex from an ...

Markdownlint
docs/architecture/adr-073-indexer.md

41-41: Expected: 2; Actual: 4 (MD007, ul-indent)
Unordered list indentation


42-42: Expected: 2; Actual: 4 (MD007, ul-indent)
Unordered list indentation


43-43: Expected: 2; Actual: 4 (MD007, ul-indent)
Unordered list indentation


40-40: Expected: 0 or 2; Actual: 1 (MD009, no-trailing-spaces)
Trailing spaces


111-111: Expected: 0 or 2; Actual: 1 (MD009, no-trailing-spaces)
Trailing spaces


95-95: Expected: 1; Actual: 2 (MD012, no-multiple-blanks)
Multiple consecutive blank lines



## Alternatives

The following alternatives were considered:

* support any SQL database not just PostgreSQL using a framework like [GORM](https://gorm.io/). While this would be more flexible, it would be slower, require heavy usage of golang reflection and might limit how much we can take advantage of PostgreSQL's unique features for little benefit (the assumption being that most users would choose PostgreSQL anyway and or be happy enough that we made that choice).
* don't support any specific database, but just build the decoder framework. While this would simplify our efforts in the short-term, it still doesn't provide a full-featured solution and requires others to build out the key infrastructure similar to [ADR 038](adr-038-state-listening.md). This limbo state would not allow the SDK to definitely make key optimizations to state layout and simple the task of module development in a definitive way by providing a full replacement for gRPC client queries.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correct the adverbial phrase for grammatical accuracy.

- in the short-term
+ in the short term
Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.

Suggested change
* don't support any specific database, but just build the decoder framework. While this would simplify our efforts in the short-term, it still doesn't provide a full-featured solution and requires others to build out the key infrastructure similar to [ADR 038](adr-038-state-listening.md). This limbo state would not allow the SDK to definitely make key optimizations to state layout and simple the task of module development in a definitive way by providing a full replacement for gRPC client queries.
* don't support any specific database, but just build the decoder framework. While this would simplify our efforts in the short term, it still doesn't provide a full-featured solution and requires others to build out the key infrastructure similar to [ADR 038](adr-038-state-listening.md). This limbo state would not allow the SDK to definitely make key optimizations to state layout and simple the task of module development in a definitive way by providing a full replacement for gRPC client queries.
Tools
LanguageTool

[misspelling] ~101-~101: Use ‘short-term’ only as an adjective. For the adverbial phrase, use “short term”. (THE_SHORT_TERM)
Context: ... this would simplify our efforts in the short-term, it still doesn't provide a full-featur...

@@ -86,12 +90,13 @@

For a full batteries included, client friendly query experience, a GraphQL endpoint should be exposed in the HTTP server for any PostgreSQL database that has the [Supabase pg_graphql](https://github.com/supabase/pg_graphql) extension enabled. `pg_graphql` will expose rich GraphQL queries for all PostgreSQL tables with zero code that support filtering, pagination, sorting and traversing foreign key references. (Support for defining foreign keys with `collections` and `orm` could be added in the future to take advantage of this). In addition, a [GraphiQL](https://github.com/graphql/graphiql) query explorer endpoint can be exposed to simplify client development.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correct the grammatical error regarding plural usage.

- For a full batteries included, client friendly query experience
+ For a fully batteries-included, client-friendly query experience
Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.

Suggested change
For a full batteries included, client friendly query experience, a GraphQL endpoint should be exposed in the HTTP server for any PostgreSQL database that has the [Supabase pg_graphql](https://github.com/supabase/pg_graphql) extension enabled. `pg_graphql` will expose rich GraphQL queries for all PostgreSQL tables with zero code that support filtering, pagination, sorting and traversing foreign key references. (Support for defining foreign keys with `collections` and `orm` could be added in the future to take advantage of this). In addition, a [GraphiQL](https://github.com/graphql/graphiql) query explorer endpoint can be exposed to simplify client development.
For a fully batteries-included, client-friendly query experience, a GraphQL endpoint should be exposed in the HTTP server for any PostgreSQL database that has the [Supabase pg_graphql](https://github.com/supabase/pg_graphql) extension enabled. `pg_graphql` will expose rich GraphQL queries for all PostgreSQL tables with zero code that support filtering, pagination, sorting and traversing foreign key references. (Support for defining foreign keys with `collections` and `orm` could be added in the future to take advantage of this). In addition, a [GraphiQL](https://github.com/graphql/graphiql) query explorer endpoint can be exposed to simplify client development.
Tools
LanguageTool

[grammar] ~91-~91: The plural noun “batteries” cannot be used with the article “a”. Did you mean “a full batterie”, “a full battery” or “full batteries”? (A_NNS)
Context: ...thout needing to go through Comet. For a full batteries included, client friendly query experie...

Merged via the queue into main with commit ca14b28 Jun 7, 2024
63 of 64 checks passed
@sontrinh16 sontrinh16 deleted the bot/fix-typos branch June 7, 2024 08:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants