Skip to content

fix(coordinator): fix not-compatible-prover errors counting towards number of attempts #1619

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

Merged
merged 1 commit into from
Mar 11, 2025

Conversation

omerfirmak
Copy link
Contributor

@omerfirmak omerfirmak commented Mar 11, 2025

…umber of attempts

Purpose or design rationale of this PR

Describe your change. Make sure to answer these three questions: What does this PR do? Why does it do it? How does it do it?

PR title

Your PR title must follow conventional commits (as we are doing squash merge for each PR), so it must start with one of the following types:

  • build: Changes that affect the build system or external dependencies (example scopes: yarn, eslint, typescript)
  • ci: Changes to our CI configuration files and scripts (example scopes: vercel, github, cypress)
  • docs: Documentation-only changes
  • feat: A new feature
  • fix: A bug fix
  • perf: A code change that improves performance
  • refactor: A code change that doesn't fix a bug, or add a feature, or improves performance
  • style: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)
  • test: Adding missing tests or correcting existing tests

Deployment tag versioning

Has tag in common/version.go been updated or have you added bump-version label to this PR?

  • No, this PR doesn't involve a new deployment, git tag, docker image tag
  • Yes

Breaking change label

Does this PR have the breaking-change label?

  • No, this PR is not a breaking change
  • Yes

Summary by CodeRabbit

  • Chores

    • Updated the software version to v4.4.95, ensuring you benefit from the latest stable release and performance enhancements available with this update.
  • Refactor

    • Streamlined and restructured internal logging and error handling mechanisms to enhance overall system reliability and efficiency for a smoother and more stable experience.

These behind-the-scenes improvements help maintain optimal performance and reduce potential interruptions without altering the visible user interface.

Copy link

coderabbitai bot commented Mar 11, 2025

Walkthrough

This pull request updates the software version by changing the tag from "v4.4.94" to "v4.4.95" in the version file. Additionally, it modifies the control flow in the Assign methods for BatchProverTask, BundleProverTask, and ChunkProverTask by repositioning log statements, lowering the log level for incompatible prover versions from Error to Debug, and returning nil instead of an error when an incompatible version is detected. No changes have been made to the public API.

Changes

File(s) Change Summary
common/version/version.go Updated version tag from "v4.4.94" to "v4.4.95".
coordinator/internal/logic/provertask/{batch,bundle,chunk}_prover_task.go Repositioned logging statements to the end of the Assign method; changed log level for incompatible prover version messages from Error to Debug; return value changed from ErrCoordinatorInternalFailure to nil.

Sequence Diagram(s)

sequenceDiagram
    participant Caller
    participant AssignMethod
    participant CompatibilityCheck
    participant Logger

    Caller->>AssignMethod: call Assign()
    AssignMethod->>CompatibilityCheck: Check prover version
    CompatibilityCheck-->>AssignMethod: Return compatibility status
    alt Incompatible Version
        AssignMethod->>Logger: Log incompatible version (Debug)
        AssignMethod->>Logger: Log session completion
        AssignMethod-->>Caller: Return nil
    else Compatible Version
        AssignMethod->>Logger: Log session completion
        AssignMethod-->>Caller: Continue processing
    end
Loading

Possibly related PRs

Suggested labels

bump-version

Suggested reviewers

  • georgehao
  • colinlyguo
  • jonastheis

Poem

In the burrow of code, I did hop along,
Updating the version tag with a joyful song.
Logs now dance at the end, debugged and light,
Incompatible errors vanish from sight.
A little rabbit cheers with a carrot bite! 🥕🐰

Warning

There were issues while running some tools. Please review the errors and either fix the tool’s configuration or disable the tool if it’s a critical failure.

🔧 golangci-lint (1.62.2)

level=warning msg="[runner] Can't run linter goanalysis_metalinter: buildir: failed to load package zstd: could not load export data: no export data for "github.com/scroll-tech/da-codec/encoding/zstd""
level=error msg="Running error: can't run linter goanalysis_metalinter\nbuildir: failed to load package zstd: could not load export data: no export data for "github.com/scroll-tech/da-codec/encoding/zstd""


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 5f79735 and 6393de9.

📒 Files selected for processing (4)
  • common/version/version.go (1 hunks)
  • coordinator/internal/logic/provertask/batch_prover_task.go (1 hunks)
  • coordinator/internal/logic/provertask/bundle_prover_task.go (1 hunks)
  • coordinator/internal/logic/provertask/chunk_prover_task.go (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (3)
  • GitHub Check: tests
  • GitHub Check: check
  • GitHub Check: tests
🔇 Additional comments (7)
common/version/version.go (1)

8-8: Version increment to support new behavior.

The version update from "v4.4.94" to "v4.4.95" aligns with the changes in handling incompatible provers in the coordinator component.

coordinator/internal/logic/provertask/chunk_prover_task.go (2)

145-150: Improved handling of incompatible prover versions.

The changes correctly implement the PR's objective by:

  1. Downgrading the log level from Error to Debug for incompatible prover versions
  2. Returning nil instead of an error, which prevents incompatible prover errors from counting towards the number of attempts

This change ensures that only legitimate failures count toward attempt limits, improving metrics accuracy.


152-152: Log moved to ensure accurate session tracking.

Moving the session start log after the compatibility check ensures that only valid sessions are logged at the Info level. This change is consistent with the other prover task implementations.

coordinator/internal/logic/provertask/bundle_prover_task.go (2)

147-151: Improved handling of incompatible prover versions.

The changes correctly implement the PR's objective by:

  1. Downgrading the log level from Error to Debug for incompatible prover versions
  2. Returning nil instead of an error, which prevents incompatible prover errors from counting towards the number of attempts

This change ensures that only legitimate failures count toward attempt limits, improving metrics accuracy.


154-154: Log moved to ensure accurate session tracking.

Moving the session start log after the compatibility check ensures that only valid sessions are logged at the Info level. This change is consistent with the other prover task implementations.

coordinator/internal/logic/provertask/batch_prover_task.go (2)

147-151: Improved handling of incompatible prover versions.

The changes correctly implement the PR's objective by:

  1. Downgrading the log level from Error to Debug for incompatible prover versions
  2. Returning nil instead of an error, which prevents incompatible prover errors from counting towards the number of attempts

This change ensures that only legitimate failures count toward attempt limits, improving metrics accuracy.


154-154: Log moved to ensure accurate session tracking.

Moving the session start log after the compatibility check ensures that only valid sessions are logged at the Info level. This change is consistent with the other prover task implementations.

✨ Finishing Touches
  • 📝 Generate Docstrings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ 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 generate docstrings to generate docstrings for this 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.

CodeRabbit Configuration 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.

@colinlyguo colinlyguo changed the title fix(coordinator): fix not-compatible-prover errors counting towards n… fix(coordinator): fix not-compatible-prover errors counting towards number of attempts Mar 11, 2025
@codecov-commenter
Copy link

Codecov Report

Attention: Patch coverage is 22.22222% with 7 lines in your changes missing coverage. Please review.

Project coverage is 42.14%. Comparing base (5f79735) to head (6393de9).

Files with missing lines Patch % Lines
...or/internal/logic/provertask/bundle_prover_task.go 0.00% 3 Missing ⚠️
...tor/internal/logic/provertask/batch_prover_task.go 33.33% 2 Missing ⚠️
...tor/internal/logic/provertask/chunk_prover_task.go 33.33% 2 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #1619      +/-   ##
===========================================
+ Coverage    42.11%   42.14%   +0.03%     
===========================================
  Files          222      222              
  Lines        17741    17738       -3     
===========================================
+ Hits          7471     7476       +5     
+ Misses        9560     9554       -6     
+ Partials       710      708       -2     
Flag Coverage Δ
coordinator 34.32% <22.22%> (+0.18%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@omerfirmak omerfirmak merged commit 228cba4 into develop Mar 11, 2025
6 checks passed
@omerfirmak omerfirmak deleted the omerfirmak/fix-retry branch March 11, 2025 13:55
omerfirmak added a commit that referenced this pull request Mar 11, 2025
@coderabbitai coderabbitai bot mentioned this pull request Mar 12, 2025
13 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants