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: adjust to #2658 breaking changes #2688

Merged
merged 2 commits into from
Jun 9, 2024
Merged

Conversation

ChiTimesChi
Copy link
Collaborator

@ChiTimesChi ChiTimesChi commented Jun 9, 2024

Description
A clear and concise description of the features you're adding in this pull request.

Additional context
Add any other context about the problem you're solving.

Metadata

  • Fixes #[Link to Issue]

Summary by CodeRabbit

  • Refactor
    • Updated configuration parameter name from globalProperty to environment in the FastBridge deployment scripts.

Copy link

cloudflare-workers-and-pages bot commented Jun 9, 2024

Deploying sanguine-fe with  Cloudflare Pages  Cloudflare Pages

Latest commit: 6245d66
Status:🚫  Build failed.

View logs

Copy link
Contributor

coderabbitai bot commented Jun 9, 2024

Walkthrough

The changes involve updating the loadConfig function in two contracts (ConfigureFastBridge and DeployFastBridgeCREATE2) to use a new parameter name environment instead of the old globalProperty when reading the global deploy configuration.

Changes

File Path Change Summary
packages/contracts-rfq/script/ConfigureFastBridge.s.sol Updated the loadConfig function to use environment instead of globalProperty.
packages/contracts-rfq/script/DeployFastBridge.CREATE2.s.sol Updated the loadConfig function to use environment instead of globalProperty.

Poem

In the realm of code so bright,
We changed a name, made things right,
From globalProperty to environment it flew,
Now our configs are fresh and new.
With each small change, we hop ahead,
In the fields of code, where dreams are fed.
🌟🐇✨


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 as 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.

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.
  • 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 Jun 9, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 39.36536%. Comparing base (b5a499c) to head (6245d66).
Report is 2 commits behind head on master.

Additional details and impacted files
@@                 Coverage Diff                 @@
##              master       #2688         +/-   ##
===================================================
- Coverage   39.76400%   39.36536%   -0.39865%     
===================================================
  Files            185         172         -13     
  Lines          14576       13362       -1214     
  Branches          80         119         +39     
===================================================
- Hits            5796        5260        -536     
+ Misses          8059        7449        -610     
+ Partials         721         653         -68     
Flag Coverage Δ
cctp-relayer ?
packages 90.47619% <ø> (ø)
promexporter ?
solidity 86.44068% <ø> (?)

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

Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL

Commits

Files that changed from the base of the PR and between a9a6f84 and 4413e92.

Files selected for processing (2)
  • packages/contracts-rfq/script/ConfigureFastBridge.s.sol (1 hunks)
  • packages/contracts-rfq/script/DeployFastBridge.CREATE2.s.sol (1 hunks)
Additional context used
GitHub Check: codecov/patch
packages/contracts-rfq/script/DeployFastBridge.CREATE2.s.sol

[warning] 34-34: packages/contracts-rfq/script/DeployFastBridge.CREATE2.s.sol#L34
Added line #L34 was not covered by tests

packages/contracts-rfq/script/ConfigureFastBridge.s.sol

[warning] 27-27: packages/contracts-rfq/script/ConfigureFastBridge.s.sol#L27
Added line #L27 was not covered by tests

@@ -31,7 +31,7 @@
}

function loadConfig() internal {
string memory config = readGlobalDeployConfig({contractName: NAME, globalProperty: "", revertIfNotFound: true});
string memory config = readGlobalDeployConfig({contractName: NAME, environment: "", revertIfNotFound: true});
Copy link
Contributor

Choose a reason for hiding this comment

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

Tip

Codebase Verification

The readGlobalDeployConfig function is defined in packages/solidity-devops/src/reader/DataReader.sol and used in DeployFastBridge.CREATE2.s.sol and ConfigureFastBridge.s.sol. However, there are no tests covering its usage in these files.

  • packages/contracts-rfq/script/DeployFastBridge.CREATE2.s.sol
  • packages/contracts-rfq/script/ConfigureFastBridge.s.sol

Would you like assistance in writing the necessary tests to cover this change?

Analysis chain

The parameter change from globalProperty to environment aligns with the PR objectives. However, this line is not covered by tests.

Would you like assistance in writing the necessary tests to cover this change?

Scripts executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Description: Verify if there are tests covering the `readGlobalDeployConfig` function usage in `DeployFastBridge.CREATE2.s.sol`.

# Test: Search for test files and check coverage for the specific function usage.
fd 'test' --type f --exec rg 'readGlobalDeployConfig' {}

Length of output: 56



Script:

#!/bin/bash
# Description: Locate the definition of the `readGlobalDeployConfig` function and its usage across the codebase.

# Step 1: Find the definition of the `readGlobalDeployConfig` function.
ast-grep --lang solidity --pattern 'function readGlobalDeployConfig($_) {}'

# Step 2: Find all usages of the `readGlobalDeployConfig` function across the codebase.
rg 'readGlobalDeployConfig'

Length of output: 649



Script:

#!/bin/bash
# Description: Locate the definition of the `readGlobalDeployConfig` function in `DataReader.sol` and check for tests covering `ConfigureFastBridge.s.sol`.

# Step 1: Find the definition of the `readGlobalDeployConfig` function in `DataReader.sol`.
rg 'function readGlobalDeployConfig' packages/solidity-devops/src/reader/DataReader.sol

# Step 2: Search for test files and check coverage for the `readGlobalDeployConfig` function usage in `ConfigureFastBridge.s.sol`.
fd 'test' --type f --exec rg 'readGlobalDeployConfig' {}

Length of output: 183

Tools
GitHub Check: codecov/patch

[warning] 34-34: packages/contracts-rfq/script/DeployFastBridge.CREATE2.s.sol#L34
Added line #L34 was not covered by tests

@@ -24,7 +24,7 @@
}

function loadConfig() internal {
config = readGlobalDeployConfig({contractName: NAME, globalProperty: "", revertIfNotFound: true});
config = readGlobalDeployConfig({contractName: NAME, environment: "", revertIfNotFound: true});
Copy link
Contributor

Choose a reason for hiding this comment

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

Tip

Codebase Verification

The parameter change from globalProperty to environment aligns with the PR objectives. However, there are no tests covering the readGlobalDeployConfig function usage in ConfigureFastBridge.s.sol, DeployFastBridge.CREATE2.s.sol, or the DataReader.sol file where the function is defined.

  • ConfigureFastBridge.s.sol: No test coverage found.
  • DeployFastBridge.CREATE2.s.sol: No test coverage found.
  • DataReader.sol: No test coverage found.

Would you like assistance in writing the necessary tests to cover this change?

Analysis chain

The parameter change from globalProperty to environment aligns with the PR objectives. However, this line is not covered by tests.

Would you like assistance in writing the necessary tests to cover this change?

Scripts executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Description: Verify if there are tests covering the `readGlobalDeployConfig` function usage in `ConfigureFastBridge.s.sol`.

# Test: Search for test files and check coverage for the specific function usage.
fd 'test' --type f --exec rg 'readGlobalDeployConfig' {}

Length of output: 56



Script:

#!/bin/bash
# Description: Search for the `readGlobalDeployConfig` function usage across the entire codebase to identify any indirect test coverage or related usage.

# Search for the function usage in the entire codebase.
rg 'readGlobalDeployConfig'

Length of output: 454



Script:

#!/bin/bash
# Description: Verify if there are tests covering the `DeployFastBridge.CREATE2.s.sol` script.

# Test: Search for test files and check coverage for the specific script usage.
fd 'test' --type f --exec rg 'DeployFastBridge.CREATE2.s.sol' {}

Length of output: 64



Script:

#!/bin/bash
# Description: Verify if there are tests covering the `DataReader.sol` file where `readGlobalDeployConfig` is defined.

# Test: Search for test files and check coverage for the specific file usage.
fd 'test' --type f --exec rg 'DataReader.sol' {}

Length of output: 48

Tools
GitHub Check: codecov/patch

[warning] 27-27: packages/contracts-rfq/script/ConfigureFastBridge.s.sol#L27
Added line #L27 was not covered by tests

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 4413e92 and 6245d66.

Files selected for processing (2)
  • packages/contracts-rfq/script/ConfigureFastBridge.s.sol (3 hunks)
  • packages/contracts-rfq/script/DeployFastBridge.CREATE2.s.sol (3 hunks)
Files skipped from review as they are similar to previous changes (2)
  • packages/contracts-rfq/script/ConfigureFastBridge.s.sol
  • packages/contracts-rfq/script/DeployFastBridge.CREATE2.s.sol

@ChiTimesChi ChiTimesChi merged commit 7533f70 into master Jun 9, 2024
51 of 52 checks passed
@ChiTimesChi ChiTimesChi deleted the fix/fast-bridge-scripts branch June 9, 2024 15:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant