-
-
Notifications
You must be signed in to change notification settings - Fork 76
search: update nixos-search version #419
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
Conversation
Note Reviews pausedUse the following commands to manage reviews:
WalkthroughBumps version references from 43 to 44 in two places: the GitHub Actions workflow check and the search client’s backend URL path. No other logic, authentication, or response handling changes. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes ✨ Finishing touches
🧪 Generate unit tests
Tip 👮 Agentic pre-merge checks are now available in preview!Pro plan users can now enable pre-merge checks in their settings to enforce checklists before merging PRs.
Please see the documentation for more information. Example: reviews:
pre_merge_checks:
custom_checks:
- name: "Undocumented Breaking Changes"
mode: "warning"
instructions: |
Pass/fail criteria: All breaking changes to public APIs, CLI flags, environment variables, configuration keys, database schemas, or HTTP/GraphQL endpoints must be documented in the "Breaking Change" section of the PR description and in CHANGELOG.md. Exclude purely internal or private changes (e.g., code not exported from package entry points or explicitly marked as internal). Please share your feedback with us on this Discord post. 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. Comment Pre-merge checks❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
|
@coderabbitai stop your AI slop thx |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (3)
src/search.rs (1)
133-137
: Optional: avoid hardcoding the backend version in the URLDefine a single const and interpolate it to reduce future drift.
Apply this diff to the URL line:
- "https://search.nixos.org/backend/latest-44-{channel}/_search" + "https://search.nixos.org/backend/latest-{NIXOS_SEARCH_BACKEND_VERSION}-{channel}/_search"Add this near the other top-level consts:
const NIXOS_SEARCH_BACKEND_VERSION: u8 = 44;.github/workflows/nixos-search.yaml (2)
16-18
: Nit: possessive “its”, not “it’s”Minor grammar fix in the comment.
- # to be updated when nixos-search updates it's version number. + # to be updated when nixos-search updates its version number.
12-28
: Harden the check and prevent drift with the codeAdd strict shell flags, fail on curl errors, validate content, and assert that src/search.rs uses the same version.
- name: Check nixos-search version run: | + set -euo pipefail - VERSION_CONTENT=$(curl --silent "https://raw.githubusercontent.com/nixos/nixos-search/main/VERSION" | tr -d '[:space:]') + VERSION_CONTENT=$(curl -fsSL "https://raw.githubusercontent.com/nixos/nixos-search/main/VERSION" | tr -d '[:space:]') # NOTE: this number and the version number in src/search.rs have # to be updated when nixos-search updates it's version number. VERSION_NUMBER=44 + + if ! echo "$VERSION_CONTENT" | grep -Eq '^[0-9]+$'; then + echo "::error:: Invalid VERSION content: '$VERSION_CONTENT'" + exit 1 + fi echo "Found VERSION: $VERSION_CONTENT" if [ "$VERSION_CONTENT" != "$VERSION_NUMBER" ]; then echo "::error:: Expected version $VERSION_NUMBER, but found $VERSION_CONTENT" exit 1 fi + + # Assert the code uses the same version in the backend URL + if ! grep -Rqn -- "latest-$VERSION_NUMBER-" src/search.rs ; then + echo "::error:: src/search.rs is not using backend version $VERSION_NUMBER" + exit 1 + fi echo "Version check passed. nixos-search version is $VERSION_NUMBER."
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
.github/workflows/nixos-search.yaml
(1 hunks)src/search.rs
(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). (5)
- GitHub Check: Build NH on Linux
- GitHub Check: Build NH on Darwin
- GitHub Check: treewide-checks
- GitHub Check: Test NH on Darwin
- GitHub Check: Test NH on Linux
🔇 Additional comments (2)
src/search.rs (1)
133-137
: LGTM: bump to backend API v44 matches upstreamConfirmed nixos-search VERSION is 44 on September 13, 2025; the URL change to latest-44-{channel} is correct and aligned with the workflow. (raw.githubusercontent.com)
.github/workflows/nixos-search.yaml (1)
16-19
: LGTM: VERSION_NUMBER=44 is correct (upstream is 44 as of today)Matches the backend URL in src/search.rs; upstream VERSION currently reads “44”. (raw.githubusercontent.com)
@faukah I understand - I've paused the automated reviews for this PR. ✅ Actions performedReviews paused. |
tested, werks. |
The version checking workflow has been failing for some time, here's a bump of the searching version.
Sanity Checking
nix fmt
to format my Nix codecargo fmt
to format my Rust codecargo clippy
and fixed any new linter warnings.logic
description.
x86_64-linux
aarch64-linux
x86_64-darwin
aarch64-darwin
Add a 👍 reaction to pull requests you find important.
Summary by CodeRabbit
New Features
Chores