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(confix): update v2 config #21956

Merged
merged 3 commits into from
Sep 27, 2024
Merged

chore(confix): update v2 config #21956

merged 3 commits into from
Sep 27, 2024

Conversation

julienrbrt
Copy link
Member

@julienrbrt julienrbrt commented Sep 27, 2024

Description

Closes: #21950


Author Checklist

All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.

I have...

  • included the correct type prefix in the PR title, you can find examples of the prefixes below:
  • confirmed ! in the type prefix if API or client breaking change
  • targeted the correct branch (see PR Targeting)
  • provided a link to the relevant issue or specification
  • reviewed "Files changed" and left comments if necessary
  • included the necessary unit and integration tests
  • added a changelog entry to CHANGELOG.md
  • updated the relevant documentation or specification, including comments for documenting Go code
  • confirmed all CI checks have passed

Reviewers Checklist

All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items.

Please see Pull Request Reviewer section in the contributing guide for more information on how to review a pull request.

I have...

  • confirmed the correct type prefix in the PR title
  • confirmed all author checklist items have been addressed
  • reviewed state machine logic, API design and naming, documentation is accurate, tests and test coverage

Summary by CodeRabbit

  • New Features

    • Introduced a new telemetry section for detailed metrics and data collection.
    • Added a mempool configuration to manage transaction limits.
  • Updates

    • Updated storage options for state pruning and database types.
  • Removed Features

    • The custom configuration section has been removed, indicating no longer available options.

@julienrbrt julienrbrt added the backport/v0.52.x PR scheduled for inclusion in the v0.52's next stable release label Sep 27, 2024
@julienrbrt julienrbrt requested review from akhilkumarpilli and a team as code owners September 27, 2024 11:09
Copy link
Contributor

coderabbitai bot commented Sep 27, 2024

Warning

Rate limit exceeded

@julienrbrt has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 11 minutes and 24 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📥 Commits

Files that changed from the base of the PR and between de4cf35 and 1b963a2.

📝 Walkthrough
📝 Walkthrough
📝 Walkthrough

Walkthrough

The pull request introduces significant updates to the configuration files, including the removal of the [custom] section in v0.52-app.toml, which eliminates custom configuration options. In v2-app.toml, new sections for telemetry and mempool configuration are added, alongside updates to existing parameters for improved clarity and functionality. Additionally, the migration file migrations.go includes a new key mapping for telemetry settings, facilitating the transition to the updated configuration.

Changes

File Change Summary
tools/confix/data/v0.52-app.toml Removed [custom] section and its custom-field. Minor formatting adjustment to iavl-disable-fastnode comment.
tools/confix/data/v2-app.toml Added [comet.mempool] section with max-txs. Updated ss-type and sc-type parameters to string values. Increased interval for pruning options from 1 to 100. Introduced new [telemetry] section.
tools/confix/migrations.go Added key mapping for "telemetry.enabled" to []string{"telemetry.enable"}.

Assessment against linked issues

Objective Addressed Explanation
Update confix to migrate the latest v2 config (#21950)

Possibly related PRs

Suggested labels

C:server/v2, C:server/v2 cometbft

Suggested reviewers

  • kocubinski
  • facundomedica
  • hieuvubk
  • tac0turtle
  • sontrinh16

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>, please review it.
    • 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 gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @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 using 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.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

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.

@github-actions github-actions bot added the C:Confix Issues and PR related to Confix label Sep 27, 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: 0

🧹 Outside diff range and nitpick comments (3)
tools/confix/data/v2-app.toml (1)

45-48: LGTM. Consider adding explanatory comments.

The updates to ss-type and sc-type improve clarity by using string values instead of integers. This change aligns with the PR objectives.

Consider adding brief comments explaining what "ss" and "sc" stand for, to enhance readability for future maintainers.

tools/confix/migrations.go (1)

58-58: LGTM! Consider clarifying the semantic difference.

The addition of the new key mapping for telemetry configuration aligns well with the PR objectives and follows the existing pattern in the v2KeyChanges map.

Consider adding a comment to clarify if there's any semantic difference between "telemetry.enabled" and "telemetry.enable". This could help prevent any potential confusion for users migrating their configurations.

tools/confix/data/v0.52-app.toml (1)

References to custom-field found in the codebase

The removal of the [custom] section may have unintended impacts as references to custom-field are still present in the codebase, specifically in:

  • simapp/simd/cmd/config.go: CustomField string \mapstructure:"custom-field"``
  • simapp/simd/cmd/config.go:custom-field = "{{ .Custom.CustomField }}\""

Please verify whether these references are still necessary or remove them accordingly.

🔗 Analysis chain

Line range hint 1-1: Verify impact of removed [custom] section

The [custom] section, which previously contained a custom-field, has been removed from the configuration file. This change aligns with the PR objective of updating to the latest v2 standards.

Please confirm that this removal doesn't negatively impact any existing functionality. Run the following script to check for any references to the removed custom field:

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Search for references to the removed custom field
rg --type go 'custom-field'

Length of output: 657


Script:

#!/bin/bash
# Corrected script to search for references to the removed custom field across all files
rg 'custom-field'

Length of output: 164

📜 Review details

Configuration used: .coderabbit.yml
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between dcf00cf and de4cf35.

📒 Files selected for processing (3)
  • tools/confix/data/v0.52-app.toml (1 hunks)
  • tools/confix/data/v2-app.toml (2 hunks)
  • tools/confix/migrations.go (1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
tools/confix/migrations.go (1)

Pattern **/*.go: Review the Golang code for conformity with the Uber Golang style guide, highlighting any deviations.

🔇 Additional comments (6)
tools/confix/data/v2-app.toml (3)

19-22: Verify the intended mempool behavior.

The addition of the [comet.mempool] section aligns with the PR objectives. However, setting max-txs = -1 disables the app-side mempool.

Please confirm if disabling the app-side mempool is the intended behavior, as this might have performance implications.


55-55: Verify the impact of increased pruning intervals.

The pruning intervals for both state storage and state commitment have been increased from 1 to 100. This change aligns with the PR objectives.

Please confirm that the impact of this change on storage usage and performance has been considered and tested.

Also applies to: 62-62


70-94: Review telemetry settings for privacy and completeness.

The addition of the [telemetry] section aligns with the PR objectives and provides comprehensive configuration options for telemetry.

Please consider the following points:

  1. Telemetry is enabled by default (enable = true). Verify if this is the intended behavior, considering potential privacy implications.
  2. Review the empty or default values (e.g., service-name = '', prometheus-retention-time = 0) to ensure they meet the project's requirements.
  3. Consider adding comments explaining the purpose and impact of each setting, especially for less obvious options like enable-hostname-label and enable-service-label.
tools/confix/data/v0.52-app.toml (3)

69-71: LGTM: Minor formatting improvement

The formatting adjustment to the comment for iavl-disable-fastnode improves readability while maintaining the correct information.


Line range hint 1-248: Summary of changes

The changes in this file align well with the PR objectives of updating the confix configuration to the latest v2 standards:

  1. Removal of the [custom] section, which may simplify the configuration.
  2. Addition of the [mempool] section, introducing mempool configuration options.
  3. Minor formatting improvement for better readability.

These changes address the goals mentioned in the linked issue #21950, particularly the integration of mempool configuration settings.

To ensure a smooth transition to the new configuration:

  1. Verify that the removal of the [custom] section doesn't break any existing functionality.
  2. Confirm that the new [mempool] section is properly implemented and used in the codebase.
  3. Update any relevant documentation to reflect these changes in the configuration file.

Line range hint 236-248: New [mempool] section added

A new [mempool] section has been added to the configuration file, introducing the max-txs option. This addition aligns with the PR objective of updating the configuration to include mempool settings.

Please ensure that the mempool implementation correctly uses this new configuration option. Run the following script to check for the implementation of the max-txs option:

#!/bin/bash
# Search for the implementation of the max-txs option
rg --type go 'max-txs'

Also, consider adding a brief comment explaining the default value of -1 and its implications (disabling transactions from being inserted into the mempool).

Copy link
Contributor

@akhilkumarpilli akhilkumarpilli left a comment

Choose a reason for hiding this comment

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

lgtm, just one suggestion

tools/confix/migrations.go Show resolved Hide resolved
julienrbrt and others added 2 commits September 27, 2024 13:19
Co-authored-by: Akhil Kumar P <[email protected]>
@julienrbrt julienrbrt added this pull request to the merge queue Sep 27, 2024
Merged via the queue into main with commit 9d631d3 Sep 27, 2024
72 of 73 checks passed
@julienrbrt julienrbrt deleted the julien/confix branch September 27, 2024 14:54
mergify bot pushed a commit that referenced this pull request Sep 27, 2024
Co-authored-by: Akhil Kumar P <[email protected]>
(cherry picked from commit 9d631d3)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport/v0.52.x PR scheduled for inclusion in the v0.52's next stable release C:Confix Issues and PR related to Confix
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update confix to latest v2 config
4 participants