Repository navigation
Commit cedb4bd
committed
fix(import): land and serve ImportRepo objects under the configured kind
FIX-MTR-17. ImportRepo's pack build, attach mount and code-tree paths converted
git-db rows with the thread-local FromGitModel helpers, so a SHA-256 import repo
either panicked or produced ids of the wrong algorithm: the first push never
landed and a clone ended in "early EOF / unpack-objects failed".
New in jupiter::utils::converter: fallible commit_from_git_model_with_kind,
tree_from_git_model_with_kind and tag_from_git_model_with_kind. Every
production site now uses them with RepoHandler::object_hash_kind():
- incremental_pack: want commits, walked parents, want trees and the have-tree
traversal, with database reads and a missing parent propagated instead of
unwrapped and a missing want tree reported explicitly;
- collect_objects (formerly process_objects): commits, trees, tags and blobs,
with blob ids hashed under the configured kind and every database stream
failure returned as an error;
- full_pack: the exact object list is materialized before the encoder is sized,
so a conversion failure fails the request instead of truncating the pack;
- collect_git_blob_filepaths (kind threaded through its recursion and callers)
and collect_code_tree_objects;
- the attach path: import_leaf_in_txn / import_leaf_chain_in_txn, the imported
tip commit, the mounted root commit, the post-commit authorization reads,
tree_ops::search_and_create_tree and its .gitkeep placeholder.
Also: the refused-attach warning now logs the stored reason instead of leaving
it only in push_queue.error_message, and check_default_branch fails safe.
tests/integration_import_hash.rs drives real Docker Git against ImportRepo
paths: a SHA-256 RED target plus SHA-1 and SHA-256 matrices covering first
push, fast-forward update and a have-based fetch. It retries once on the
server's documented "retry the push" signal, because attach can outlive the
push-queue reaper's 2s started_at grace on a loaded host.
Verified: check --all-targets clean (0 warnings), nightly fmt clean,
integration_import_hash 5/5, import_hash_ 5/5, ceres::pack:: 190/190,
cargo nextest run --all 3133/3133 passed (3 pre-existing ignores), the VER-1
RED replay fails on the pre-fix tree, and the audit script passes. Independent
review returned VERDICT: PASS.
Version 0.42.86 -> 0.42.87 (patch; dependencies unchanged).
Signed-off-by: Eli Ma <eli@patch.sh>1 parent d0cdfea commit cedb4bd
6 files changed
Lines changed: 238 additions & 85 deletions
File tree
- docs/plan
- src
- ceres/pack
- jupiter
- service
- utils
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4546 | 4546 | | |
4547 | 4547 | | |
4548 | 4548 | | |
4549 | | - | |
| 4549 | + | |
| 4550 | + | |
| 4551 | + | |
| 4552 | + | |
| 4553 | + | |
| 4554 | + | |
| 4555 | + | |
4550 | 4556 | | |
4551 | 4557 | | |
4552 | 4558 | | |
| |||
4561 | 4567 | | |
4562 | 4568 | | |
4563 | 4569 | | |
4564 | | - | |
4565 | | - | |
4566 | | - | |
4567 | | - | |
4568 | | - | |
4569 | | - | |
4570 | | - | |
| 4570 | + | |
| 4571 | + | |
| 4572 | + | |
| 4573 | + | |
| 4574 | + | |
| 4575 | + | |
| 4576 | + | |
4571 | 4577 | | |
4572 | 4578 | | |
4573 | | - | |
4574 | | - | |
4575 | | - | |
4576 | | - | |
4577 | | - | |
| 4579 | + | |
| 4580 | + | |
| 4581 | + | |
| 4582 | + | |
| 4583 | + | |
4578 | 4584 | | |
4579 | 4585 | | |
4580 | 4586 | | |
| |||
0 commit comments