Merge ~racb/usd-importer:escape-git into usd-importer:master
| Status: | Merged | ||||
|---|---|---|---|---|---|
| Approved by: | Robie Basak on 2017-11-22 | ||||
| Approved revision: | 7e790171db4b8e3682a1734080fd0457c5b8168e | ||||
| Merged at revision: | 7e790171db4b8e3682a1734080fd0457c5b8168e | ||||
| Proposed branch: | ~racb/usd-importer:escape-git | ||||
| Merge into: | usd-importer:master | ||||
| Diff against target: |
691 lines (+554/-14) 4 files modified
gitubuntu/git_repository.py (+256/-3) gitubuntu/importer.py (+1/-1) gitubuntu/source_information.py (+5/-2) gitubuntu/test_git_repository.py (+292/-8) |
||||
| Related bugs: |
|
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| Andreas Hasenack (community) | Approve on 2017-11-22 | ||
| Server Team CI bot | continuous-integration | Approve on 2017-11-21 | |
| Ubuntu Server Dev import team | 2017-11-17 | Pending | |
|
Review via email:
|
|||
Commit Message
Make Jenkins happy
| Nish Aravamudan (nacc) wrote : | # |
| Nish Aravamudan (nacc) wrote : | # |
Looks really nice overall, just a few minor comments.
I think your commit message is also missinng a bug referencne.
| Robie Basak (racb) wrote : | # |
I've addressed all review comments so far. I've tested that origin/master fails with elinks, and that this branch succeeds with elinks with the escaping as expected.
| Robie Basak (racb) wrote : | # |
To address the setup.py issue, I dropped the dependency of py.path in runtime (as opposed to test time) code. The tests still use py.path, but I don't think this should be an issue as we already depend on py.test to run the tests and py.test depends on py.path already.
| Robie Basak (racb) wrote : | # |
https:/
FAILED: Continuous integration, rev:fd857cd3f46
https:/
Executed test runs:
SUCCESS: Checkout
FAILED: Style Check
Click here to trigger a rebuild:
https:/
FAILED: Continuous integration, rev:8b89a94183a
https:/
Executed test runs:
SUCCESS: Checkout
SUCCESS: Style Check
FAILED: Unit Tests
Click here to trigger a rebuild:
https:/
PASSED: Continuous integration, rev:7e790171db4
https:/
Executed test runs:
SUCCESS: Checkout
SUCCESS: Style Check
SUCCESS: Unit Tests
SUCCESS: Integration Tests
IN_PROGRESS: Declarative: Post Actions
Click here to trigger a rebuild:
https:/
| Andreas Hasenack (ahasenack) wrote : | # |
I see we set self._lp_user (notice the starting underscore) to either None or the correct value.
Later one we check if self._lp_user is None and then raise an exception, which is fine. But we subsequently use self.lp_user (no starting underscore).
This pattern happens in several places. Here is an example:
def fetch_lpuser_
if not self._fetch_proto:
raise Exception('Cannot fetch using an object without a protocol')
if not self._lp_user:
raise RuntimeError(
Unless I'm missing something, self.lp_user does not exist. I'll highlight this in the diff below where I see it.
| Andreas Hasenack (ahasenack) wrote : | # |
Ah, ignore that comment. I see the def lp_user() @property now.
| Andreas Hasenack (ahasenack) wrote : | # |
Continuing the review. Looks like I cannot change a N/F review to just a comment.
| Andreas Hasenack (ahasenack) wrote : | # |
I reviewed up to 54c9b42 (add .git escaping functions). I see the Fake class there, used in some tests. Isn't it a bit risky to have basically two separate implementations
To be continued
| Robie Basak (racb) wrote : | # |
On Tue, Nov 21, 2017 at 07:32:06PM -0000, Andreas Hasenack wrote:
> I reviewed up to 54c9b42 (add .git escaping functions). I see the Fake class there, used in some tests. Isn't it a bit risky to have basically two separate implementations
It's unit testing. I'm testing that _escape_
right thing independently of RenameableDir. This makes it easier to test
all the different variations. But also, I have unit tests that check all
behaviour on both RenameableDir and FakeRenamableDir are correct.
Separately, elsewhere I expect to test everything integrated. For
example test_git_
end-to-end with a real RenameableDir.
| Andreas Hasenack (ahasenack) wrote : | # |
I wanted to do an import of one of the problematic packages (elinks or lockfile-progs) and then try to build the source package with git ubuntu build-source, to see if the .git directory would be in there after all these manipulations, but that doesn't work yet:
- the import needs to be "for real", and not just local (aka, no --no-push)
- the build.* steps do not unescape yet (need a bug for that)
So I'll do that sometime later, or after these packages were imported for real.
Other than that, thanks a lot for the super detailed docstrings and tests, they were instrumental in verifying what the code was doing.
+1, let's land this

As mentioned in HO, this will need some setup.py changes in order to specify py.path as a dependency at runtime, or the snap will break. I think that would get caught by CI as `git ubuntu <...>` will probably fail to run.