SeleniumHQ / selenium

A browser automation framework and ecosystem.
https://selenium.dev
Apache License 2.0
29.74k stars 8.02k forks source link

Update bazel and its dependencies #14129

Closed shs96c closed 2 weeks ago

shs96c commented 2 weeks ago

PR Type

Enhancement, Dependencies


Description


Changes walkthrough ๐Ÿ“

Relevant files
Enhancement
.bazelversion
Update Bazel version to 7.2.0                                                       

.bazelversion - Updated Bazel version from 7.1.2 to 7.2.0.
+1/-1     
WORKSPACE
Remove unused proto dependencies and toolchains                   

WORKSPACE
  • Removed rules_proto_dependencies and rules_proto_toolchains loading.
  • +0/-8     
    Dependencies
    MODULE.bazel
    Update Bazel dependencies and add protobuf                             

    MODULE.bazel
  • Updated multiple Bazel dependencies to newer versions.
  • Added a new dependency for protobuf required for closure rules.
  • +16/-12 

    ๐Ÿ’ก PR-Agent usage: Comment /help on the PR to get a list of all available PR-Agent tools and their descriptions

    codiumai-pr-agent-pro[bot] commented 2 weeks ago

    PR Reviewer Guide ๐Ÿ”

    โฑ๏ธ Estimated effort to review [1-5] 2
    ๐Ÿงช Relevant tests No
    ๐Ÿ”’ Security concerns No
    โšก Key issues to review Dependency Compatibility:
    Ensure that the updated versions of dependencies in MODULE.bazel are compatible with each other and with Bazel 7.2.0.
    Unused Dependency Removal:
    Verify that the removal of `rules_proto_dependencies` and `rules_proto_toolchains` from WORKSPACE does not affect any existing functionalities or dependencies.
    codiumai-pr-agent-pro[bot] commented 2 weeks ago

    PR Code Suggestions โœจ

    CategorySuggestion                                                                                                                                    Score
    Dependency management
    Ensure that removed proto dependencies and toolchains are no longer required by the build process ___ **Since the rules_proto_dependencies and rules_proto_toolchains were removed, ensure that
    these are no longer required by any part of the build process. If they are still needed,
    consider adding them back or finding an alternative solution.** [WORKSPACE [7-13]](https://github.com/SeleniumHQ/selenium/pull/14129/files#diff-5493ff8e9397811510e780de47c57abb70137f1afe85d1519130dc3679d60ce5R7-R13) ```diff # This gets us a pre-compiled `protoc` -load("@rules_proto//proto:repositories.bzl", "rules_proto_dependencies", "rules_proto_toolchains") +# load("@rules_proto//proto:repositories.bzl", "rules_proto_dependencies", "rules_proto_toolchains") -rules_proto_dependencies() +# rules_proto_dependencies() -rules_proto_toolchains() +# rules_proto_toolchains() ``` - [ ] **Apply this suggestion**
    Suggestion importance[1-10]: 8 Why: The suggestion correctly identifies potential issues with the removal of dependencies that might still be needed, which is crucial for avoiding build failures.
    8
    Compatibility
    Verify compatibility of new dependencies with existing ones by running a full build and test suite ___ **Ensure that the new dependencies added are compatible with each other and with the
    existing dependencies. This can be done by running a full build and test suite to verify
    that there are no conflicts or issues introduced by the new versions.** [MODULE.bazel [4-9]](https://github.com/SeleniumHQ/selenium/pull/14129/files#diff-6136fc12446089c3db7360e923203dd114b6a1466252e71667c6791c20fe6bdcR4-R9) ```diff +bazel_dep(name = "aspect_bazel_lib", version = "2.7.7") +bazel_dep(name = "aspect_rules_esbuild", version = "0.20.1") +bazel_dep(name = "aspect_rules_ts", version = "2.4.2") +bazel_dep(name = "bazel_features", version = "1.13.0") +bazel_dep(name = "bazel_skylib", version = "1.7.1") +... - ```
    Suggestion importance[1-10]: 7 Why: This is a practical suggestion to ensure that newly added dependencies do not introduce conflicts, which is crucial for maintaining a stable build environment.
    7
    Maintainability
    Group related dependencies and add comments to explain their purpose for better readability ___ **Group related dependencies together and add a comment to explain the purpose of each
    group. This will improve the readability and maintainability of the dependency list.** [MODULE.bazel [4-9]](https://github.com/SeleniumHQ/selenium/pull/14129/files#diff-6136fc12446089c3db7360e923203dd114b6a1466252e71667c6791c20fe6bdcR4-R9) ```diff +# Aspect dependencies bazel_dep(name = "aspect_bazel_lib", version = "2.7.7") bazel_dep(name = "aspect_rules_esbuild", version = "0.20.1") bazel_dep(name = "aspect_rules_ts", version = "2.4.2") + +# Bazel features and libraries bazel_dep(name = "bazel_features", version = "1.13.0") bazel_dep(name = "bazel_skylib", version = "1.7.1") ... ```
    Suggestion importance[1-10]: 6 Why: Grouping and commenting on dependencies enhances maintainability and readability, though it's a moderate improvement rather than a critical fix.
    6
    Best practice
    Pin the versions of all dependencies to avoid issues with future updates ___ **Consider pinning the versions of all dependencies to avoid potential issues with future
    updates that might introduce breaking changes.** [MODULE.bazel [4-9]](https://github.com/SeleniumHQ/selenium/pull/14129/files#diff-6136fc12446089c3db7360e923203dd114b6a1466252e71667c6791c20fe6bdcR4-R9) ```diff +bazel_dep(name = "aspect_bazel_lib", version = "2.7.7") +bazel_dep(name = "aspect_rules_esbuild", version = "0.20.1") +bazel_dep(name = "aspect_rules_ts", version = "2.4.2") +bazel_dep(name = "bazel_features", version = "1.13.0") +bazel_dep(name = "bazel_skylib", version = "1.7.1") +... - ```
    Suggestion importance[1-10]: 5 Why: While pinning versions can help avoid future compatibility issues, the suggestion is somewhat generic and does not address specific risks in the context of the PR changes.
    5