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

fix(rfq-relayer): e2e test flakes #3075

Merged
merged 15 commits into from
Sep 3, 2024
Merged

fix(rfq-relayer): e2e test flakes #3075

merged 15 commits into from
Sep 3, 2024

Conversation

dwasse
Copy link
Collaborator

@dwasse dwasse commented Aug 28, 2024

Summary by CodeRabbit

  • New Features
    • Introduced a new helper function to enhance contract deployment waiting logic.
  • Improvements
    • Increased retry duration for contract deployment to improve reliability.
    • Enhanced error reporting to provide more context in case of failures.
    • Improved error handling in the approval process to ensure successful contract interactions.
    • Added error handling during backend initialization to prevent runtime issues.
    • Included sender information in test case assertions for improved validation.

Copy link
Contributor

coderabbitai bot commented Aug 28, 2024

Walkthrough

The changes enhance contract deployment and approval processes within the IntegrationSuite struct in the setup_test.go file. A new function, waitForContractDeployment, has been introduced to improve contract deployment checking logic, while the existing Approve function has been modified to utilize this new function, increasing reliability and error handling in contract interactions. Additionally, error handling in backend initialization has been improved across multiple files.

Changes

File Change Summary
services/rfq/e2e/setup_test.go Increased retry duration in setupCCTP from 15 to 30 seconds. Added waitForContractDeployment function. Modified Approve function logic to incorporate new deployment waiting logic.
ethergo/backends/anvil/anvil.go Changed NewAnvilBackend to return (*Backend, error) instead of *Backend. Improved error handling in setupOtterscan.
ethergo/backends/anvil/suite_test.go Enhanced error handling in SetupSuite for backend initialization, ensuring errors are captured and checked.
agents/testutil/simulated_backends_suite.go Added error handling in SetupBackends for backend initialization. Changed function signature to return err error.
ethergo/submitter/suite_test.go Added error handling for backend initialization in SetupSuite, ensuring errors are captured and asserted.
packages/rest-api/package.json Added a new script entry "build:go" for potential future use.
services/rfq/relayer/relapi/server_test.go Added Sender field to expected result structure in test cases to include sender's information.

Sequence Diagram(s)

sequenceDiagram
    participant IntegrationSuite
    participant Backend
    participant Contract

    IntegrationSuite->>Backend: Initiate contract deployment
    Backend-->>Contract: Deploy contract
    Contract-->>Backend: Contract deployed
    Backend-->>IntegrationSuite: Confirm deployment
    IntegrationSuite->>IntegrationSuite: Call waitForContractDeployment
    IntegrationSuite->>Backend: Check contract code
    Backend-->>IntegrationSuite: Return contract code
    IntegrationSuite->>Backend: Proceed with approval
Loading

🐰 "In the code we hop and play,
New functions bloom like flowers in May.
Contracts dance with a joyful cheer,
As errors fade, and clarity's near.
With every change, we leap and bound,
In the world of code, new joys are found!" 🌼

Tip

We have updated our review workflow to use the Anthropic's Claude family of models. Please share any feedback in the discussion post on our Discord.


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 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 go Pull requests that update Go code size/s labels Aug 28, 2024
Copy link

codecov bot commented Aug 28, 2024

Codecov Report

Attention: Patch coverage is 17.07317% with 34 lines in your changes missing coverage. Please review.

Project coverage is 29.86118%. Comparing base (4a17c15) to head (9c523c6).
Report is 4 commits behind head on master.

Files with missing lines Patch % Lines
ethergo/backends/anvil/anvil.go 17.94872% 22 Missing and 10 partials ⚠️
services/rfq/relayer/service/relayer.go 0.00000% 2 Missing ⚠️
Additional details and impacted files
@@                 Coverage Diff                 @@
##              master       #3075         +/-   ##
===================================================
+ Coverage   24.88692%   29.86118%   +4.97426%     
===================================================
  Files            184         450        +266     
  Lines          11275       29319      +18044     
  Branches          82          82                 
===================================================
+ Hits            2806        8755       +5949     
- Misses          8214       19735      +11521     
- Partials         255         829        +574     
Flag Coverage Δ
cctp-relayer 31.97848% <ø> (?)
ethergo 47.20243% <17.94872%> (?)
omnirpc 33.23904% <ø> (?)
opbot 0.49261% <ø> (ø)
packages 90.56974% <ø> (ø)
promexporter 6.92368% <ø> (?)
rfq 21.27470% <0.00000%> (-0.25442%) ⬇️
scribe 18.18182% <ø> (?)
tools 30.55118% <ø> (?)

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.

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

Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL

Commits

Files that changed from the base of the PR and between eccbfd1 and 21ceda0.

Files selected for processing (1)
  • services/rfq/e2e/setup_test.go (2 hunks)
Additional comments not posted (3)
services/rfq/e2e/setup_test.go (3)

209-209: Increase retry duration

The retry duration has been increased from 15 seconds to 30 seconds in the setupCCTP function. This change improves reliability in scenarios where contract deployment may take longer than initially expected.

The code changes are approved.


221-232: LGTM!

The waitForContractDeployment function is correctly implemented with proper error handling and retry logic.

The code changes are approved.


234-249: LGTM!

The Approve function is more robust with better error handling. The changes improve the clarity and reliability of the contract interaction logic.

The code changes are approved.

Copy link

cloudflare-workers-and-pages bot commented Aug 28, 2024

Deploying sanguine-fe with  Cloudflare Pages  Cloudflare Pages

Latest commit: 9c523c6
Status: ✅  Deploy successful!
Preview URL: https://f1829e56.sanguine-fe.pages.dev
Branch Preview URL: https://fix-rfq-ci-flake.sanguine-fe.pages.dev

View logs

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

Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 21ceda0 and c8bb851.

Files selected for processing (2)
  • services/rfq/e2e/setup_test.go (2 hunks)
  • services/rfq/relayer/service/relayer.go (1 hunks)
Additional comments not posted (6)
services/rfq/relayer/service/relayer.go (2)

104-104: Enhanced error reporting in contract creation

The error message now includes the address of the FastBridge contract, providing more context for debugging.

The code changes are approved.


108-108: Enhanced error reporting in deploy block retrieval

The error message now includes the address of the FastBridge contract, providing more context for debugging.

The code changes are approved.

services/rfq/e2e/setup_test.go (4)

209-209: Increased retry duration

The retry duration has been increased from 15 seconds to 30 seconds, which can improve reliability in scenarios where contract deployment may take longer than initially expected.

The code changes are approved.


221-225: LGTM!

The function correctly checks if a contract is deployed at a specified address by querying the backend for the contract's code.

The code changes are approved.


227-238: LGTM!

The function correctly encapsulates the logic for checking if a contract is deployed at a specified address by querying the backend for the contract's code. The retry mechanism enhances reliability.

The code changes are approved.


240-255: LGTM!

The Approve function has been modified to use the new waitForContractDeployment function, ensuring that the contract is deployed before proceeding with the approval process. This improves reliability and error handling.

The code changes are approved.

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

Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL

Commits

Files that changed from the base of the PR and between c8bb851 and 25bf851.

Files selected for processing (1)
  • services/rfq/e2e/setup_test.go (2 hunks)
Files skipped from review as they are similar to previous changes (1)
  • services/rfq/e2e/setup_test.go

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

Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 25bf851 and 669d41a.

Files selected for processing (1)
  • ethergo/backends/anvil/anvil.go (1 hunks)
Additional comments not posted (1)
ethergo/backends/anvil/anvil.go (1)

132-132: LGTM! But verify the impact of the increased timeout.

The increase in pool.MaxWait to ten minutes can improve the resilience of the connection process. However, ensure that this does not lead to excessively long waits in scenarios where a shorter timeout would be more appropriate.

The code changes are approved.

Run the following script to verify the impact of the increased timeout:

Verification successful

No adverse production impact from increased timeout.

The NewAnvilBackend function's increased timeout is used only in test files, and the SetMaxWaitTime function provides flexibility to adjust it if necessary. This ensures that the change is unlikely to negatively affect production environments.

  • The NewAnvilBackend function is not used in any non-test files.
  • The MaxWait property is configurable via SetMaxWaitTime.
Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the impact of the increased timeout.

# Test: Search for the usage of `NewAnvilBackend`. Expect: No adverse effects due to the increased timeout.
rg --type go -A 5 $'NewAnvilBackend'

Length of output: 4322


Script:

#!/bin/bash
# Search for usage of `NewAnvilBackend` in non-test files to check for production impact.
rg --type go --invert-match '_test.go' -A 5 $'NewAnvilBackend'

# Search for tests that might be evaluating timeout behavior.
rg --type go 'MaxWait' -A 5

Length of output: 2507

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

Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 669d41a and 69e29b0.

Files selected for processing (4)
  • agents/testutil/simulated_backends_suite.go (4 hunks)
  • ethergo/backends/anvil/anvil.go (12 hunks)
  • ethergo/submitter/suite_test.go (2 hunks)
  • services/rfq/e2e/setup_test.go (3 hunks)
Additional comments not posted (12)
ethergo/submitter/suite_test.go (1)

118-120: LGTM!

The code changes improve error handling by capturing any errors encountered during the creation of the AnvilBackend instance and asserting that no errors occurred. This enhances the robustness of the code and prevents potential runtime issues if the backend initialization fails.

ethergo/backends/anvil/anvil.go (2)

Line range hint 68-210: LGTM!

The changes to error handling and return types significantly enhance the robustness and clarity of the NewAnvilBackend function. Errors are now properly propagated and handled, and the increased MaxWait property improves reliability by allowing more time for connection retries.


Line range hint 225-283: LGTM!

The changes to error handling and return types significantly enhance the robustness and clarity of the setupOtterscan function. Errors are now properly propagated and handled.

services/rfq/e2e/setup_test.go (6)

114-121: LGTM!

The increased retry duration from 15 seconds to 30 seconds is a good change to improve reliability in case the backend creation takes longer. The error handling and nil check after the retry loop look correct.


128-135: LGTM!

The increased retry duration from 15 seconds to 30 seconds is a good change to improve reliability in case the backend creation takes longer. The error handling and nil check after the retry loop look correct.


223-224: LGTM!

The increased retry duration from 15 seconds to 30 seconds is a good change to improve reliability in case the CCTP setup takes longer. The error handling after the retry loop looks correct.


235-247: LGTM!

The new waitForContractDeployment function is a good addition to encapsulate the logic for waiting for a contract deployment. It improves code readability and maintainability. The retry duration of 30 seconds is reasonable to handle potential delays in contract deployment. The error handling and messaging look correct.


249-264: LGTM!

The modifications to the Approve function improve its reliability and error handling. Using the waitForContractDeployment function ensures that the contract is deployed before proceeding with the approval process. The improved error handling using i.Require().NoError enhances the robustness of the function by validating the success of each step. The overall flow of the function looks correct and more resilient to potential issues related to contract deployment timing.


Line range hint 358-359: LGTM!

The increased retry duration from 15 seconds to 30 seconds for adding the relayer role is a good change to improve reliability. It provides more time for the operation to succeed in case of any delays or transient issues. The change is consistent with the other retry duration increases in the file.

agents/testutil/simulated_backends_suite.go (3)

416-416: LGTM!

Declaring the err variable at the beginning of the function is a good practice to allow reusing it in multiple goroutines.


423-424: Improved error handling.

Capturing the error returned by anvil.NewAnvilBackend and asserting that it is nil using a.Nil(err) enhances the robustness of the backend setup process. This ensures that any errors encountered during backend initialization are properly handled, preventing potential runtime issues.


Line range hint 481-487: Improved error handling.

Capturing the error returned by a.TestDeployManager.LoadHarnessContractsOnChains and fatally failing the test if the error is non-nil ensures that the test is aborted if there are any issues during the loading of harness contracts on chains. This prevents the test from proceeding with an invalid state.

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

Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 69e29b0 and 5541966.

Files selected for processing (2)
  • ethergo/backends/anvil/anvil.go (12 hunks)
  • ethergo/backends/anvil/suite_test.go (2 hunks)
Additional comments not posted (4)
ethergo/backends/anvil/suite_test.go (2)

48-49: LGTM!

The changes improve error handling in backend initialization by:

  • Capturing the error returned by anvil.NewAnvilBackend.
  • Checking that the error is nil using Nil(a.T(), err).

This ensures that any errors encountered during the backend initialization are properly handled and the backend is successfully created before proceeding.


Line range hint 37-37: Verify the impact of the SetupSuite function signature change.

The list of alterations indicates an implicit change to the SetupSuite function signature from func (a *AnvilSuite) SetupSuite() to func (a *AnvilSuite) SetupSuite() error.

Ensure that:

  • The SetupSuite function returns an error when appropriate.
  • The returned error is handled correctly by the test suite.
  • The change does not break any existing tests.

Run the following script to verify the impact of the function signature change:

ethergo/backends/anvil/anvil.go (2)

Line range hint 68-210: LGTM!

The changes to error handling and return types significantly enhance the robustness and clarity of the function's operation, ensuring that errors are properly propagated and handled. The increased MaxWait property improves the timeout behavior during connection retries.


Line range hint 225-283: LGTM!

The changes to error handling and return types significantly enhance the robustness and clarity of the function's operation, ensuring that errors are properly propagated and handled. The improved error handling for context cancellation errors during container pull is a good addition.

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

Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 5541966 and 794d492.

Files selected for processing (4)
  • ethergo/backends/anvil/anvil.go (12 hunks)
  • packages/rest-api/package.json (1 hunks)
  • services/rfq/e2e/setup_test.go (3 hunks)
  • services/rfq/relayer/relapi/server_test.go (2 hunks)
Files skipped from review due to trivial changes (1)
  • packages/rest-api/package.json
Additional context used
GitHub Check: codecov/patch
ethergo/backends/anvil/anvil.go

[warning] 73-73: ethergo/backends/anvil/anvil.go#L73
Added line #L73 was not covered by tests


[warning] 80-81: ethergo/backends/anvil/anvil.go#L80-L81
Added lines #L80 - L81 were not covered by tests


[warning] 102-103: ethergo/backends/anvil/anvil.go#L102-L103
Added lines #L102 - L103 were not covered by tests


[warning] 125-126: ethergo/backends/anvil/anvil.go#L125-L126
Added lines #L125 - L126 were not covered by tests


[warning] 134-135: ethergo/backends/anvil/anvil.go#L134-L135
Added lines #L134 - L135 were not covered by tests


[warning] 156-156: ethergo/backends/anvil/anvil.go#L156
Added line #L156 was not covered by tests


[warning] 160-161: ethergo/backends/anvil/anvil.go#L160-L161
Added lines #L160 - L161 were not covered by tests


[warning] 171-172: ethergo/backends/anvil/anvil.go#L171-L172
Added lines #L171 - L172 were not covered by tests


[warning] 185-186: ethergo/backends/anvil/anvil.go#L185-L186
Added lines #L185 - L186 were not covered by tests


[warning] 198-199: ethergo/backends/anvil/anvil.go#L198-L199
Added lines #L198 - L199 were not covered by tests


[warning] 249-249: ethergo/backends/anvil/anvil.go#L249
Added line #L249 was not covered by tests


[warning] 256-257: ethergo/backends/anvil/anvil.go#L256-L257
Added lines #L256 - L257 were not covered by tests


[warning] 283-283: ethergo/backends/anvil/anvil.go#L283
Added line #L283 was not covered by tests

Additional comments not posted (7)
services/rfq/relayer/relapi/server_test.go (2)

79-79: LGTM!

The addition of the Sender field to the expectedResult structure enhances the completeness of the test by ensuring that the sender's details are validated alongside other transaction attributes.


122-122: LGTM!

The addition of the Sender field to the expectedResult structure enhances the completeness of the test by ensuring that the sender's details are validated alongside other transaction attributes.

ethergo/backends/anvil/anvil.go (2)

68-68: LGTM!

The change to the NewAnvilBackend function signature to return (*Backend, error) is a good practice for improving error handling. This allows the function to communicate errors more effectively.


225-225: LGTM!

The change to the setupOtterscan function signature to return (string, error) is a good practice for improving error handling. This allows the function to communicate errors along with the string result.

services/rfq/e2e/setup_test.go (3)

223-224: LGTM!

Increasing the retry duration from 15 seconds to 30 seconds allows more time for the CCTP contract setup to complete, which can improve the reliability of the tests.


235-247: LGTM!

The new waitForContractDeployment function improves the reliability of the tests by ensuring that a contract is deployed before proceeding. The retry logic handles transient failures and the function is well-structured.


249-264: LGTM!

The changes to the Approve function improve its reliability and error handling:

  • Using the waitForContractDeployment function ensures that the contract is deployed before proceeding with the approval process.
  • Checking for errors and failing the test improves the reliability and debuggability of the tests.

The code segment is well-structured and follows best practices.

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

Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 794d492 and 9c523c6.

Files selected for processing (1)
  • ethergo/backends/anvil/anvil.go (12 hunks)
Additional context used
GitHub Check: codecov/patch
ethergo/backends/anvil/anvil.go

[warning] 73-73: ethergo/backends/anvil/anvil.go#L73
Added line #L73 was not covered by tests


[warning] 80-81: ethergo/backends/anvil/anvil.go#L80-L81
Added lines #L80 - L81 were not covered by tests


[warning] 102-103: ethergo/backends/anvil/anvil.go#L102-L103
Added lines #L102 - L103 were not covered by tests


[warning] 125-126: ethergo/backends/anvil/anvil.go#L125-L126
Added lines #L125 - L126 were not covered by tests


[warning] 134-135: ethergo/backends/anvil/anvil.go#L134-L135
Added lines #L134 - L135 were not covered by tests


[warning] 156-156: ethergo/backends/anvil/anvil.go#L156
Added line #L156 was not covered by tests


[warning] 160-161: ethergo/backends/anvil/anvil.go#L160-L161
Added lines #L160 - L161 were not covered by tests


[warning] 170-171: ethergo/backends/anvil/anvil.go#L170-L171
Added lines #L170 - L171 were not covered by tests


[warning] 184-185: ethergo/backends/anvil/anvil.go#L184-L185
Added lines #L184 - L185 were not covered by tests


[warning] 197-198: ethergo/backends/anvil/anvil.go#L197-L198
Added lines #L197 - L198 were not covered by tests


[warning] 248-248: ethergo/backends/anvil/anvil.go#L248
Added line #L248 was not covered by tests


[warning] 255-256: ethergo/backends/anvil/anvil.go#L255-L256
Added lines #L255 - L256 were not covered by tests


[warning] 282-282: ethergo/backends/anvil/anvil.go#L282
Added line #L282 was not covered by tests

Additional comments not posted (2)
ethergo/backends/anvil/anvil.go (2)

Line range hint 68-209: Improved error handling logic.

The error handling enhancements using conditional checks and formatted error messages improve the robustness of the NewAnvilBackend function by properly propagating and handling errors. The error messages provide clear context about the failures.

Tools
GitHub Check: codecov/patch

[warning] 156-156: ethergo/backends/anvil/anvil.go#L156
Added line #L156 was not covered by tests


[warning] 160-161: ethergo/backends/anvil/anvil.go#L160-L161
Added lines #L160 - L161 were not covered by tests


[warning] 170-171: ethergo/backends/anvil/anvil.go#L170-L171
Added lines #L170 - L171 were not covered by tests


Line range hint 224-282: Improved error handling logic.

The error handling enhancements using conditional checks and formatted error messages improve the robustness of the setupOtterscan function by properly propagating and handling errors. The error messages provide clear context about the failures.

Tools
GitHub Check: codecov/patch

[warning] 248-248: ethergo/backends/anvil/anvil.go#L248
Added line #L248 was not covered by tests


[warning] 255-256: ethergo/backends/anvil/anvil.go#L255-L256
Added lines #L255 - L256 were not covered by tests

if err != nil {
require.Nil(t, err)
return nil, fmt.Errorf("failed to create docker pool: %w", err)
Copy link
Contributor

Choose a reason for hiding this comment

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

Add test coverage for error handling.

Static analysis hints indicate that the added lines for error handling are not covered by tests:

  • Line 73
  • Lines 80-81
  • Lines 102-103
  • Lines 134-135
  • Line 156
  • Lines 160-161
  • Lines 170-171
  • Lines 184-185
  • Lines 197-198

To ensure the reliability of the error handling logic, please add appropriate test cases that cover these lines. This will help catch any potential issues and maintain the stability of the codebase.

If you need any assistance in writing the test cases, please let me know. I'd be happy to help!

Also applies to: 80-81, 102-103, 134-135, 156-156, 160-161, 170-171, 184-185, 197-198

Tools
GitHub Check: codecov/patch

[warning] 73-73: ethergo/backends/anvil/anvil.go#L73
Added line #L73 was not covered by tests

if !errors.Is(err, context.Canceled) {
require.Nil(tb, err)
if err != nil && !errors.Is(err, context.Canceled) {
return "", fmt.Errorf("failed to run otterscan container: %w", err)
Copy link
Contributor

Choose a reason for hiding this comment

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

Add test coverage for error handling.

Static analysis hints indicate that the added lines for error handling are not covered by tests:

  • Line 248
  • Lines 255-256
  • Line 282

To ensure the reliability of the error handling logic, please add appropriate test cases that cover these lines. This will help catch any potential issues and maintain the stability of the codebase.

If you need any assistance in writing the test cases, please let me know. I'd be happy to help!

Also applies to: 255-256, 282-282

Tools
GitHub Check: codecov/patch

[warning] 248-248: ethergo/backends/anvil/anvil.go#L248
Added line #L248 was not covered by tests

Copy link

codecov bot commented Sep 3, 2024

Bundle Report

Changes will decrease total bundle size by 145.67kB ⬇️

Bundle name Size Change
synapse-interface-server-cjs 1.33MB 145.67kB ⬇️

@dwasse dwasse merged commit 9ceacfe into master Sep 3, 2024
51 of 53 checks passed
@dwasse dwasse deleted the fix/rfq-ci-flake branch September 3, 2024 23:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
go Pull requests that update Go code size/s
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants