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

[rfq] fix codecov/flake #1795

Merged
merged 3 commits into from
Jan 9, 2024
Merged

[rfq] fix codecov/flake #1795

merged 3 commits into from
Jan 9, 2024

Conversation

trajan0x
Copy link
Contributor

@trajan0x trajan0x commented Jan 9, 2024

Description

Fixes rfq codecov & flakes

Tacking CI Flake nere:

image - this case in e2e is never hit, which would explain everything. Querying the db, it appears the final case is 4: image

If we query this, we see this is WillNotProcess

Everything else in the nearly 1.7gb of logs generated over an hour are context cancellation errors, so we can narrow the issue down to this 1 line:

image

And should be able to add breakpoints to find the exact issue:

image

Since we hit none, we can tell it's isProfitable:

image

and since cost (500000045) > dest amount out (500000000) this will fail.

For now, we can just subtract a bigger number:

Summary by CodeRabbit

  • Chores
    • Updated codecov configuration to carry forward flags for improved coverage tracking.
    • Updated Anvil backend Docker image tag from "latest" to "nightly-02292f2d2caa547968bd039c06dc53d98b72bf39".
    • Removed Go documentation and report card badge links from RFQ service README.
    • Modified logic in the TestUSDCtoUSDC function for improved test case behavior.

Copy link
Contributor

coderabbitai bot commented Jan 9, 2024

Walkthrough

The recent update in the project's configuration involves multiple changes. The NewAnvilBackend function in .ethergo/backends/anvil/anvil.go now uses a specific Docker image tag. The .codecov.yml file introduces the carryforward flag in the rfq section. Additionally, the services/rfq/README.md file removes two badge links, and the services/rfq/e2e/rfq_test.go modifies a calculation in the TestUSDCtoUSDC function.

Changes

File Path Change Summary
.ethergo/backends/anvil/anvil.go Updated Tag field in runOptions struct from "latest" to "nightly-02292f2d2caa547968bd039c06dc53d98b72bf39"
.codecov.yml Added carryforward flag under the rfq section
services/rfq/README.md Removed two badge links related to Go documentation and report card
services/rfq/e2e/rfq_test.go Modified DestAmount calculation in TestUSDCtoUSDC function

Poem

🐇 "Code changes like a dance,
New tags set for Anvil's chance.
Badges gone, and flags unfurl,
Test calculations in a whirl." 🐾

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-tests for this file.
  • 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 tests 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 from git and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit tests.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

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

CodeRabbit Commands (invoked as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger a review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai help to get help.

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

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • The JSON schema for the configuration file is available here.
  • 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/coderabbit-overrides.v2.json

CodeRabbit Discord Community

Join our Discord Community to get help, request features, and share feedback.

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.

Review Status

Actionable comments generated: 0

Configuration used: CodeRabbit UI

Commits Files that changed from the base of the PR and between 2a4dea2 and 0f5a792.
Files selected for processing (1)
  • .codecov.yml (1 hunks)
Files skipped from review due to trivial changes (1)
  • .codecov.yml

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.

Review Status

Actionable comments generated: 0

Configuration used: CodeRabbit UI

Commits Files that changed from the base of the PR and between 0f5a792 and e214e94.
Files selected for processing (1)
  • services/rfq/README.md (1 hunks)
Files skipped from review due to trivial changes (1)
  • services/rfq/README.md

@github-actions github-actions bot added the go Pull requests that update Go code label Jan 9, 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.

Review Status

Actionable comments generated: 0

Configuration used: CodeRabbit UI

Commits Files that changed from the base of the PR and between e214e94 and 8eb23293270e62e1be9456a3c6f041b7dac2dfc1.
Files selected for processing (1)
  • ethergo/backends/anvil/anvil.go (1 hunks)
Additional comments: 1
ethergo/backends/anvil/anvil.go (1)
  • 82-82: The Docker image tag in NewAnvilBackend has been updated to a specific nightly build. Ensure that this tag points to a stable and intended version for the Anvil backend, and that it complies with the project's guidelines for using specific versions versus latest.

Copy link

codecov bot commented Jan 9, 2024

Codecov Report

Attention: 44 lines in your changes are missing coverage. Please review.

Comparison is base (859697c) 52.32849% compared to head (355c9a0) 50.78737%.
Report is 17 commits behind head on master.

Files Patch % Lines
ethergo/backends/base/base.go 12.50000% 21 Missing ⚠️
ethergo/backends/base/blacklist.go 28.57143% 5 Missing ⚠️
ethergo/backends/simulated/simulated.go 0.00000% 5 Missing ⚠️
ethergo/backends/geth/geth.go 33.33333% 4 Missing ⚠️
ethergo/backends/anvil/anvil.go 50.00000% 3 Missing ⚠️
core/slice.go 0.00000% 2 Missing ⚠️
ethergo/client/client.go 0.00000% 2 Missing ⚠️
ethergo/signer/wallet/wallet.go 0.00000% 2 Missing ⚠️
Additional details and impacted files
@@                 Coverage Diff                 @@
##              master       #1795         +/-   ##
===================================================
- Coverage   52.32849%   50.78737%   -1.54112%     
===================================================
  Files            372         394         +22     
  Lines          25596       26798       +1202     
  Branches         285         295         +10     
===================================================
+ Hits           13394       13610        +216     
- Misses         10898       11857        +959     
- Partials        1304        1331         +27     
Flag Coverage Δ
cctp-relayer ?
promexporter ?
rfq 35.95787% <ø> (?)

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.

@trajan0x trajan0x mentioned this pull request Jan 9, 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.

Review Status

Actionable comments generated: 0

Configuration used: CodeRabbit UI

Commits Files that changed from the base of the PR and between e214e94 and 355c9a0.
Files selected for processing (1)
  • services/rfq/e2e/rfq_test.go (1 hunks)
Additional comments: 1
services/rfq/e2e/rfq_test.go (1)
  • 140-140: The change in the DestAmount calculation from big.NewInt(1) to big.NewInt(1000) is quite significant. Could you please provide the rationale behind this change? It's important to ensure that this modification aligns with the intended test behavior and accurately reflects the scenarios you are trying to test.

@trajan0x trajan0x changed the title fix rfq codecov [rfq] fix codecov/flake Jan 9, 2024
@trajan0x trajan0x merged commit 9d30293 into master Jan 9, 2024
26 checks passed
@trajan0x trajan0x deleted the fix/rfq-codecov branch January 9, 2024 03:14
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/xs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant