Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion .github/scripts/check-fleet-search-parity.sh
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,18 @@ FLEET_HEADER_HTTP='//! Rehomed verbatim copy of pkgs/atlas-search'\''s server_ht
//! split from server.rs in #12671 to satisfy the production-line
//! limit: mirror every change in both copies. Drift guard:
//! .github/scripts/check-fleet-search-parity.sh.'
# server/server_error.rs is a verbatim pair too (#16255 slice 5 split
# it out of server.rs in the atlas copy only, which silently broke
# this guard until #15653): the two copies are fully identical,
# header included, so both pins below are the same text.
ATLAS_HEADER_ERROR='//!
//! Split from [`super`] (#16255) to keep `server` under the
//! production line limit.'

FLEET_HEADER_ERROR='//!
//! Split from [`super`] (#16255) to keep `server` under the
//! production line limit.'


TMP="$(mktemp -d)"
trap 'rm -rf "$TMP"' EXIT
Expand Down Expand Up @@ -143,8 +155,9 @@ check_pair render.rs "$ATLAS_HEADER_WRITERS" "$FLEET_HEADER_WRITERS"
check_pair server.rs "$ATLAS_HEADER_SERVER" "$FLEET_HEADER_SERVER"
check_pair server/server_feedback.rs "$ATLAS_HEADER_FEEDBACK" "$FLEET_HEADER_FEEDBACK"
check_pair server/server_http.rs "$ATLAS_HEADER_HTTP" "$FLEET_HEADER_HTTP"
check_pair server/server_error.rs "$ATLAS_HEADER_ERROR" "$FLEET_HEADER_ERROR"

if [ "$fail" -ne 0 ]; then
exit 1
fi
echo "fleet-search parity: OK - pyjson.rs, render.rs, server.rs, server/server_feedback.rs and server/server_http.rs match atlas-search byte-for-byte outside the pinned parity headers (#5433 contract, guard #5920)"
echo "fleet-search parity: OK - pyjson.rs, render.rs, server.rs, server/server_feedback.rs, server/server_http.rs and server/server_error.rs match atlas-search byte-for-byte outside the pinned parity headers (#5433 contract, guard #5920)"
4 changes: 3 additions & 1 deletion .github/scripts/check-fleet-search-parity.test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,13 @@ make_tree() {
"pkgs/atlas-search/crates/atlas-search/src/server.rs" \
"pkgs/atlas-search/crates/atlas-search/src/server/server_feedback.rs" \
"pkgs/atlas-search/crates/atlas-search/src/server/server_http.rs" \
"pkgs/atlas-search/crates/atlas-search/src/server/server_error.rs" \
"pkgs/fleet/crates/fleet-search/src/pyjson.rs" \
"pkgs/fleet/crates/fleet-search/src/render.rs" \
"pkgs/fleet/crates/fleet-search/src/server.rs" \
"pkgs/fleet/crates/fleet-search/src/server/server_feedback.rs" \
"pkgs/fleet/crates/fleet-search/src/server/server_http.rs"; do
"pkgs/fleet/crates/fleet-search/src/server/server_http.rs" \
"pkgs/fleet/crates/fleet-search/src/server/server_error.rs"; do
cp "$REPO_ROOT/$pair" "$dest/$pair"
done
}
Expand Down
22 changes: 19 additions & 3 deletions .github/workflows/fleet-search-parity-guard.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,27 @@ name: fleet-search-parity-guard
# envelopes byte-identically to atlas-search. Pure bash -- no nix, no
# toolchain -- so this stays a seconds-long basic check.
#
# Dispatch-only: no push or schedule trigger runs this guard
# automatically.
# Runs on any push to main or PR touching the paired copies or the
# guard itself (#15653: the dispatch-only era missed two silent
# divergences), and still by hand.

on:
workflow_dispatch:
push:
branches: [main]
paths:
- 'pkgs/atlas-search/crates/atlas-search/src/**'
- 'pkgs/fleet/crates/fleet-search/src/**'
- '.github/scripts/check-fleet-search-parity.sh'
- '.github/scripts/check-fleet-search-parity.test.sh'
- '.github/workflows/fleet-search-parity-guard.yml'
pull_request:
paths:
- 'pkgs/atlas-search/crates/atlas-search/src/**'
- 'pkgs/fleet/crates/fleet-search/src/**'
- '.github/scripts/check-fleet-search-parity.sh'
- '.github/scripts/check-fleet-search-parity.test.sh'
- '.github/workflows/fleet-search-parity-guard.yml'

permissions:
contents: read
Expand All @@ -24,7 +40,7 @@ concurrency:

jobs:
parity-guard:
name: "basic: fleet-search pyjson/render parity (#5920)"
name: "basic: fleet-search/atlas-search parity (#5920)"
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
Expand Down
1 change: 1 addition & 0 deletions pkgs/fleet/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions pkgs/fleet/crates/fleet-search/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ atlas-embed = { path = "../../../atlas-search/crates/atlas-embed", optional = tr
atlas-proto = { path = "../../../atlas-search/crates/atlas-proto", optional = true }

[dev-dependencies]
rusqlite = { version = "0.43", features = ["bundled"] }
proptest = "1.12"
# The serve contract tests drive the role over real loopback HTTP with a
# stub backend, so they name atlas-core's backend trait and types.
Expand Down
Loading