Importer processes supposedly incremental imports from the beginning of time
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
git-ubuntu |
Fix Released
|
High
|
Robie Basak |
Bug Description
I'm not sure if it's happening in all cases, but for example "git ubuntu import -v hello --no-push" shows it starting by processing 2.1.1-4. Instead, I expect it to start from somewhere fairly recent, such as a version packaged in the current Debian or Ubuntu series or similar.
Root cause: the code that determines the start point is failing to match against the current branch heads because it uses date_published instead of date_created.
This was previously discussed here: https:/
Summary: date_published isn't really relevant to us, and it's possible that it is never populated in some edge cases. In particular, "published" in this sense isn't what git-ubuntu means by published. git-ubuntu wants the timestamp of the point when Launchpad first makes it visible to us via the API. date_published for Launchpad means when its "publisher" ran, which is related to making the package appear in an apt suite. The latter isn't relevant to git-ubuntu. So date_created is what we should use in all cases.
We already use date_created for the timestamp of the git commit that we create when we import a Launchpad source publication. So when we determine the start point, we need to match against date_created also.
Related branches
- Bryce Harrington: Approve
- Server Team CI bot: Approve (continuous-integration)
- Canonical Server Reporter: Pending requested
- Canonical Server Reporter: Pending requested
- Canonical Server Reporter: Pending requested
- Canonical Server: Pending requested
-
Diff: 895 lines (+425/-150)6 files modifiedgitubuntu/git_repository.py (+39/-16)
gitubuntu/git_repository_test.py (+29/-0)
gitubuntu/importer.py (+39/-45)
gitubuntu/importer_test.py (+26/-18)
gitubuntu/source_information.py (+66/-69)
gitubuntu/source_information_test.py (+226/-2)
Fixed in 1.1.