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] Use a tag to figure out what we might want to release #14378

Merged
merged 2 commits into from
Aug 21, 2024

Conversation

shs96c
Copy link
Member

@shs96c shs96c commented Aug 12, 2024

User description

This means the ci-build.sh script can be shrunk by removing the hard-coded list of artifacts.


PR Type

Enhancement, Configuration changes


Description

  • Removed hard-coded list of artifacts to build in ci-build.sh script.
  • Added release-artifact tag to various Bazel build targets across multiple languages (.NET, Java, JavaScript, Python, Ruby).
  • Updated build configuration to dynamically select artifacts based on the release-artifact tag.

Changes walkthrough 📝

Relevant files
Enhancement
1 files
ci-build.sh
Dynamically select artifacts to build using tag filters   

scripts/github-actions/ci-build.sh

  • Removed hard-coded list of artifacts to build.
  • Added --build_tag_filters=release-artifact to dynamically select
    artifacts.
  • +1/-6     
    Configuration changes
    24 files
    BUILD.bazel
    Add release-artifact tag to .NET build targets                     

    dotnet/BUILD.bazel

  • Added release-artifact tag to strongnamed and release targets.
  • +6/-0     
    BUILD.bazel
    Add release-artifact tag to Selenium Java API targets       

    java/src/org/openqa/selenium/BUILD.bazel

  • Added release-artifact tag to selenium-api and client-combined
    targets.
  • +6/-0     
    BUILD.bazel
    Add release-artifact tag to Selenium Chrome driver target

    java/src/org/openqa/selenium/chrome/BUILD.bazel

    • Added release-artifact tag to chrome target.
    +3/-0     
    BUILD.bazel
    Add release-artifact tag to Selenium Chromium driver target

    java/src/org/openqa/selenium/chromium/BUILD.bazel

    • Added release-artifact tag to chromium target.
    +3/-0     
    BUILD.bazel
    Add release-artifact tag to Selenium DevTools v125 target

    java/src/org/openqa/selenium/devtools/v125/BUILD.bazel

    • Added release-artifact tag to selenium-devtools-v125 target.
    +3/-0     
    BUILD.bazel
    Add release-artifact tag to Selenium DevTools v126 target

    java/src/org/openqa/selenium/devtools/v126/BUILD.bazel

    • Added release-artifact tag to selenium-devtools-v126 target.
    +3/-0     
    BUILD.bazel
    Add release-artifact tag to Selenium DevTools v127 target

    java/src/org/openqa/selenium/devtools/v127/BUILD.bazel

    • Added release-artifact tag to selenium-devtools-v127 target.
    +3/-0     
    BUILD.bazel
    Add release-artifact tag to Selenium DevTools v85 target 

    java/src/org/openqa/selenium/devtools/v85/BUILD.bazel

    • Added release-artifact tag to selenium-devtools-v85 target.
    +3/-0     
    BUILD.bazel
    Add release-artifact tag to Selenium Edge driver target   

    java/src/org/openqa/selenium/edge/BUILD.bazel

    • Added release-artifact tag to edge target.
    +3/-0     
    BUILD.bazel
    Add release-artifact tag to Selenium Firefox driver target

    java/src/org/openqa/selenium/firefox/BUILD.bazel

    • Added release-artifact tag to firefox target.
    +3/-0     
    BUILD.bazel
    Add release-artifact tag to Selenium Grid and BOM targets

    java/src/org/openqa/selenium/grid/BUILD.bazel

    • Added release-artifact tag to selenium-bom and grid targets.
    +6/-0     
    BUILD.bazel
    Add release-artifact tag to Selenium JDBC session map target

    java/src/org/openqa/selenium/grid/sessionmap/jdbc/BUILD.bazel

    • Added release-artifact tag to jdbc target.
    +3/-0     
    BUILD.bazel
    Add release-artifact tag to Selenium Redis session map target

    java/src/org/openqa/selenium/grid/sessionmap/redis/BUILD.bazel

    • Added release-artifact tag to redis target.
    +3/-0     
    BUILD.bazel
    Add release-artifact tag to Selenium IE driver target       

    java/src/org/openqa/selenium/ie/BUILD.bazel

    • Added release-artifact tag to ie target.
    +3/-0     
    BUILD.bazel
    Add release-artifact tag to Selenium JSON target                 

    java/src/org/openqa/selenium/json/BUILD.bazel

    • Added release-artifact tag to json target.
    +3/-0     
    BUILD.bazel
    Add release-artifact tag to Selenium Manager target           

    java/src/org/openqa/selenium/manager/BUILD.bazel

    • Added release-artifact tag to manager target.
    +3/-0     
    BUILD.bazel
    Add release-artifact tag to Selenium OS target                     

    java/src/org/openqa/selenium/os/BUILD.bazel

    • Added release-artifact tag to os target.
    +3/-0     
    BUILD.bazel
    Add release-artifact tag to Selenium Remote Driver target

    java/src/org/openqa/selenium/remote/BUILD.bazel

    • Added release-artifact tag to remote-driver target.
    +3/-0     
    BUILD.bazel
    Add release-artifact tag to Selenium HTTP target                 

    java/src/org/openqa/selenium/remote/http/BUILD.bazel

    • Added release-artifact tag to http target.
    +3/-0     
    BUILD.bazel
    Add release-artifact tag to Selenium Safari driver target

    java/src/org/openqa/selenium/safari/BUILD.bazel

    • Added release-artifact tag to safari target.
    +3/-0     
    BUILD.bazel
    Add release-artifact tag to Selenium Support target           

    java/src/org/openqa/selenium/support/BUILD.bazel

    • Added release-artifact tag to support target.
    +3/-0     
    BUILD.bazel
    Add release-artifact tag to Selenium WebDriver JavaScript target

    javascript/node/selenium-webdriver/BUILD.bazel

    • Added release-artifact tag to selenium-webdriver target.
    +3/-0     
    BUILD.bazel
    Add release-artifact tag to Selenium Python Wheel target 

    py/BUILD.bazel

    • Added release-artifact tag to selenium-wheel target.
    +3/-0     
    BUILD.bazel
    Add release-artifact tag to Selenium Ruby targets               

    rb/BUILD.bazel

  • Added release-artifact tag to selenium-webdriver and selenium-devtools
    targets.
  • +6/-0     

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

    Copy link
    Contributor

    PR Reviewer Guide 🔍

    ⏱️ Estimated effort to review: 2 🔵🔵⚪⚪⚪
    🧪 No relevant tests
    🔒 No security concerns identified
    ⚡ No key issues to review

    Copy link
    Contributor

    PR Code Suggestions ✨

    CategorySuggestion                                                                                                                                    Score
    Best practice
    Add version constraints to dependencies in the uses section

    For better traceability and management of dependencies, consider adding explicit
    version constraints to the uses dependencies in the java_export target.

    java/src/org/openqa/selenium/remote/BUILD.bazel [19-22]

     uses = [
    -    "org.openqa.selenium.devtools.CdpInfo",
    -    "org.openqa.selenium.remote.AugmenterProvider",
    -    "org.openqa.selenium.remote.service.DriverService$Builder",
    +    "org.openqa.selenium.devtools.CdpInfo@1.0",
    +    "org.openqa.selenium.remote.AugmenterProvider@1.0",
    +    "org.openqa.selenium.remote.service.DriverService$Builder@1.0",
     ],
     
    • Apply this suggestion
    Suggestion importance[1-10]: 9

    Why: Adding explicit version constraints to dependencies enhances traceability and management of dependencies, which is crucial for maintaining stable builds. This is a best practice that addresses a significant aspect of dependency management.

    9
    Specify the output directory for the bazel build command

    Consider specifying the output directory for the bazel build command to ensure that
    the build artifacts are stored in a predictable and controlled location. This can
    help in managing the artifacts more effectively, especially in CI environments.

    scripts/github-actions/ci-build.sh [16]

    -bazel build --config=remote-ci --build_tag_filters=release-artifact //...
    +bazel build --config=remote-ci --build_tag_filters=release-artifact --output_base=/path/to/output/dir //...
     
    Suggestion importance[1-10]: 8

    Why: Specifying the output directory for the bazel build command can help in managing build artifacts more effectively, especially in CI environments. This is a best practice that can improve the predictability and control of build outputs.

    8
    Maintainability
    Add a description to the pkg_zip target

    It's recommended to add a description for the pkg_zip target to clarify its purpose
    and usage within the project. This can improve maintainability and understanding of
    the build configuration.

    dotnet/BUILD.bazel [8-16]

     pkg_zip(
         name = "strongnamed",
         srcs = [
             "//dotnet/src/support:support-strongnamed-pack",
             "//dotnet/src/webdriver:webdriver-strongnamed-pack",
         ],
         tags = [
             "release-artifact",
         ],
    +    description = "Package for strongly named assemblies of the project."
     )
     
    • Apply this suggestion
    Suggestion importance[1-10]: 7

    Why: Adding a description to the pkg_zip target can improve maintainability and understanding of the build configuration. This is a minor but useful improvement for documentation purposes.

    7
    Standardize the formatting of the tags list

    Ensure consistent formatting of the tags list across all java_export targets to
    improve readability and maintainability of the build scripts.

    java/src/org/openqa/selenium/BUILD.bazel [33-35]

    -tags = [
    -    "release-artifact",
    -],
    +tags = ["release-artifact"],
     
    • Apply this suggestion
    Suggestion importance[1-10]: 6

    Why: Standardizing the formatting of the tags list improves readability and maintainability of the build scripts. This is a minor improvement focused on code style.

    6

    @diemol
    Copy link
    Member

    diemol commented Aug 14, 2024

    @shs96c please merge

    @shs96c shs96c merged commit e4258ea into SeleniumHQ:trunk Aug 21, 2024
    28 of 30 checks passed
    @shs96c shs96c deleted the tag-release-artifacts branch August 21, 2024 11:24
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Projects
    None yet
    Development

    Successfully merging this pull request may close these issues.

    3 participants