Skip to content

iter-29: greenify CI — rustls reqwest, Windows snapshot filter#34

Merged
ractive merged 1 commit into
mainfrom
iter-29/ci-greenify
May 10, 2026
Merged

iter-29: greenify CI — rustls reqwest, Windows snapshot filter#34
ractive merged 1 commit into
mainfrom
iter-29/ci-greenify

Conversation

@ractive

@ractive ractive commented May 10, 2026

Copy link
Copy Markdown
Owner

Summary

  • Switch workspace reqwest to default-features = false, features = ["json", "rustls-tls"] — drops openssl-sys from the dep graph, unblocking the aarch64-unknown-linux-gnu cross job whose Docker image OpenSSL didn't match what openssl-sys 0.9.x recognises.
  • Add an assert_cli_snapshot! helper (in tests/e2e/support) that wires up an insta filter normalising hoppy.exe -> hoppy, so CLI-help snapshots captured on Unix continue to match on x86_64-pc-windows-msvc. Applied to container_logs_help (the only Usage: hoppy … snapshot today).
  • Enable the filters feature on the workspace insta dep so the macro compiles.

Test plan

  • cargo fmt --check
  • cargo clippy --workspace --all-targets -- -D warnings
  • cargo test --workspace --quiet
  • cargo tree --workspace | grep openssl — empty
  • CI: all five matrix jobs (linux x86_64, linux aarch64 cross, macos-13, macos-latest, windows) pass

Summary by CodeRabbit

  • Chores

    • Updated workspace dependency configuration: added feature flags to insta for filtering and redactions; switched TLS implementation in reqwest from native-tls to rustls with default-features = false.
    • Enhanced cross-platform CLI output consistency through snapshot assertion improvements.
  • Documentation

    • Added iteration documentation for CI improvements and target compatibility.

Review Change Stack

- Switch reqwest to rustls-tls (drop default features) so the workspace no
  longer pulls in openssl-sys. Fixes the aarch64-unknown-linux-gnu cross
  job, which couldn't build openssl-sys against cross's Docker OpenSSL.
- Add an `assert_cli_snapshot!` helper that filters `hoppy.exe` -> `hoppy`
  via insta's `filters` feature, so CLI-help snapshots captured on Unix
  match on Windows runners. Apply to the `container logs --help` snapshot
  (the only `Usage: hoppy ...` snapshot in the suite today).
- Enable the `filters` feature on the workspace insta dep.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented May 10, 2026

Copy link
Copy Markdown
ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Free

Run ID: 1ab96d8a-04a0-4b8c-8f4e-f9dd39c7fd7f

📥 Commits

Reviewing files that changed from the base of the PR and between 867e776 and 7ea153c.

⛔ Files ignored due to path filters (1)
  • Cargo.lock is excluded by !**/*.lock
📒 Files selected for processing (4)
  • Cargo.toml
  • hoppy-knowledgebase/iterations/iteration-29-ci-greenify.md
  • tests/e2e/cli_container.rs
  • tests/e2e/support/mod.rs

📝 Walkthrough

Walkthrough

PR updates workspace dependencies to switch reqwest from native-tls to rustls for deterministic cross-compilation, adds insta filter support, and introduces a new CLI snapshot assertion macro to normalize Windows-specific CLI output for cross-platform testing consistency.

Changes

CI Green on Five Targets

Layer / File(s) Summary
Iteration Plan & Acceptance Criteria
hoppy-knowledgebase/iterations/iteration-29-ci-greenify.md
Defines Iteration 29 scope addressing Windows snapshot brittleness (hoppy.exe vs hoppy), aarch64-linux openssl-sys elimination via rustls switch, macOS-13 investigation follow-ups, and acceptance criteria spanning all five CI targets, dependency verification, and rustls e2e validation.
Workspace Dependencies & TLS Stack
Cargo.toml
Insta workspace dependency gains filters feature for text normalization. Reqwest switches from default features to explicit json and rustls-tls with default-features = false, eliminating openssl-sys dependency.
Test Support: CLI Snapshot Macro
tests/e2e/support/mod.rs
New exported macro assert_cli_snapshot! wraps insta snapshot assertions with a text filter that normalizes Windows-specific hoppy.exe to hoppy, enabling cross-platform CLI help snapshot sharing.
Test Integration: Apply Macro
tests/e2e/cli_container.rs
container_logs_help test now uses crate::assert_cli_snapshot! instead of direct insta::assert_snapshot! for cross-platform output normalization.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐰 With rustls we hop so sure and fast,
No openssl chains to hold us fast.
The hoppy.exe name we now filter clean—
Cross-platform snapshots: a tester's dream!
Windows, Linux, Mac all aligned,
CI green: a victory refined. 🌿


Note

🎁 Summarized by CodeRabbit Free

Your organization is on the Free plan. CodeRabbit will generate a high-level summary and a walkthrough for each pull request. For a comprehensive line-by-line review, please upgrade your subscription to CodeRabbit Pro by visiting https://app.coderabbit.ai/login.

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

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR focuses on CI portability across the workspace by removing the OpenSSL dependency from HTTP/TLS and by making snapshot-based CLI help tests stable on Windows runners.

Changes:

  • Switch workspace reqwest to default-features = false with rustls-tls to eliminate openssl-sys from the dependency graph.
  • Add an e2e snapshot helper macro that normalizes hoppy.exehoppy so Unix-captured --help snapshots match on Windows.
  • Enable insta’s filters feature to support the new snapshot filter.

Reviewed changes

Copilot reviewed 4 out of 5 changed files in this pull request and generated no comments.

Show a summary per file
File Description
tests/e2e/support/mod.rs Adds assert_cli_snapshot! macro using an insta filter to normalize Windows .exe in snapshot text.
tests/e2e/cli_container.rs Switches the container_logs_help snapshot assertion to use the new helper.
hoppy-knowledgebase/iterations/iteration-29-ci-greenify.md Documents the iteration goals/plan and captures rationale for the CI fixes.
Cargo.toml Updates workspace deps: enable insta filters and switch reqwest to rustls + no default features.
Cargo.lock Reflects the dependency graph changes from moving off native-tls/openssl to rustls.

@ractive
ractive merged commit dd2ebd7 into main May 10, 2026
11 of 12 checks passed
@ractive
ractive deleted the iter-29/ci-greenify branch May 10, 2026 18:12
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