-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bazaar: Export directly from the remote branch. #6139
Conversation
@cjerdonek This is the "bzr export" performance improvement split out from #5445 as discussed in that pull request. |
a2d3e4d
to
5b4bbe8
Compare
The failures on the other platforms are because "bzr" is not available there. |
You should decorate the method with need_bzr from |
5b4bbe8
to
0fe7776
Compare
@jelmer Can you confirm if the test you added is running and passing anywhere in CI? When the test was failing, I saw it failing on Windows, macOS, and Linux, which is all of the platforms. It is probably worth exploring how easy it would be to install bzr in at least, say, the Linux testing environment. |
IIRC, None of our CI have |
0fe7776
to
68d2c24
Compare
This significantly improves performance, since it allows the remote server to directly stream a tarball that just contains the requested revision rather than the full repository contents.
68d2c24
to
eb7d4b2
Compare
On Sun, Jan 20, 2019 at 05:58:53AM -0800, Pradyun Gedam wrote:
> Can you confirm if the test you added is running and passing anywhere in CI?
IIRC, None of our CI have `bzr`. 🔥
I've updated the travis config to install bzr.
…--
Jelmer Vernooij <[email protected]>
PGP Key: https://www.jelmer.uk/D729A457.asc
|
@pradyunsg Is there or do we have a standard way (e.g. environment variable) to tell whether the tests are being run under Travis? I think there should be a test of the form "if Travis is running, than |
https://docs.travis-ci.com/user/environment-variables/#default-environment-variables Yes. See also #6059 which had to detect being run on Travis CI to skip hg tests (since hg was broken on Travis). I suggest having a separate PR for installing (and a test for ensuring) bzr is installed on Travis. |
Could that be deferred to later? There have been several changes to the bazaar.py file over the last year (when I first proposed this change). This change is at least adding a first test for the Bazaar export support that runs on travis. |
I think it's important for the tests being added to actually run in CI (and for us to be able to know they're being run) before the code is changed in a substantive way. The changes before were refactors that preserved the logic and didn't e.g. change any command invocations. The new test I'm talking about to check that it's running would just be a few lines using existing code. I would be okay with it being in the same or a separate PR given how small it is. |
Trivial change added to verify that bzr is available when running under travis. Please let me know if this is the best place (tests/lib/init.py houses need_bzr, so test_lib.py seemed like the best choice). |
bc95c7a
to
73d355f
Compare
Here is what I would recommend doing:
|
73d355f
to
69d19d5
Compare
On Tue, Jan 22, 2019 at 12:29:11AM -0800, Chris Jerdonek wrote:
Here is what I would recommend doing:
1. Add `is_bzr_installed()` just before `need_bzr()` since the code is almost identical. (These two functions should really be calling the same underlying function, or `need_bzr()` should be calling `is_bzr_installed()`. But you don't have to do this now.)
2. At the beginning of `test_vcs_bazaar.py`, add `test_is_bzr_installed()` and decorate it with ***@***.***(<travis not running>)`](https://docs.pytest.org/en/latest/skipping.html#id1).
Thanks! I've made the changes you suggested.
…--
Jelmer Vernooij <[email protected]>
PGP Key: https://www.jelmer.uk/D729A457.asc
|
Thanks, @jelmer. But read (2) a little more closely. I was saying to add the Travis test to the beginning of |
4d20f9f
to
b91b08e
Compare
Done. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking a lot better -- thanks! Some tiny comments, and a bigger comment.
abb2e81
to
03d5626
Compare
03d5626
to
e4ce22f
Compare
@cjerdonek all done |
Okay, thanks. I'll take another look after the release issues settle down. |
Thanks, @jelmer, for your work on this and for your patience! |
Thanks for the reviews and merging, @cjerdonek ! |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Bazaar: Export directly from the remote branch.
This significantly improves performance, since it allows the remote
server to directly stream a tarball that just contains the requested
revision rather than the full repository contents.