fix(updater): validate metadata with the real consumer#2031
Conversation
Create and clean a real userData directory for every upgrade-service test. Future marker writes can no longer fail behind the production error boundary. Document the release parser and package-export assumptions.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (7)
📝 WalkthroughWalkthroughThe release pipeline now parses generated updater YAML with ChangesUpdater metadata validation
Estimated code review effort: 3 (Moderate) | ~20 minutes Possibly related PRs
Suggested reviewers: Sequence Diagram(s)sequenceDiagram
participant ReleaseAssembly
participant MetadataFile
participant ElectronUpdater
participant UpgradeEvents
ReleaseAssembly->>MetadataFile: serialize quoted releaseDate YAML
ReleaseAssembly->>ElectronUpdater: parse generated YAML bytes
ElectronUpdater-->>ReleaseAssembly: return consumer metadata
ReleaseAssembly->>ReleaseAssembly: compare values and types
ReleaseAssembly->>UpgradeEvents: publish string releaseDate
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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 |
Summary
Follow up on #2025 by validating generated updater metadata with the same parser used by installed DeepChat clients.
The release pipeline previously serialized and validated
latest*.ymlwith theyamlpackage, whileelectron-updaterconsumes it throughjs-yaml. Valid YAML could therefore pass CI while producing different runtime value types.Changes
electron-updater's installedparseUpdateInfo()implementation.latest.ymllatest-mac.ymllatest-linux.ymllatest-linux-arm64.ymlreleaseDateis not a string before serialization.Datevalues at the runtime boundary.releaseDateis always a string.Summary by CodeRabbit
Bug Fixes
Documentation