Skip to content

Improve rpm packaging error reporting#1864

Merged
oferchen merged 1 commit into
masterfrom
fix-cargo-rpm-build-failure
Nov 1, 2025
Merged

Improve rpm packaging error reporting#1864
oferchen merged 1 commit into
masterfrom
fix-cargo-rpm-build-failure

Conversation

@oferchen
Copy link
Copy Markdown
Owner

@oferchen oferchen commented Nov 1, 2025

Summary

  • check for rpmbuild before invoking cargo rpm build and surface a helpful hint when missing
  • add an environment guard helper for packaging tests and cover the new rpmbuild check
  • provide a reusable ensure_command_available utility used by the packaging workflow

Testing

  • cargo test -p xtask

https://chatgpt.com/codex/tasks/task_e_69058380b5c8832393a3eead73e0fd04

@oferchen oferchen merged commit 32f5770 into master Nov 1, 2025
@oferchen oferchen deleted the fix-cargo-rpm-build-failure branch November 1, 2025 04:24
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread xtask/src/util.rs
Comment on lines +62 to +67
let path_value = env::var_os("PATH").unwrap_or_default();
let mut candidates = vec![OsString::from(program)];
let exe_suffix = env::consts::EXE_SUFFIX;
if !exe_suffix.is_empty() && !program.ends_with(exe_suffix) {
candidates.push(OsString::from(format!("{program}{exe_suffix}")));
}
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Respect PATHEXT when checking command availability on Windows

The new ensure_command_available only looks for the bare program name and an appended .exe. On Windows, commands are resolved using every extension in PATHEXT (e.g. .cmd, .bat, .com). Tools such as rpmbuild are often batch wrappers (rpmbuild.cmd), so this helper will report them as missing even though Command::new("rpmbuild") would succeed. Invoking the packaging workflow or running the new tests on Windows will therefore fail with a false “rpmbuild is unavailable” error. Consider iterating over PATHEXT or spawning the command to detect NotFound.

Useful? React with 👍 / 👎.

oferchen added a commit that referenced this pull request May 1, 2026
Adds scripts/benchmark_flist_memory.sh which compares peak RSS of
oc-rsync against upstream rsync 3.4.1 at 100K and 1M directory scales
under three flist modes:

- Mode A: full flist (--no-inc-recursive)
- Mode B: default (receiver INC_RECURSE)
- Mode C: sender INC_RECURSE (skipped, pending #1862 opt-in flag)

Measures wall-clock time and peak RSS via /usr/bin/time -v, runs each
mode 3 times and takes the median, writes TSV to target/benchmarks/
and emits an optional markdown summary. Fixtures live under
/tmp/oc-rsync-bench (not bind-mounted) with a path guard that refuses
to rm anywhere outside that prefix.

Documents 2026-05-01 baseline numbers in
docs/benchmarks/flist-memory-baseline-2026-05-01.md - upstream peak
RSS drops from 76.8 MB (Mode A) to 7.5 MB (Mode B) at 1M files, while
oc-rsync stays at ~218 MB across both modes (sender-side INC_RECURSE
not yet active). Refs #966/#971 for the RSS gap context.
oferchen added a commit that referenced this pull request May 5, 2026
Adds scripts/benchmark_flist_memory.sh which compares peak RSS of
oc-rsync against upstream rsync 3.4.1 at 100K and 1M directory scales
under three flist modes:

- Mode A: full flist (--no-inc-recursive)
- Mode B: default (receiver INC_RECURSE)
- Mode C: sender INC_RECURSE (skipped, pending #1862 opt-in flag)

Measures wall-clock time and peak RSS via /usr/bin/time -v, runs each
mode 3 times and takes the median, writes TSV to target/benchmarks/
and emits an optional markdown summary. Fixtures live under
/tmp/oc-rsync-bench (not bind-mounted) with a path guard that refuses
to rm anywhere outside that prefix.

Documents 2026-05-01 baseline numbers in
docs/benchmarks/flist-memory-baseline-2026-05-01.md - upstream peak
RSS drops from 76.8 MB (Mode A) to 7.5 MB (Mode B) at 1M files, while
oc-rsync stays at ~218 MB across both modes (sender-side INC_RECURSE
not yet active). Refs #966/#971 for the RSS gap context.
oferchen added a commit that referenced this pull request May 7, 2026
Plan re-baselines peak RSS for full vs incremental flist on 100K and 1M
directory pushes after #1862 landed sender INC_RECURSE. Captures the
state machine in crates/transfer/src/generator/file_list/inc_recurse.rs
plus the receiver-side path in receiver/file_list.rs, and ties the bench
gate to the v0.6.1 push regression revert (#3744) so default-flip needs
both wall-clock and RSS evidence.

Refs #1864, #1862, #966, #971, #972, #2088.
oferchen added a commit that referenced this pull request May 14, 2026
…tern (#4067)

Survey getattrlistbulk(2) and related Darwin metadata APIs against the
current per-entry lstat/fstatat pattern. Recommend deferring implementation
until memory bench (#1864) and arena allocator (#2210) on the shared
walker hot path land. Refs #2153.
oferchen added a commit that referenced this pull request May 16, 2026
…#1864) (#4163)

Add scripts/benchmark_flist_memory_daemon.sh, a daemon-mode companion
to the existing local-push flist memory bench. Spawns a temporary
oc-rsync daemon, pushes 100K- and 1M-file fixtures through it under
both --no-inc-recursive (full flist) and the default receiver
INC_RECURSE mode, and reports peak client RSS plus bytes-per-file
overhead in a markdown table. df -i is consulted up front so
fixtures are skipped when the inode budget would not fit; the daemon
is torn down by an EXIT trap. Operator script, not a CI gate.
oferchen added a commit that referenced this pull request May 18, 2026
Plan re-baselines peak RSS for full vs incremental flist on 100K and 1M
directory pushes after #1862 landed sender INC_RECURSE. Captures the
state machine in crates/transfer/src/generator/file_list/inc_recurse.rs
plus the receiver-side path in receiver/file_list.rs, and ties the bench
gate to the v0.6.1 push regression revert (#3744) so default-flip needs
both wall-clock and RSS evidence.

Refs #1864, #1862, #966, #971, #972, #2088.
oferchen added a commit that referenced this pull request May 18, 2026
…tern (#4067)

Survey getattrlistbulk(2) and related Darwin metadata APIs against the
current per-entry lstat/fstatat pattern. Recommend deferring implementation
until memory bench (#1864) and arena allocator (#2210) on the shared
walker hot path land. Refs #2153.
oferchen added a commit that referenced this pull request May 18, 2026
…#1864) (#4163)

Add scripts/benchmark_flist_memory_daemon.sh, a daemon-mode companion
to the existing local-push flist memory bench. Spawns a temporary
oc-rsync daemon, pushes 100K- and 1M-file fixtures through it under
both --no-inc-recursive (full flist) and the default receiver
INC_RECURSE mode, and reports peak client RSS plus bytes-per-file
overhead in a markdown table. df -i is consulted up front so
fixtures are skipped when the inode budget would not fit; the daemon
is torn down by an EXIT trap. Operator script, not a CI gate.
oferchen added a commit that referenced this pull request May 18, 2026
…tern (#4067)

Survey getattrlistbulk(2) and related Darwin metadata APIs against the
current per-entry lstat/fstatat pattern. Recommend deferring implementation
until memory bench (#1864) and arena allocator (#2210) on the shared
walker hot path land. Refs #2153.
oferchen added a commit that referenced this pull request May 18, 2026
…#1864) (#4163)

Add scripts/benchmark_flist_memory_daemon.sh, a daemon-mode companion
to the existing local-push flist memory bench. Spawns a temporary
oc-rsync daemon, pushes 100K- and 1M-file fixtures through it under
both --no-inc-recursive (full flist) and the default receiver
INC_RECURSE mode, and reports peak client RSS plus bytes-per-file
overhead in a markdown table. df -i is consulted up front so
fixtures are skipped when the inode budget would not fit; the daemon
is torn down by an EXIT trap. Operator script, not a CI gate.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant