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(all): update mockery #2036

Merged
merged 1 commit into from
Oct 3, 2024
Merged

chore(all): update mockery #2036

merged 1 commit into from
Oct 3, 2024

Conversation

abi87
Copy link
Collaborator

@abi87 abi87 commented Oct 2, 2024

Run make generate

Summary by CodeRabbit

  • Chores
    • Updated the mock generation tool version from mockery v2.46.1 to mockery v2.46.2 across multiple mock implementations.
    • Enhanced robustness of the BLSSigner mock methods with added nil checks for return values.
  • Bug Fixes
    • No functional changes or bug fixes were introduced; all existing methods and signatures remain unchanged.

@abi87 abi87 self-assigned this Oct 2, 2024
Copy link
Contributor

coderabbitai bot commented Oct 2, 2024

Walkthrough

This pull request updates the mock implementations across various files by changing the version of the mock generation tool from mockery v2.46.1 to mockery v2.46.2. The updates do not introduce new methods or alter existing method signatures or functionalities within the mock types. The changes are primarily version bumps that ensure compatibility with the latest features or fixes in the mock generation tool.

Changes

File Path Change Summary
mod/engine-primitives/pkg/engine-primitives/mocks/blobs_bundle.mock.go Updated mock implementation version from mockery v2.46.1 to mockery v2.46.2.
mod/engine-primitives/pkg/engine-primitives/mocks/built_execution_payload_env.mock.go Updated mock implementation version from mockery v2.46.1 to mockery v2.46.2.
mod/engine-primitives/pkg/engine-primitives/mocks/payload_attributer.mock.go Updated mock implementation version from mockery v2.46.1 to mockery v2.46.2.
mod/node-api/backend/mocks/availability_store.mock.go Updated mock implementation version from mockery v2.46.1 to mockery v2.46.2.
mod/node-api/backend/mocks/beacon_block_header.mock.go Updated mock implementation version from mockery v2.46.1 to mockery v2.46.2.
mod/node-api/backend/mocks/beacon_state.mock.go Updated mock implementation version from mockery v2.46.1 to mockery v2.46.2.
mod/node-api/backend/mocks/block_store.mock.go Updated mock implementation version from mockery v2.46.1 to mockery v2.46.2.
mod/node-api/backend/mocks/deposit_store.mock.go Updated mock implementation version from mockery v2.46.1 to mockery v2.46.2.
mod/node-api/backend/mocks/node.mock.go Updated mock implementation version from mockery v2.46.1 to mockery v2.46.2.
mod/node-api/backend/mocks/state_processor.mock.go Updated mock implementation version from mockery v2.46.1 to mockery v2.46.2.
mod/node-api/backend/mocks/storage_backend.mock.go Updated mock implementation version from mockery v2.46.1 to mockery v2.46.2.
mod/node-api/backend/mocks/validator.mock.go Updated mock implementation version from mockery v2.46.1 to mockery v2.46.2.
mod/node-api/backend/mocks/withdrawal.mock.go Updated mock implementation version from mockery v2.46.1 to mockery v2.46.2.
mod/node-api/backend/mocks/withdrawal_credentials.mock.go Updated mock implementation version from mockery v2.46.1 to mockery v2.46.2.
mod/node-core/pkg/services/registry/mocks/basic.mock.go Updated mock implementation version from mockery v2.46.1 to mockery v2.46.2.
mod/node-core/pkg/services/registry/mocks/dispatcher.mock.go Updated mock implementation version from mockery v2.46.1 to mockery v2.46.2.
mod/node-core/pkg/services/registry/mocks/registry_option.mock.go Updated mock implementation version from mockery v2.46.1 to mockery v2.46.2.
mod/primitives/pkg/crypto/mocks/bls_signer.mock.go Updated mock implementation version from mockery v2.46.1 to mockery v2.46.2, added nil checks.
mod/storage/pkg/interfaces/mocks/db.mock.go Updated mock implementation version from mockery v2.46.1 to mockery v2.46.2.
mod/storage/pkg/pruner/mocks/beacon_block.mock.go Updated mock implementation version from mockery v2.46.1 to mockery v2.46.2.
mod/storage/pkg/pruner/mocks/block_event.mock.go Updated mock implementation version from mockery v2.46.1 to mockery v2.46.2.
mod/storage/pkg/pruner/mocks/prunable.mock.go Updated mock implementation version from mockery v2.46.1 to mockery v2.46.2.
mod/storage/pkg/pruner/mocks/pruner.mock.go Updated mock implementation version from mockery v2.46.1 to mockery v2.46.2.

Possibly related PRs

Suggested labels

Merge me daddy, Ready for Review

Suggested reviewers

  • nidhi-singh02
  • itsdevbear
  • ocnc

Poem

In a world of mocks and glee,
Version bumps, as bright as can be.
From v2.46.1 to v2.46.2,
Our tests will dance, all shiny and new!
With safety checks, we hop with delight,
Ensuring our mocks are just right! 🐇✨


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.

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.

Copy link

codecov bot commented Oct 2, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 22.42%. Comparing base (973f0db) to head (e879eb4).
Report is 1 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##             main    #2036       +/-   ##
===========================================
- Coverage   40.42%   22.42%   -18.00%     
===========================================
  Files           4      358      +354     
  Lines          47    16012    +15965     
  Branches       12       12               
===========================================
+ Hits           19     3591     +3572     
- Misses         28    12272    +12244     
- Partials        0      149      +149     

see 354 files with indirect coverage changes

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: 1

📜 Review details

Configuration used: CodeRabbit UI
Review profile: ASSERTIVE

📥 Commits

Files that changed from the base of the PR and between 973f0db and e879eb4.

📒 Files selected for processing (23)
  • mod/engine-primitives/pkg/engine-primitives/mocks/blobs_bundle.mock.go (1 hunks)
  • mod/engine-primitives/pkg/engine-primitives/mocks/built_execution_payload_env.mock.go (1 hunks)
  • mod/engine-primitives/pkg/engine-primitives/mocks/payload_attributer.mock.go (1 hunks)
  • mod/node-api/backend/mocks/availability_store.mock.go (1 hunks)
  • mod/node-api/backend/mocks/beacon_block_header.mock.go (1 hunks)
  • mod/node-api/backend/mocks/beacon_state.mock.go (1 hunks)
  • mod/node-api/backend/mocks/block_store.mock.go (1 hunks)
  • mod/node-api/backend/mocks/deposit_store.mock.go (1 hunks)
  • mod/node-api/backend/mocks/node.mock.go (1 hunks)
  • mod/node-api/backend/mocks/state_processor.mock.go (1 hunks)
  • mod/node-api/backend/mocks/storage_backend.mock.go (1 hunks)
  • mod/node-api/backend/mocks/validator.mock.go (1 hunks)
  • mod/node-api/backend/mocks/withdrawal.mock.go (1 hunks)
  • mod/node-api/backend/mocks/withdrawal_credentials.mock.go (1 hunks)
  • mod/node-core/pkg/services/registry/mocks/basic.mock.go (1 hunks)
  • mod/node-core/pkg/services/registry/mocks/dispatcher.mock.go (1 hunks)
  • mod/node-core/pkg/services/registry/mocks/registry_option.mock.go (1 hunks)
  • mod/primitives/pkg/crypto/mocks/bls_signer.mock.go (3 hunks)
  • mod/storage/pkg/interfaces/mocks/db.mock.go (1 hunks)
  • mod/storage/pkg/pruner/mocks/beacon_block.mock.go (1 hunks)
  • mod/storage/pkg/pruner/mocks/block_event.mock.go (1 hunks)
  • mod/storage/pkg/pruner/mocks/prunable.mock.go (1 hunks)
  • mod/storage/pkg/pruner/mocks/pruner.mock.go (1 hunks)
🔇 Additional comments (38)
mod/storage/pkg/pruner/mocks/beacon_block.mock.go (2)

Line range hint 1-85: Consider implications of mockery update

While no visible changes are present in the generated code beyond the version number, please consider the following:

  1. Verify that the behavior of the generated mocks remains consistent with the previous version in your tests.
  2. Check the mockery v2.46.2 release notes for any new features or bug fixes that might be relevant to your project.
  3. Ensure that the update process was applied consistently across all generated mock files in the project.

To help verify the consistency of the update, you can use the following script to check for any unexpected changes in the generated mock files:

#!/bin/bash
# Description: Check for unexpected changes in generated mock files

# Test 1: Check for any changes other than the version number
# Expect: No output if only version number changed
rg --type go -v "mockery v2\." -g "**/*.mock.go"

# Test 2: Verify consistent structure across all mock files
# Expect: Consistent output across all files
fd -e mock.go -x head -n 10

1-1: LGTM! Verify mockery update across the project.

The update from mockery v2.46.1 to v2.46.2 has been correctly applied to this generated file. This minor version update is consistent with the PR objective and typically implies backwards compatibility and bug fixes.

To ensure consistency, please verify that all other generated mock files in the project have been updated to use mockery v2.46.2. You can use the following script to check:

✅ Verification successful

Mockery v2.46.2 update confirmed across the project.

The verification process has confirmed that all generated mock files in the project have been successfully updated to use mockery v2.46.2. This is consistent across all examined files, indicating a uniform application of the update.

  • All mock files now include the header: "// Code generated by mockery v2.46.2. DO NOT EDIT."
  • No instances of older mockery versions were found in the mock files.

This update aligns with the PR's objective and has been correctly implemented project-wide.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify mockery version in all generated mock files

# Test: Search for mockery version in all .go files
# Expect: All occurrences should be v2.46.2
rg --type go "mockery v2\." -g "**/*.mock.go"

Length of output: 442393

mod/node-core/pkg/services/registry/mocks/dispatcher.mock.go (1)

1-1: LGTM: Mockery version update.

The change from mockery v2.46.1 to v2.46.2 is a minor version update. This is likely part of a routine dependency update and doesn't introduce any functional changes to the generated mock.

Let's verify if this change is consistent across other generated mock files:

✅ Verification successful

Verified: Consistent Mockery Version Update

All mockery-generated files have been successfully updated to version v2.46.2 uniformly across the codebase. No discrepancies found.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check if all mockery-generated files have been updated to v2.46.2

# Test: Search for mockery version declarations
rg --type go "mockery v2.46." -g "**/*.mock.go"

Length of output: 2467

mod/storage/pkg/pruner/mocks/prunable.mock.go (1)

1-1: LGTM: Mockery version update.

The update from mockery v2.46.1 to v2.46.2 is a minor version bump, likely including bug fixes and small improvements. The generated code structure and behavior remain unchanged, which is expected for a patch update.

To ensure this update is part of a broader dependency update across the project, you can run the following script:

This script will help verify if the mockery version update is consistent across the project and if any other files or configurations need to be updated.

mod/node-core/pkg/services/registry/mocks/registry_option.mock.go (1)

Line range hint 1-78: Verify test compatibility with updated mock.

The update to mockery v2.46.2 doesn't appear to have introduced any changes to the generated mock structure or content. However, to ensure full compatibility:

Please run your test suite to confirm that all tests using this mock still pass as expected. This will help catch any potential subtle changes in behavior introduced by the new mockery version.

mod/node-api/backend/mocks/node.mock.go (1)

1-1: Mockery version update looks good.

The mockery version has been updated from v2.46.1 to v2.46.2. This minor version bump is likely part of a dependency update and doesn't introduce any functional changes to the mock implementation.

To ensure this update aligns with the PR objectives, let's verify if similar updates have been made in other files:

✅ Verification successful

Mockery version update verified.

All mockery version declarations have been updated to v2.46.2, and the PR title matches the mockery update.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check for mockery version updates across the codebase

# Test: Search for mockery version declarations
echo "Mockery version declarations:"
rg --type go "mockery v2\.46\.[1-2]" --no-filename

# Test: Check if there are any remaining v2.46.1 declarations
echo -e "\nRemaining v2.46.1 declarations (if any):"
rg --type go "mockery v2\.46\.1" --no-filename

# Test: Verify PR title matches the update
echo -e "\nVerifying PR title:"
if [[ "chore(all): update mockery" == "$(gh pr view 2036 --json title -q .title)" ]]; then
    echo "PR title matches the mockery update."
else
    echo "PR title doesn't match the mockery update. Please verify the PR objectives."
fi

Length of output: 1711

mod/node-api/backend/mocks/withdrawal.mock.go (1)

1-1: LGTM: Mockery version update.

The update from mockery v2.46.1 to v2.46.2 is a minor version bump, which is good practice for keeping dependencies up-to-date. This change doesn't affect the functionality of the mock implementation.

Let's verify if this update is consistent across the project:

✅ Verification successful

Verified: Mockery version is consistent across the project.

All mock files have been updated to mockery v2.46.2, ensuring consistency throughout the codebase.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check if mockery version is consistent across the project

# Test: Search for mockery version declarations
rg --type go "mockery v2\.\d+\.\d+" --no-filename

Length of output: 1224

mod/node-api/backend/mocks/withdrawal_credentials.mock.go (1)

1-1: LGTM: Mockery version update.

The change from mockery v2.46.1 to v2.46.2 is a minor patch update, which typically includes bug fixes and small improvements. This update looks good and should be safe.

To ensure consistency across the project, let's verify if this update has been applied to all generated mock files:

If any inconsistencies are found, please update all mock files to use the same version of mockery.

✅ Verification successful

Verification Successful: Consistent Mockery Version Across All Mocks.

All mock files have been updated to mockery v2.46.2, ensuring consistency throughout the project.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check if all mock files are using the same mockery version

# Test: Search for mockery version in all .go files
# Expect: All mock files should use the same version (v2.46.2)
rg --type go "mockery v2\.\d+\.\d+" -g "**/mocks/*.go"

Length of output: 2474

mod/node-core/pkg/services/registry/mocks/basic.mock.go (1)

1-1: LGTM: Mockery version update.

The change from mockery v2.46.1 to v2.46.2 is a minor version update. This is likely part of a routine dependency update and doesn't introduce any functional changes to the generated mock.

Let's verify if this update is consistent across other generated mock files:

✅ Verification successful

Verified: Consistent Mockery version across all mock files.

All mockery-generated files are now using version v2.46.2, ensuring consistency across the codebase.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check if all mockery-generated files are using the same version

# Test: Search for mockery version declarations
rg --type go "Code generated by mockery v[0-9]+\.[0-9]+\.[0-9]+" -g "**/*.mock.go"

Length of output: 2502

mod/storage/pkg/pruner/mocks/pruner.mock.go (1)

1-1: LGTM: Mockery version update.

The change from mockery v2.46.1 to v2.46.2 is a minor version update. This type of change typically doesn't introduce breaking changes or significant alterations to the generated code.

To ensure the update doesn't affect existing functionality, please verify that all tests using this mock still pass. You can run the following command to check for any test failures:

mod/node-api/backend/mocks/state_processor.mock.go (1)

1-1: LGTM: Mockery version update.

The update from mockery v2.46.1 to v2.46.2 is a minor version bump, which typically indicates bug fixes or small improvements. This change is appropriate and doesn't affect the functionality of the mock.

Let's verify if this update is consistent across other generated mock files in the project:

✅ Verification successful

Verified: Mockery version update is consistent across all mock files.

All mockery-generated files are using v2.46.2, ensuring consistency throughout the project.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check if all mockery-generated files are using the same version

# Test: Search for mockery version declarations
rg --type go "// Code generated by mockery v[0-9]+\.[0-9]+\.[0-9]+" -g "**/*.mock.go"

Length of output: 2505

mod/engine-primitives/pkg/engine-primitives/mocks/blobs_bundle.mock.go (1)

1-1: LGTM: Mockery version update.

The change from mockery v2.46.1 to v2.46.2 is a minor version update. This is likely part of routine maintenance to keep dependencies up-to-date. The structure and functionality of the mock remain unchanged.

To ensure consistency across the project, let's verify if other mock files have been updated:

✅ Verification successful

Verified: Mockery versions are consistent across all mock files.

All mock files, including blobs_bundle.mock.go, are generated using Mockery v2.46.2. This ensures consistency and confirms that the version update has been uniformly applied across the project.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check for inconsistencies in mockery versions across mock files

# Test: Search for mockery version declarations in mock files
rg --type go "mockery v2\." --glob "**/mocks/*.go"

Length of output: 2470

mod/engine-primitives/pkg/engine-primitives/mocks/payload_attributer.mock.go (1)

1-1: LGTM: Mockery version update.

The update from mockery v2.46.1 to v2.46.2 is a minor version bump, which is good for keeping dependencies up-to-date. This change doesn't affect the functionality of the mock implementation.

Let's verify if this version update is consistent across other mock files in the project:

✅ Verification successful

All mockery versions are consistently updated to v2.46.2 across the project.

The update to mockery v2.46.2 has been successfully applied to all mock files, ensuring consistency and up-to-date dependencies.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check if all mock files are using the same mockery version

# Test: Search for mockery version in all .go files
# Expect: All files should show v2.46.2 or we'll see inconsistencies
rg --type go "mockery v[0-9]+\.[0-9]+\.[0-9]+" -g "**/*.mock.go"

Length of output: 2484

mod/node-api/backend/mocks/availability_store.mock.go (5)

1-1: LGTM: Mockery version updated.

The mockery version has been successfully updated from 2.46.1 to 2.46.2. This minor version update is consistent with the PR objective and likely includes bug fixes and small improvements.


Line range hint 3-24: LGTM: Mock structure and type definitions are correct.

The mock structure for AvailabilityStore is well-defined with appropriate generic types. The EXPECT() method and helper types are correctly implemented, providing a flexible and type-safe mocking solution.


Line range hint 26-108: LGTM: Mock method implementations are correct and complete.

The mock implementations for IsDataAvailable and Persist methods are well-structured and provide the necessary functionality for mocking. The use of helper types and methods ensures type safety when setting up expectations.


Line range hint 110-122: LGTM: NewAvailabilityStore function is well-implemented.

The NewAvailabilityStore function correctly creates and sets up a new mock instance. It properly uses generics and includes a cleanup function to assert expectations, following best practices for mock creation in Go tests.


Line range hint 1-122: Summary: Mockery update successful with no adverse effects.

The update of mockery from version 2.46.1 to 2.46.2 has been successfully applied to this file. The generated mock implementation remains correct and complete, with no breaking changes or issues introduced. This update aligns with the PR objective and likely includes minor improvements and bug fixes from the mockery tool.

mod/primitives/pkg/crypto/mocks/bls_signer.mock.go (4)

1-1: LGTM: Mockery version update.

The update from mockery v2.46.1 to v2.46.2 is consistent with the PR objective. This minor version update likely includes bug fixes and small improvements.


35-37: Approved: Enhanced nil-safety in PublicKey method.

The addition of a nil check before casting the return value to crypto.BLSPubkey is a valuable improvement. This change prevents potential panics when no return value is specified, enhancing the robustness of the mock.


86-88: Approved: Consistent nil-safety improvement in Sign method.

The addition of a nil check before casting the return value to crypto.BLSSignature is consistent with the improvement in the PublicKey method. This change further enhances the mock's robustness by preventing potential panics when no return value is specified.


Line range hint 1-188: Summary: Mockery update and enhanced nil-safety.

The changes in this file are consistent with the PR objective of updating mockery. The key improvements are:

  1. Updated mockery version from v2.46.1 to v2.46.2.
  2. Added nil checks before type assertions in the PublicKey and Sign methods.

These changes enhance the robustness of the mock by preventing potential panics when no return values are specified. The modifications are consistent and improve the overall code quality.

mod/storage/pkg/interfaces/mocks/db.mock.go (2)

Line range hint 1-215: Mock implementation looks good and maintains consistency.

The generated mock file for the DB interface maintains consistency with the previous version:

  • All expected methods (Delete, Get, Has, Set) are properly implemented.
  • Each method has corresponding expecter and call types for flexible mocking.
  • The NewDB function is present for creating new mock instances.
  • No changes in method signatures or behavior are observed.

This update preserves backward compatibility and doesn't introduce any breaking changes to existing tests.


1-1: LGTM: Mockery version update.

The update from mockery v2.46.1 to v2.46.2 is a minor version bump, which typically indicates bug fixes or small improvements in the mock generation tool. This change doesn't introduce any functional modifications to the mock implementations, which is good.

To ensure consistency across the project, let's verify if this change has been applied to other mock files:

This will help us confirm that all mock files are using the same version of mockery.

✅ Verification successful

Verification Successful: All Mock Files Use mockery v2.46.2

All mock files have been updated to use mockery version v2.46.2 consistently across the project. No issues found.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check if all mock files are using the same mockery version

# Test: Search for mockery version declarations in mock files
rg --type go "Code generated by mockery v" --glob "**/*.mock.go"

Length of output: 2484

mod/node-api/backend/mocks/deposit_store.mock.go (3)

Line range hint 1-145: No visible changes detected beyond version update.

The structure and logic of the mock implementation appear to remain unchanged, which is consistent with a minor version update. However, it's prudent to verify that no unintended changes were introduced.

To ensure no unexpected changes were introduced, let's compare this file with its previous version:

#!/bin/bash
# Description: Compare the current file with its previous version

# Test: Use git to show the diff. Expect: Only the version number should have changed.
git diff HEAD^ HEAD -- mod/node-api/backend/mocks/deposit_store.mock.go

Line range hint 1-145: Ensure testing and documentation are up-to-date.

While this patch update (v2.46.1 to v2.46.2) is unlikely to introduce breaking changes, it's important to:

  1. Run the full test suite to ensure no regressions.
  2. Update any documentation or README files that mention the mockery version.
  3. Verify that the build process completes successfully with the new version.

To assist with these tasks, you can run the following script:

#!/bin/bash
# Description: Verify test suite, documentation, and build process

# Test: Run the test suite. Expect: All tests pass.
go test ./...

# Test: Check if README or docs need updating. Expect: No occurrences of the old version.
rg "mockery v2.46.1" $(find . -name "README*" -o -name "*.md")

# Test: Verify the build process. Expect: Successful build.
go build ./...

1-1: Mockery version update acknowledged.

The mockery version has been updated from v2.46.1 to v2.46.2. This minor version update likely includes bug fixes or small improvements to the mock generation process.

To ensure consistency across the project, let's verify if this update has been applied to all mockery-generated files:

✅ Verification successful

Mockery version update verified successfully.

All mockery-generated Go files have been updated to v2.46.2, and no files are using the previous version v2.46.1.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check if all mockery-generated files have been updated to v2.46.2

# Test: Search for any files still using the old version. Expect: No results.
rg --type go "mockery v2.46.1" || echo "All files updated to v2.46.2"

# Test: Confirm all mockery-generated files are using v2.46.2. Expect: Consistent version across all files.
rg --type go "mockery v2.46.2"

Length of output: 595


Script:

#!/bin/bash
# Description: Verify mockery version updates across all mockery-generated Go files

# Test 1: Ensure no Go files contain the old mockery version
echo "Checking for any instances of mockery v2.46.1..."
old_version_count=$(rg --type go "mockery v2.46.1" | wc -l)
if [ "$old_version_count" -eq 0 ]; then
  echo "Success: No files contain mockery v2.46.1."
else
  echo "Failure: Found $old_version_count file(s) with mockery v2.46.1."
fi

# Test 2: Confirm all relevant Go files contain the updated mockery version
echo "Checking for mockery v2.46.2 in Go files..."
updated_version_count=$(rg --type go "mockery v2.46.2" | wc -l)
if [ "$updated_version_count" -gt 0 ]; then
  echo "Success: Found $updated_version_count file(s) with mockery v2.46.2."
else
  echo "Failure: No files contain mockery v2.46.2."
fi

Length of output: 575

mod/storage/pkg/pruner/mocks/block_event.mock.go (1)

1-1: LGTM: Mockery version update.

The update from mockery v2.46.1 to v2.46.2 is a minor patch version increment. This type of update typically includes bug fixes and small improvements without introducing breaking changes. The mock implementation remains unchanged, which is expected for a patch update.

To ensure consistency across the project, let's verify if this update is part of a larger effort to update mockery:

This will help us confirm if all mockery-generated files have been updated to the same version.

✅ Verification successful

Verification Successful: Mockery version uniformly updated to v2.46.2 across all generated files.

All mockery-generated files in the project have been updated to version v2.46.2, ensuring consistency and eliminating potential version conflicts.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check for other files generated by mockery and their versions

# Test: Search for other mockery-generated files and their versions
rg --type go "// Code generated by mockery v" | sort | uniq -c

Length of output: 2666

mod/node-api/backend/mocks/validator.mock.go (1)

1-1: LGTM: Mockery version updated.

The mockery version has been updated from v2.46.1 to v2.46.2. This is a minor version bump, which typically indicates bug fixes or small improvements in the mock generation tool. The generated code structure remains the same, so this change should not introduce any breaking changes or require modifications to the tests using these mocks.

To ensure consistency across the project, let's verify if this change has been applied to other mock files:

If the results show different versions, consider updating all mock files to use the same version of mockery.

✅ Verification successful

LGTM: Mockery version consistently updated across all mock files.

All mock files have been updated to use mockery v2.46.2, ensuring consistency throughout the project. No further actions are necessary.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check if all mock files are using the same mockery version

# Test: Search for mockery version declarations in mock files
rg --type go "mockery v2\." --glob "**/*mock*.go"

Length of output: 2469

mod/node-api/backend/mocks/block_store.mock.go (2)

Line range hint 1-159: Mock implementation looks good.

The overall structure and implementation of the BlockStore mock are appropriate and follow standard practices for mockery-generated files. The use of generics with the BeaconBlockT type parameter provides flexibility in the mock implementation. No issues or areas for improvement are apparent in the generated code.


1-1: Mockery version update confirmed.

The mockery version has been updated from v2.46.1 to v2.46.2. This is a minor version update and should not introduce any breaking changes or significant alterations to the generated mock.

To ensure no unexpected changes were introduced, let's compare the file contents:

If this command produces no output, it confirms that only the version number has changed.

mod/engine-primitives/pkg/engine-primitives/mocks/built_execution_payload_env.mock.go (1)

1-1: LGTM: Mockery version upgrade.

The mock file has been regenerated using mockery v2.46.2, up from v2.46.1. The upgrade doesn't introduce any functional changes to the mock implementation. The generated code maintains consistency and correctness in mocking the BuiltExecutionPayloadEnv type.

mod/node-api/backend/mocks/storage_backend.mock.go (1)

1-1: LGTM: Mockery version update.

The change from mockery v2.46.1 to v2.46.2 is a minor version update. This type of change typically doesn't introduce breaking changes or significant alterations to the generated code.

To ensure the update doesn't affect existing functionality, please verify that:

  1. All existing tests using this mock still pass.
  2. The mock behaves as expected in your test scenarios.

You can run the following command to check if any tests are affected by this change:

If any tests fail, please investigate and update them accordingly.

mod/node-api/backend/mocks/beacon_block_header.mock.go (1)

1-1: LGTM: Mockery version updated.

The mockery version has been updated from v2.46.1 to v2.46.2. This is a minor version bump, which typically includes bug fixes or small improvements. The rest of the generated mock file remains unchanged, which is expected and good for maintaining compatibility.

To ensure consistency, let's check if this version update has been applied to other generated mock files in the project:

✅ Verification successful

Verified: All mockery-generated files are updated to v2.46.2.

All mockery-generated files have been consistently updated to version v2.46.2. No issues found.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check if all mockery-generated files have been updated to v2.46.2

# Test: Search for mockery version declarations in all .go files
# Expect: All found files should use v2.46.2
rg --type go "mockery v2\." -C 1

Length of output: 3786

mod/node-api/backend/mocks/beacon_state.mock.go (4)

1-3: LGTM: File header and package declaration are correct.

The file header correctly indicates that it's generated by mockery v2.46.2, which aligns with the intended version update. The package declaration "mocks" is appropriate for a mock file.


Line range hint 5-13: LGTM: Import statements are appropriate.

The import statements include the necessary packages from the beacon-kit primitives and the testify mock package. These imports are suitable for creating a BeaconState mock.


Line range hint 15-1000: LGTM: BeaconState mock is comprehensive and well-structured.

The BeaconState mock is implemented with a high degree of detail:

  • It uses generic types for flexibility.
  • It includes a wide range of methods covering various BeaconState functionalities.
  • Each method has corresponding structs and helper methods for setting up expectations in tests.
  • The implementation allows for easy mocking of complex behaviors in test scenarios.

This comprehensive mock should facilitate thorough testing of components that interact with BeaconState.


Line range hint 1-1000: LGTM: Successfully updated mockery version with no adverse effects.

This review confirms that:

  1. The mock file has been successfully regenerated using mockery v2.46.2.
  2. The update from v2.46.1 to v2.46.2 has not introduced any significant changes to the structure or content of the BeaconState mock.
  3. The mock remains comprehensive, covering all expected methods of the BeaconState interface.
  4. The use of generics and the implementation of expectation helpers provide flexibility for testing scenarios.

This update appears to be a successful maintenance task, keeping the mocks up-to-date with the latest mockery version without introducing any breaking changes or issues.

@@ -1,4 +1,4 @@
// Code generated by mockery v2.46.1. DO NOT EDIT.
// Code generated by mockery v2.46.2. DO NOT EDIT.
Copy link
Contributor

Choose a reason for hiding this comment

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

🧹 Nitpick (assertive)

LGTM: Mockery version update.

The update from mockery v2.46.1 to v2.46.2 is a minor version change, which typically includes bug fixes and small improvements. This change looks good.

Consider checking the mockery changelog for any relevant updates or bug fixes that might affect your project.

@ocnc ocnc merged commit 2c99d9b into main Oct 3, 2024
16 checks passed
@ocnc ocnc deleted the update-mockery branch October 3, 2024 15:19
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.

3 participants