Repository navigation
Conversation
Collaborator
|
Hi @Metastarx. Thanks for your PR. I'm waiting for a OpenAtom-Linyaps member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
The already-migrated check built its lookup key with std::string::append on a single shared buffer. append mutates its receiver and returns it, so the repository prefix accumulated one ref per loop iteration and every lookup after the first used a key that can never exist. Such a ref was migrated a second time, and ostree_repo_transaction_set_ref pointed the prefixed ref at the stale legacy commit, overwriting the commit and the layer symlink that were already there. Version::operator< also evaluated minor and patch even when a more significant component already differed, so 2.0.0 compared less than 1.7.0. The 1.7.0 gate in dispatchMigrations relies on this being a real ordering, otherwise a repository newer than 1.7.0 could re-run the legacy migration. Signed-off-by: zhang hongyuan <100520587+Metastarx@users.noreply.github.com>
The license check requires the year range to span the last modification, so a file created in 2024 and touched in 2026 has to read 2024-2026. This is the only file the check flagged on this branch; the new test file already carries 2026. Signed-off-by: zhang hongyuan <100520587+Metastarx@users.noreply.github.com>
Metastarx
force-pushed
the
patch/libs-linglong-src-linglong-repo-migrate-
branch
from
October 12, 2026 08:52
2aa4ebb to
bb5d925
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The legacy ref migration in
libs/linglong/src/linglong/repo/migrate.cppcould corrupt already-migrated refs. The dedup step appended each legacy ref onto one shared prefix string, and becausestd::string::appendmutates its receiver, every lookup after the first used a key that could never exist; refs whosestable:counterpart was already present were migrated again and the existing commits (and their layer symlinks) were overwritten. The same file's version comparison was not lexicographic either, so2.0.0sorted below1.7.0and a repository newer than 1.7.0 could re-run the legacy migration. I rebuilt the lookup key from a fresh, const prefix on every iteration and replaced the comparison with a component-by-component lexicographic order, then added regression tests for an all-prefixed repository, a partial migration, and a2.0.0version file that must skip the migration.Changes
Verification
ctest --test-dir build-release --output-on-failure- passed (100% tests passed, 0 tests failed out of 738)Checklist