Skip to content

Conversation

@ShaharNaveh
Copy link
Collaborator

@ShaharNaveh ShaharNaveh commented Oct 19, 2025

Summary by CodeRabbit

  • Chores
    • Updated build metadata version pin for toolchain consistency.
    • Pinned web-driver testing dependency to a specific Selenium release for reproducible test runs.
    • Adjusted test connection defaults to use localhost for more reliable local test behavior.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 19, 2025

Walkthrough

Updated dependency pins and test infra: vcpkg revision in Cargo.toml changed, Selenium pinned in wasm/tests/requirements.txt, and the test fixture wait_for_port() default host and runtime page load now use localhost instead of 0.0.0.0.

Changes

Cohort / File(s) Summary
Cargo metadata
Cargo.toml
Updated vcpkg revision pin from rev = "2024.02.14" to rev = "2025.09.17".
Test requirements
wasm/tests/requirements.txt
Pinned Selenium to selenium==4.36.0 (was previously unversioned).
Test fixture / runtime host
wasm/tests/conftest.py
Changed wait_for_port(port, host="0.0.0.0", ...)wait_for_port(port, host="localhost", ...). Runtime/browser page load changed to connect to localhost instead of 0.0.0.0. Method signature default altered accordingly.

Sequence Diagram(s)

sequenceDiagram
  participant TestRunner as Test runner
  participant WaitForPort as wait_for_port()
  participant PortCheck as OS/network
  participant Browser as WebDriver / Browser

  TestRunner->>WaitForPort: call wait_for_port(port, host="localhost")
  WaitForPort->>PortCheck: probe localhost:port (loop until ready or timeout)
  alt port becomes available
    PortCheck-->>WaitForPort: success
    WaitForPort-->>TestRunner: return
    TestRunner->>Browser: load http://localhost:PORT/
    Browser-->>TestRunner: page loaded / runtime reachable
  else timeout
    PortCheck-->>WaitForPort: timeout/error
    WaitForPort-->>TestRunner: raise/return failure
  end
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

🐇 I sniffed the pins and hopped to see,
vcpkg and Selenium snug as can be.
localhost now sings where zeros once stood,
tests wake and nod in the little green wood.
A tiny update — a tidy rabbit's glee!

Pre-merge checks and finishing touches

❌ Failed checks (1 warning, 1 inconclusive)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
Title Check ❓ Inconclusive The title "Fix CI" is extremely vague and generic, failing to convey meaningful information about the actual changeset. While the changes are indeed related to fixing CI issues (updating vcpkg revision, pinning Selenium version, and changing the default host from "0.0.0.0" to "localhost"), the title uses non-descriptive language that doesn't specify what was changed or why. A teammate scanning the git history would not be able to understand the primary changes or the nature of the CI issues being addressed from this title alone, as it lacks the clarity and specificity needed to be useful as a commit history reference. Consider revising the title to be more descriptive and specific about the actual changes, such as "Update vcpkg revision and fix localhost connection in tests" or "Update dependencies and correct test host configuration for CI" to clearly communicate the primary changes and help future readers understand what this pull request addressed.
✅ Passed checks (1 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

📜 Recent review details

Configuration used: Path: .coderabbit.yml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between f58620f and ef4f4c0.

📒 Files selected for processing (3)
  • Cargo.toml (1 hunks)
  • wasm/tests/conftest.py (2 hunks)
  • wasm/tests/requirements.txt (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (11)
  • GitHub Check: Run snippets and cpython tests (windows-latest)
  • GitHub Check: Run snippets and cpython tests (macos-latest)
  • GitHub Check: Check the WASM package and demo
  • GitHub Check: Run snippets and cpython tests (ubuntu-latest)
  • GitHub Check: Check Rust code with rustfmt and clippy
  • GitHub Check: Run rust tests (windows-latest)
  • GitHub Check: Run tests under miri
  • GitHub Check: Run snippets and cpython tests on wasm-wasi
  • GitHub Check: Run rust tests (macos-latest)
  • GitHub Check: Run rust tests (ubuntu-latest)
  • GitHub Check: Ensure compilation on various targets
🔇 Additional comments (4)
wasm/tests/conftest.py (2)

44-44: Good fix for the default host parameter.

Changing the default host to "localhost" is the correct approach. While 0.0.0.0 is used for binding servers to all interfaces, localhost (127.0.0.1) is the proper loopback address for client connections in test and CI environments.


97-97: Excellent—this addresses the previous review comment.

The URL now uses localhost consistently with the wait_for_port function, resolving the mismatch that was flagged in the previous review. This ensures both the port-ready check and the browser connection target use the same host.

wasm/tests/requirements.txt (1)

2-2: Selenium version 4.36.0 is secure; consider updating to 4.37.0 for latest features.

Version 4.36.0 has no known security vulnerabilities, and your pinning approach maintains CI reproducibility. However, 4.37.0 is the latest available version on PyPI. Consider updating to capture any bug fixes or improvements in the latest release, though staying on 4.36.0 is acceptable for stability if preferred.

Cargo.toml (1)

93-93: Let me search for any breaking changes or Windows build compatibility issues in the vcpkg 2025.09.17 release.

No issues found — the vcpkg revision is valid and compatible.

vcpkg 2025.09.17 is an official signed release from September 22, and Windows triplets (x86-windows, x64-windows, x64-windows-release, x64-windows-static, x64-windows-static-md, x64-uwp, arm64-windows, arm64-windows-static-md, arm64-uwp) are fully supported and tested. The September 2025 release includes new binary caching sources, platform support improvements, and bug fixes—no breaking changes that would impact Windows builds.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@ShaharNaveh ShaharNaveh changed the title Update vcpkg to 2025.09.17 Fix CI Oct 19, 2025
@ShaharNaveh
Copy link
Collaborator Author

ShaharNaveh commented Oct 19, 2025

@youknowone mind helping here? I thought it was the selenium version, but it's not. I ain't so sure why it tries to connect to 0.0.0.0, how did it work before?

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
wasm/tests/conftest.py (1)

98-98: Critical: Update hardcoded 0.0.0.0 to localhost to match the port-wait logic.

The wait_for_port(PORT) call at line 32 now checks localhost:8080 (per the updated default at line 45), but the browser still attempts to connect to http://0.0.0.0:8080. In many CI environments, 0.0.0.0 is not a valid connection target from the browser context—it's a bind address. This mismatch likely causes the CI failures mentioned in the PR.

Apply this diff to align the browser connection with the port-wait logic:

-        driver.get(f"http://0.0.0.0:{PORT}")
+        driver.get(f"http://localhost:{PORT}")
📜 Review details

Configuration used: Path: .coderabbit.yml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 272dd4d and f58620f.

📒 Files selected for processing (1)
  • wasm/tests/conftest.py (3 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (11)
  • GitHub Check: Run snippets and cpython tests on wasm-wasi
  • GitHub Check: Run snippets and cpython tests (windows-latest)
  • GitHub Check: Run tests under miri
  • GitHub Check: Check the WASM package and demo
  • GitHub Check: Run snippets and cpython tests (macos-latest)
  • GitHub Check: Run snippets and cpython tests (ubuntu-latest)
  • GitHub Check: Run rust tests (ubuntu-latest)
  • GitHub Check: Run rust tests (macos-latest)
  • GitHub Check: Check Rust code with rustfmt and clippy
  • GitHub Check: Ensure compilation on various targets
  • GitHub Check: Run rust tests (windows-latest)
🔇 Additional comments (2)
wasm/tests/conftest.py (2)

1-8: LGTM! Import additions support the functionality below.

The added imports (atexit, time, pytest) are all utilized in the file and the reordering improves clarity.


69-73: LGTM! Selenium imports are properly organized.

The addition of JavascriptException and reordering of other imports align with their usage in the test fixtures below.

@youknowone
Copy link
Member

awesome, you found it

@ShaharNaveh
Copy link
Collaborator Author

Can we merge? :)

Copy link
Member

@youknowone youknowone left a comment

Choose a reason for hiding this comment

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

👍 Thank you so much

@youknowone youknowone merged commit 9a5d5d6 into RustPython:main Oct 20, 2025
12 checks passed
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.

2 participants