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

ci: ci-builder:0.49.0 #10414

Merged
merged 2 commits into from
May 6, 2024
Merged

ci: ci-builder:0.49.0 #10414

merged 2 commits into from
May 6, 2024

Conversation

tynes
Copy link
Contributor

@tynes tynes commented May 6, 2024

Description

Includes a bump of slither

#10411

Includes a bump of slither

#10411
@tynes tynes requested a review from a team as a code owner May 6, 2024 15:52
@tynes tynes requested a review from felipe-op May 6, 2024 15:52
Copy link
Contributor

coderabbitai bot commented May 6, 2024

Walkthrough

Walkthrough

The updates focus on upgrading key dependencies in the project's CI/CD pipeline. The ci_builder_image and Docker image versions have been advanced to v0.49.0 in both .circleci/config.yml and .github/workflows/slither.yml. These changes likely introduce improvements, bug fixes, or new features crucial for the project's build and analysis processes.

Changes

File Change Summary
.circleci/config.yml,
.github/workflows/slither.yml
Updated ci_builder_image to v0.49.0 and Docker image version to v0.49.0.

Recent Review Details

Configuration used: .coderabbit.yml
Review profile: CHILL

Commits Files that changed from the base of the PR and between 17f0e19 and 48e746b.
Files selected for processing (1)
  • .github/workflows/slither.yml (1 hunks)
Files skipped from review due to trivial changes (1)
  • .github/workflows/slither.yml

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.

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

@trianglesphere
Copy link
Contributor

@tynes slither seems to be failing in GH Actions

@tynes
Copy link
Contributor Author

tynes commented May 6, 2024

Same error as before

[-] SARIF output enabled, writing to results.sarif.
[-] Slither config provided: packages/contracts-bedrock/slither.config.json
[-] SLITHERARGS provided. Running slither with extra arguments
'forge clean' running (wd: /github/workspace/packages/contracts-bedrock)
'forge config --json' running
'forge build --build-info --skip */test/** */scripts/** --force' running (wd: /github/workspace/packages/contracts-bedrock)
Traceback (most recent call last):
  File "/opt/slither/bin/slither", line 8, in <module>
    sys.exit(main())
  File "/opt/slither/lib/python3.9/site-packages/slither/__main__.py", line 753, in main
    main_impl(all_detector_classes=detectors, all_printer_classes=printers)
  File "/opt/slither/lib/python3.9/site-packages/slither/__main__.py", line 859, in main_impl
    ) = process_all(filename, args, detector_classes, printer_classes)
  File "/opt/slither/lib/python3.9/site-packages/slither/__main__.py", line 107, in process_all
    ) = process_single(compilation, args, detector_classes, printer_classes)
  File "/opt/slither/lib/python3.9/site-packages/slither/__main__.py", line 80, in process_single
    slither = Slither(target, ast_format=ast, **vars(args))
  File "/opt/slither/lib/python3.9/site-packages/slither/slither.py", line 156, in __init__
    sol_parser.parse_top_level_items(ast, path)
  File "/opt/slither/lib/python3.9/site-packages/slither/solc_parsing/slither_compilation_unit_solc.py", line 326, in parse_top_level_items
    get_imported_scope = self.compilation_unit.get_scope(import_directive.filename)
  File "/opt/slither/lib/python3.9/site-packages/slither/core/compilation_unit.py", line 282, in get_scope
    filename = self._crytic_compile_compilation_unit.crytic_compile.filename_lookup(
  File "/opt/slither/lib/python3.9/site-packages/crytic_compile/crytic_compile.py", line 283, in filename_lookup
    raise ValueError(f"{filename} does not exist")
ValueError: lib/openzeppelin-contracts/contracts/utils/Context.sol does not exist

@trianglesphere
Copy link
Contributor

Same error as before

[-] SARIF output enabled, writing to results.sarif.
[-] Slither config provided: packages/contracts-bedrock/slither.config.json
[-] SLITHERARGS provided. Running slither with extra arguments
'forge clean' running (wd: /github/workspace/packages/contracts-bedrock)
'forge config --json' running
'forge build --build-info --skip */test/** */scripts/** --force' running (wd: /github/workspace/packages/contracts-bedrock)
Traceback (most recent call last):
  File "/opt/slither/bin/slither", line 8, in <module>
    sys.exit(main())
  File "/opt/slither/lib/python3.9/site-packages/slither/__main__.py", line 753, in main
    main_impl(all_detector_classes=detectors, all_printer_classes=printers)
  File "/opt/slither/lib/python3.9/site-packages/slither/__main__.py", line 859, in main_impl
    ) = process_all(filename, args, detector_classes, printer_classes)
  File "/opt/slither/lib/python3.9/site-packages/slither/__main__.py", line 107, in process_all
    ) = process_single(compilation, args, detector_classes, printer_classes)
  File "/opt/slither/lib/python3.9/site-packages/slither/__main__.py", line 80, in process_single
    slither = Slither(target, ast_format=ast, **vars(args))
  File "/opt/slither/lib/python3.9/site-packages/slither/slither.py", line 156, in __init__
    sol_parser.parse_top_level_items(ast, path)
  File "/opt/slither/lib/python3.9/site-packages/slither/solc_parsing/slither_compilation_unit_solc.py", line 326, in parse_top_level_items
    get_imported_scope = self.compilation_unit.get_scope(import_directive.filename)
  File "/opt/slither/lib/python3.9/site-packages/slither/core/compilation_unit.py", line 282, in get_scope
    filename = self._crytic_compile_compilation_unit.crytic_compile.filename_lookup(
  File "/opt/slither/lib/python3.9/site-packages/crytic_compile/crytic_compile.py", line 283, in filename_lookup
    raise ValueError(f"{filename} does not exist")
ValueError: lib/openzeppelin-contracts/contracts/utils/Context.sol does not exist

Confirmed. This PR lgtm, but we do need to look into this bug

@tynes tynes added this pull request to the merge queue May 6, 2024
@tynes
Copy link
Contributor Author

tynes commented May 6, 2024

@mds1 - thoughts on this slither issue?

Merged via the queue into develop with commit 7534ac5 May 6, 2024
71 of 72 checks passed
@tynes tynes deleted the ci-builder-49 branch May 6, 2024 18:49
@0xalpharush
Copy link

I suspect this is related to foundry-rs/foundry#7822

@mds1
Copy link
Contributor

mds1 commented May 6, 2024

If this doesn't resolve the issue, let's also try a new CI builder image that bumps to the latest foundry per @0xalpharush's comment. We're on a nightly from Apr 21, so seems likely we're susceptible to the foundry-compilers issue

@0xalpharush
Copy link

0xalpharush commented May 6, 2024

@mds1 To be clear, I think an older version of Foundry would need to be pinned since I think that PR introduced a bug. The one used in ci-builder appears to be older than the PR so it should work. Currently, slither-action fetches the latest foundry version with foundryup

@elopez is drafting the ability to pin a foundry version in slither-action and said:

they’d need to use: crytic/slither-action@dev-pin-foundry and pass the foundry-version as you would to foundryup -v (I think it’s one of their github release names like nightly-xyz?)

@mds1
Copy link
Contributor

mds1 commented May 6, 2024

I thought you were suggesting foundry-rs/foundry#7797 is the problem, which was closed by foundry-rs/foundry#7822. But I think you are saying foundry-rs/foundry#7822 introduced a bug?

Pinning foundry in slither action is ideal in either case, so we can ensure it matches the version we specify in versions.json

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.

4 participants