Skip to content

ci: use faster gzip for temporary Linux test packages - #23609

Merged
nwparker merged 6 commits into
mainfrom
nwparker/ci-linux-compression-pilot
Sep 28, 2026
Merged

nwparker merged 6 commits into
mainfrom
nwparker/ci-linux-compression-pilot

Conversation

@nwparker

@nwparker nwparker commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

ELI5

Linux CI builds the same test installers with faster gzip compression. The files are slightly larger but finish about 26 seconds sooner.

What Changed

The existing CI-only Linux packaging script selects a config that inherits all release hooks and options, adding gzip level 1 for deb/rpm. Actual release workflows still use their original config and compression. AppImage settings are unchanged. Temporary benchmark workflows and scripts have been removed.

Why

CI discards these installers after smoke checks, so spending extra CPU to shrink them is unnecessary. This preserves all three package formats and the existing package checks.

Testing

  • Three same-runner pairs package one prepared app, reversing the second pair's order. Baseline 72.67, 72.07, 70.91 seconds; level 1 45.66, 46.51, 44.76 seconds. Medians 72.07 → 45.66 seconds (37% lower), a 26.41-second saving in package-format generation. Timing run.
  • A fresh validation run reproduced 72.42 → 45.96 seconds and passed payload comparison for deb (4,362 entries), rpm (4,388) and AppImage (4,364): same file bytes, paths, modes and symlinks, normalizing only the auto-generated Debian changelog build date and gzip timestamp. Successful validation run. The initial strict comparison failed on that generated changelog timestamp; no application payload mismatch was found or excluded.
  • Existing Linux package marker, shutdown, CLI and hang-watchdog smoke checks passed in the validation run.
  • Cost: deb/rpm grow from approximately 230 MB to 258 MB each (~12%). These CI packages are not uploaded as release artifacts.
  • 77 relevant local tests passed, including a check that release configuration is unmodified and hooks are inherited; changed-code quality passed. Full CI passed on final head 0fe208c18685, including all eight unit shards and both packaging jobs: https://github.com/stablyai/orca/actions/runs/36410724232.

Linked Issue

N/A — maintainer-requested CI optimization.

Visual Proof

N/A — CI only.

Review

Final change is three files. Cross-platform runtime, SSH, folder workspaces and release artifact settings are unchanged. The CLI argument parser was tested during the pilot; a dedicated inherited config passes typed fpm arrays reliably.

Agent skill upstream boundary

  • Not applicable.

Checklist

  • Focused change with measured benefit.
  • Same application payload and existing package checks preserved.
  • Release settings and hooks covered by regression test.
  • Local tests and changed-code quality passed.
  • Full CI on final commit passed.

@coderabbitai

coderabbitai Bot commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

📝 Walkthrough

Walkthrough

The change adds a Linux pilot workflow that builds and checks Linux packages. It configures Debian and RPM compression levels, benchmarks baseline and level1 package builds, and compares their extracted payloads. The workflow also runs lifecycle and shutdown checks, packaged CLI smoke tests, and uploads benchmark measurements.

Priority: ⬇️ Low

Merge Risk: 🟡 Moderate · up to 0fe20

The pilot does not yet provide the planned comparison needed to judge its CI-time benefit, and the new workflow breaks a packaging contract test. Resolve both before merging.

Architecture Summary

Architecture risk: 🔵 Low · up to e1826

The change affects 1 system.

Changed systems: config

Architecture concerns
No architecture-level concerns identified.

Review details

Systems and components

  • observed — config (service) was modified; 5 changed files map to changed impact.

Before / after behavior

  • observed — Modified behavior in config/electron-builder-pr-linux.config.cjs: The configuration now inherits the release settings and adds Debian and RPM compression-level arguments to their FPM arrays, defaulting missing arrays to empty.
  • observed — Modified behavior in config/scripts/package-linux-formats.mjs: linuxFormatArguments now passes the PR-specific Linux electron-builder config instead of the general electron-builder config.
  • observed — Modified behavior in config/scripts/benchmark-linux-package-compression.mjs: Imports packaging, filesystem, path, and child-process helpers; creates the benchmark directory under RUNNER_TEMP and initializes the measurements list.
  • observed — Modified behavior in config/scripts/benchmark-linux-package-compression.mjs: Runs baseline and level1 packaging for sample 1, in that order. The baseline substitutes the standard Electron Builder config for the pull-request config; both variants launch Electron Builder with ORCA_BACKGROUND_LAUNCH set to 1. A process error or nonzero exit rejects the build.
🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 5 files. (1 skipped: 1 … Write docstrings for the functions missing them to satisfy the coverage threshold.
Description check ⚠️ Warning The description includes the main template sections and useful testing results, but it conflicts with the changeset. The changeset adds the pilot workflow and benchmark/comparison scripts, while the d… Update the description to match the current changeset. List the added workflow, benchmark script, payload comparison script, configuration, and tests. Remove the claim that temporary workflows and scripts were removed. Add the required Note…
✅ Passed checks (3 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title clearly summarizes the main change: using faster gzip compression for temporary Linux test packages.
Full details: Docstring Coverage

Explanation

Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 5 files. (1 skipped: 1 unsupported.)

Full details: Description check

Explanation

The description includes the main template sections and useful testing results, but it conflicts with the changeset. The changeset adds the pilot workflow and benchmark/comparison scripts, while the description says those files were removed and describes the final change as three files. The Notes section is also missing.

Resolution

Update the description to match the current changeset. List the added workflow, benchmark script, payload comparison script, configuration, and tests. Remove the claim that temporary workflows and scripts were removed. Add the required Notes content and complete any applicable checklist or AI Disclosure items.

  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Commit to this branch
  • Create a new PR

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.

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Important

One repository contract test goes red on this PR. The new ci-linux-compression-pilot.yml package job packs with electron-builder --config … --linux dir (no --prepackaged), so the packaging-job census in config/scripts/mobile-web-bundle-packaging-workflow-contract.test.mjs detects a job that is missing from its expected list and the test fails.

Reviewed changes

  • New CI-only builder config — config/electron-builder-pr-linux.config.cjs spreads the release config and appends --deb-compression-level=1 / --rpm-compression-level=1 to the deb/rpm fpm args.
  • PR Linux packaging switches config — config/scripts/package-linux-formats.mjs points --config at that file and drops its inline --config.deb.fpm=… args; the unit test's expected argv is updated to match.
  • Compression pilot — new ci-linux-compression-pilot.yml, benchmark-linux-package-compression.mjs, and compare-linux-package-payloads.py measure baseline vs level-1 packaging time/size and diff the extracted payloads.

ℹ️ Nitpicks

  • config/scripts/compare-linux-package-payloads.py:3 imports json but never uses it.

Pullfrog  | Fix all ➔ | Fix 👍s ➔ | View workflow run | Using DeepSeek Flash (free via Pullfrog for OSS) | 𝕏

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1


ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Advanced

Run ID: 9d578ebd-4955-45e0-b495-1d8093721027

📥 Commits

Reviewing files that changed from the base of the PR and between 3c6c423 and e182660.

📒 Files selected for processing (4)
  • .github/workflows/ci-linux-compression-pilot.yml
  • config/scripts/benchmark-linux-package-compression.mjs
  • config/scripts/compare-linux-package-payloads.py
  • config/scripts/package-linux-formats.test.mjs

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 4 remain after this review.

const root = resolve(process.env.RUNNER_TEMP, 'linux-compression-benchmark')
mkdirSync(root, { recursive: true })
const measurements = []
for (const sample of [1]) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Restore three alternating benchmark pairs.

This loop runs only sample 1. Baseline always runs before level1, so order-dependent runner conditions can bias the only timing pair. Run three samples per setting and reverse alternate pairs before using the results to establish the PR’s net improvement.

Based on learnings, a fixed sequential benchmark order can bias the comparison.

Source: Learnings

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

ℹ️ No new issues in the latest commits — minor suggestions inline.

Reviewed changes

Reviewed the two commits pushed since the prior Pullfrog review (3c6c423668 → e182660325):

  • Pinned the CI compression config in a test — package-linux-formats.test.mjs now requires both builder configs and asserts the deb/rpm fpm level-1 flags plus that the release config is unmodified, closing the earlier untested-flags gap.
  • Normalized the generated Debian changelog date — compare-linux-package-payloads.py now decompresses usr/share/doc/orca-ide/changelog.gz, validates exactly one " -- " trailer via parsedate_to_datetime, and replaces the build timestamp with a placeholder before the payload diff, so the two packages' differing build dates no longer fail the compare.
  • Uploaded measurements unconditionally — the pilot's upload-artifact step gained if: always() so measurements.json survives a failed compare.
  • Reduced the benchmark to a single pair — benchmark-linux-package-compression.mjs now iterates [1] instead of [1, 2, 3].

Note: the earlier packaging-job census failure in mobile-web-bundle-packaging-workflow-contract.test.mjs is still red at this head and its inline thread remains open — flagged previously, so not re-raised here.

ℹ️ Nitpicks

  • config/scripts/package-linux-formats.test.mjs:217 — the "without mutating release settings" guard shallow-copies ({ ...release.deb }), so its fpm array is still the same reference as release.deb.fpm. An in-place push from the CI config would be invisible to expect(release.deb).toEqual(before.deb); a structuredClone/JSON round-trip of before would actually pin immutability.

Pullfrog  | Fix all ➔ | Fix 👍s ➔ | View workflow run | Using DeepSeek Flash (free via Pullfrog for OSS) | 𝕏

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

✅ No new issues found.

Reviewed changes

Reviewed the commit pushed since the prior Pullfrog review (e182660325 → 0fe208c186), which completes the PR's stated cleanup:

  • Removed the temporary compression pilot — deleted .github/workflows/ci-linux-compression-pilot.yml, config/scripts/benchmark-linux-package-compression.mjs, and config/scripts/compare-linux-package-payloads.py. No dangling references remain.
  • Resolved the packaging-job census failure — mobile-web-bundle-packaging-workflow-contract.test.mjs no longer sees the unlisted ci-linux-compression-pilot.yml package job; that file and package-linux-formats.test.mjs both pass at this head.
  • Retired the prior open threads — the census concern and the benchmark ordering-bias concern are both moot now that their files are gone; both threads were resolved.

The final PR scope is the three durable files: the CI-only builder config (electron-builder-pr-linux.config.cjs), the config-path switch in package-linux-formats.mjs, and the test pinning the deb/rpm compression flags. Release configuration and hooks are unchanged.

Pullfrog  | View workflow run | Using DeepSeek Flash (free via Pullfrog for OSS) | 𝕏

@nwparker
nwparker merged commit 21f8e0f into main Sep 28, 2026
35 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.

1 participant