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][py] Update latest index for new Nightly upload #14739

Draft
wants to merge 1 commit into
base: trunk
Choose a base branch
from

Conversation

VietND96
Copy link
Member

@VietND96 VietND96 commented Nov 10, 2024

User description

Thanks for contributing to Selenium!
A PR well described will help maintainers to quickly review and merge it

Before submitting your PR, please check our contributing guidelines.
Avoid large PRs, help reviewers by making them as simple and short as possible.

Description

Nightly build upload to TestPyPi is marked as Pre-release, so when install via pip install -i https://test.pypi.org/simple/selenium, it doesn't actually install the latest Nightly.
When referring to few answer, they mentioned something like

When uploading a package to TestPyPi, the version is marked as pre-release if the version number includes a pre-release identifier (e.g., 1.0.0-alpha, 1.0.0-beta, 1.0.0-rc1). To ensure that your package is marked as the latest release, you need to use a version number that does not include any pre-release identifiers.
The version prefix 4.27.0.nightly202410311942 indicates a nightly build, which is typically considered a pre-release. To ensure your package is marked as the latest release on TestPyPi, you should use a version number without any pre-release identifiers. If you want to use a nightly build version but still mark it as the latest, you can use a versioning scheme that does not include terms like nightly. For example, you could use 4.27.0.202410311942.

So, the versioning scheme doesn't include any terms to make every upload should be updated as latest
For example: https://test.pypi.org/project/selenium/#history

Motivation and Context

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist

  • I have read the contributing document.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

PR Type

enhancement


Description

  • Updated the SE_VERSION in the BUILD.bazel file to remove the pre-release identifier, ensuring that the nightly build is marked as the latest release on TestPyPi.
  • Changed the versioning scheme to avoid using terms like 'nightly', which are typically considered pre-release identifiers.

Changes walkthrough 📝

Relevant files
Enhancement
BUILD.bazel
Update versioning scheme for nightly builds                           

py/BUILD.bazel

  • Updated the SE_VERSION to remove the pre-release identifier.
  • Changed versioning scheme to ensure the nightly build is marked as the
    latest release.
  • +1/-1     

    💡 PR-Agent usage: Comment /help "your question" on any pull request to receive relevant information

    Copy link
    Contributor

    PR Reviewer Guide 🔍

    Here are some key observations to aid the review process:

    ⏱️ Estimated effort to review: 1 🔵⚪⚪⚪⚪
    🧪 No relevant tests
    🔒 No security concerns identified
    ⚡ Recommended focus areas for review

    Version Format
    While the version format change achieves the goal of marking the package as latest, consider if this deviates from semantic versioning best practices by removing the development identifier

    Copy link
    Contributor

    PR Code Suggestions ✨

    No code suggestions found for the PR.

    @VietND96 VietND96 requested a review from diemol November 10, 2024 21:23
    @VietND96 VietND96 changed the title [py] Update latest index for new Nightly upload [ci][py] Update latest index for new Nightly upload Nov 10, 2024
    @VietND96 VietND96 force-pushed the py-nightly branch 2 times, most recently from 08ceab9 to d646594 Compare November 10, 2024 21:59
    Copy link
    Contributor

    codiumai-pr-agent-pro bot commented Nov 10, 2024

    CI Failure Feedback 🧐

    (Checks updated until commit d3adc09)

    Action: Python / Build / Build

    Failed stage: Run Bazel [❌]

    Failed test name: ""

    Failure summary:

    The action failed due to an error in parsing the PEP 440 version identifier:

  • The version identifier '4.27.0.final202410311942' could not be parsed because of a parse error at
    '.final202410311942'.
  • This error occurred in the py_wheel rule for the target //py:selenium-wheel in the file BUILD.bazel.
  • As a result, the analysis of the target //py:selenium-wheel failed, causing the build to abort.

  • Relevant error logs:
    1:  ##[group]Operating System
    2:  Ubuntu
    ...
    
    970:  Package 'php-symfony-debug-bundle' is not installed, so not removed
    971:  Package 'php-symfony-dependency-injection' is not installed, so not removed
    972:  Package 'php-symfony-deprecation-contracts' is not installed, so not removed
    973:  Package 'php-symfony-discord-notifier' is not installed, so not removed
    974:  Package 'php-symfony-doctrine-bridge' is not installed, so not removed
    975:  Package 'php-symfony-doctrine-messenger' is not installed, so not removed
    976:  Package 'php-symfony-dom-crawler' is not installed, so not removed
    977:  Package 'php-symfony-dotenv' is not installed, so not removed
    978:  Package 'php-symfony-error-handler' is not installed, so not removed
    ...
    
    1924:  �[32mAnalyzing:�[0m 2 targets (361 packages loaded, 7430 targets configured)
    1925:  �[32m[1 / 1]�[0m checking cached actions
    1926:  �[32mAnalyzing:�[0m 2 targets (361 packages loaded, 7430 targets configured)
    1927:  �[32m[1 / 1]�[0m checking cached actions
    1928:  �[32mAnalyzing:�[0m 2 targets (371 packages loaded, 9393 targets configured)
    1929:  �[32m[1 / 1]�[0m checking cached actions
    1930:  �[32mAnalyzing:�[0m 2 targets (371 packages loaded, 9884 targets configured)
    1931:  �[32m[1 / 1]�[0m checking cached actions
    1932:  �[31m�[1mERROR: �[0m/home/runner/work/selenium/selenium/py/BUILD.bazel:268:9: in py_wheel rule //py:selenium-wheel: 
    1933:  Traceback (most recent call last):
    1934:  File "/home/runner/.bazel/external/rules_python~/python/private/py_wheel.bzl", line 308, column 25, in _py_wheel_impl
    1935:  normalize_pep440(version),
    1936:  File "/home/runner/.bazel/external/rules_python~/python/private/py_wheel_normalize_pep440.bzl", line 515, column 13, in normalize_pep440
    1937:  fail(
    1938:  Error in fail: Failed to parse PEP 440 version identifier '4.27.0.final202410311942'. Parse error at '.final202410311942'
    1939:  �[31m�[1mERROR: �[0m/home/runner/work/selenium/selenium/py/BUILD.bazel:268:9: Analysis of target '//py:selenium-wheel' failed
    1940:  �[31m�[1mERROR: �[0mAnalysis of target '//py:selenium-wheel' failed; build aborted
    1941:  �[32mINFO: �[0mElapsed time: 30.181s, Critical Path: 1.07s
    1942:  �[32mINFO: �[0m1 process: 1 internal.
    1943:  �[31m�[1mERROR: �[0mBuild did NOT complete successfully
    1944:  �[0m
    1945:  ##[error]Process completed with exit code 1.
    

    ✨ CI feedback usage guide:

    The CI feedback tool (/checks) automatically triggers when a PR has a failed check.
    The tool analyzes the failed checks and provides several feedbacks:

    • Failed stage
    • Failed test name
    • Failure summary
    • Relevant error logs

    In addition to being automatically triggered, the tool can also be invoked manually by commenting on a PR:

    /checks "https://github.com/{repo_name}/actions/runs/{run_number}/job/{job_number}"
    

    where {repo_name} is the name of the repository, {run_number} is the run number of the failed check, and {job_number} is the job number of the failed check.

    Configuration options

    • enable_auto_checks_feedback - if set to true, the tool will automatically provide feedback when a check is failed. Default is true.
    • excluded_checks_list - a list of checks to exclude from the feedback, for example: ["check1", "check2"]. Default is an empty list.
    • enable_help_text - if set to true, the tool will provide a help message with the feedback. Default is true.
    • persistent_comment - if set to true, the tool will overwrite a previous checks comment with the new feedback. Default is true.
    • final_update_message - if persistent_comment is true and updating a previous checks message, the tool will also create a new message: "Persistent checks updated to latest commit". Default is true.

    See more information about the checks tool in the docs.

    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.

    1 participant