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

feat(ops): Consolidate Version Control #8920

Merged
merged 5 commits into from
Jan 16, 2024
Merged

feat(ops): Consolidate Version Control #8920

merged 5 commits into from
Jan 16, 2024

Conversation

refcell
Copy link
Contributor

@refcell refcell commented Jan 9, 2024

Description

Historically, binary version control in the monorepo was done via .<binary>rc files that each contain solely the version string for ced binary.

Recently, this has become used for an increasing number of binaries, greatly increasing the number of top-level hidden monorepo source files.

This PR consolidates checked in binary versions in a singular top-level versions.json file where binaries are mapped to their version string or commit hash (for eg foundry).

The hidden rc files are now deleted and referencing code has been updated to read and write to the version control versions.json file.

Since this impacts developer use across the monorepo, would appreciate meticulous review and critiques!

@refcell refcell requested review from a team as code owners January 9, 2024 23:24
@refcell refcell requested a review from Inphi January 9, 2024 23:24
Copy link
Contributor

coderabbitai bot commented Jan 9, 2024

Walkthrough

Walkthrough

The overall change consists of centralizing version control of various tools and dependencies within a project by moving away from multiple configuration files to a single versions.json. This file now holds the version information for tools like abigen, geth, slither-analyzer, and foundry. Scripts and Docker configurations have been updated to read from this versions.json using jq, providing a more streamlined and maintainable approach to managing tool versions across the project.

Changes

Files Change Summary
ops/docker/ci-builder/Dockerfile
ops/scripts/geth-version-checker.sh
Makefile
op-bindings/bindgen/utils.go
Updated to use versions.json for tool version information instead of individual config files.
ops/docker/ci-builder/Dockerfile.dockerignore Updated to adjust ignored files, adding new exceptions.
ops/scripts/install-foundry.sh
packages/contracts-bedrock/CONTRIBUTING.md
Changed to read the foundry commit hash from versions.json instead of .foundryrc.
op-bindings/bindgen/utils_test.go Added a new test function to ensure the expected abigen version is read correctly from the JSON file.
packages/contracts-bedrock/test/kontrol/kontrol/run-kontrol.sh Modified to assign KONTROLRC variable by extracting value from versions.json.

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.

@refcell
Copy link
Contributor Author

refcell commented Jan 9, 2024

Current dependencies on/for this PR:

This stack of pull requests is managed by Graphite.

@refcell refcell requested review from tynes and clabby January 9, 2024 23:25
@refcell refcell self-assigned this Jan 9, 2024
@refcell refcell added C-feature Category: features M-dependencies Meta: updates dependencies labels Jan 9, 2024
Copy link
Contributor

@Inphi Inphi left a comment

Choose a reason for hiding this comment

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

It's a cool idea. I think this issue could also be solved by moving the rc files into a subdirectory so as to not pollute the top level. Avoids introducing new code or requiring JSON for something this basic. wydt?

Copy link
Contributor

@trianglesphere trianglesphere left a comment

Choose a reason for hiding this comment

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

I like this cleanup. The two things I see are that we need to test the CI builder & there's a merge conflict with develop.

@refcell
Copy link
Contributor Author

refcell commented Jan 10, 2024

It's a cool idea. I think this issue could also be solved by moving the rc files into a subdirectory so as to not pollute the top level. Avoids introducing new code or requiring JSON for something this basic. wydt?

Not a bad way to go at all. I think that's a perfectly reasonable alternative we can do if others prefer!
I still lean toward this solution because to me it's cleaner to have a single top-level file that handles versioning as opposed to navigating into yet another sub directory. Plus the additional code is minimal enough to where the tradeoff seems worthwhile

Makefile Show resolved Hide resolved
@tynes
Copy link
Contributor

tynes commented Jan 11, 2024

I'm generally in favor of this approach

@refcell refcell requested a review from tynes January 12, 2024 17:43
Makefile Show resolved Hide resolved
@tynes
Copy link
Contributor

tynes commented Jan 12, 2024

Other instances of useless cat but not a problem

@refcell refcell added this pull request to the merge queue Jan 12, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to no response for status checks Jan 12, 2024
@refcell refcell added this pull request to the merge queue Jan 12, 2024
@refcell refcell removed this pull request from the merge queue due to a manual request Jan 13, 2024
@refcell refcell added this pull request to the merge queue Jan 13, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jan 13, 2024
@refcell refcell added this pull request to the merge queue Jan 16, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jan 16, 2024
@refcell refcell added this pull request to the merge queue Jan 16, 2024
Merged via the queue into develop with commit 23dd85a Jan 16, 2024
69 checks passed
@refcell refcell deleted the refcell/versioning branch January 16, 2024 08:33
tynes added a commit that referenced this pull request Jan 17, 2024
Was broken with #8920
due to the new `jq` dependency not being present in the builder image.
Fix by installing `jq` in the builder image.
@tynes tynes mentioned this pull request Jan 17, 2024
github-merge-queue bot pushed a commit that referenced this pull request Jan 17, 2024
Was broken with #8920
due to the new `jq` dependency not being present in the builder image.
Fix by installing `jq` in the builder image.
tynes added a commit that referenced this pull request Jan 17, 2024
The foundry install script uses `jq` so we must install `jq` as early
as possible in `ci-builder` to ensure that its always present.

Follow up to #9042
which fixes the broken build from #8920.

I don't think that #8920 broke the fix in this commit so perhaps the
build was broken longer than we thought? Either way, we need new forge
version in CI that was introduced in #9038
so we need a successful build of `ci-builder`.
github-merge-queue bot pushed a commit that referenced this pull request Jan 17, 2024
The foundry install script uses `jq` so we must install `jq` as early
as possible in `ci-builder` to ensure that its always present.

Follow up to #9042
which fixes the broken build from #8920.

I don't think that #8920 broke the fix in this commit so perhaps the
build was broken longer than we thought? Either way, we need new forge
version in CI that was introduced in #9038
so we need a successful build of `ci-builder`.
dshiell pushed a commit to polymerdao/optimism-dev that referenced this pull request Jan 22, 2024
* feat(ops): consolidate version control

* fix: remove added slitherrc copy

* fix: Makefile geth install target

* fix: remove other redundant cat commands

* fix: rabbit's suggestion
dshiell pushed a commit to polymerdao/optimism-dev that referenced this pull request Jan 22, 2024
Was broken with ethereum-optimism#8920
due to the new `jq` dependency not being present in the builder image.
Fix by installing `jq` in the builder image.
dshiell pushed a commit to polymerdao/optimism-dev that referenced this pull request Jan 22, 2024
The foundry install script uses `jq` so we must install `jq` as early
as possible in `ci-builder` to ensure that its always present.

Follow up to ethereum-optimism#9042
which fixes the broken build from ethereum-optimism#8920.

I don't think that ethereum-optimism#8920 broke the fix in this commit so perhaps the
build was broken longer than we thought? Either way, we need new forge
version in CI that was introduced in ethereum-optimism#9038
so we need a successful build of `ci-builder`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-feature Category: features M-dependencies Meta: updates dependencies
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants