Skip to content
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

Support http caching for query #2780

Closed
abergmeier-dsfishlabs opened this issue Apr 4, 2017 · 9 comments
Closed

Support http caching for query #2780

abergmeier-dsfishlabs opened this issue Apr 4, 2017 · 9 comments
Assignees
Labels
P2 We'll consider working on this in future. (Assignee optional) type: bug

Comments

@abergmeier-dsfishlabs
Copy link
Contributor

Description of the problem / feature request / question:

Trying to pass experimental_repository_cache to bazel query complains that the option is not supported. This means that offline querying is not possible.

Environment info

  • Operating System: Ubuntu 16.04.2
  • Bazel version (output of bazel info release): 0.4.3

Have you found anything relevant by searching the web?

Nope

@abergmeier-dsfishlabs
Copy link
Contributor Author

Maybe it would be good to have a meta-issue so all options of build get supported for query, too. AFAIR there are more options not working for query.

@kchodorow
Copy link
Contributor

FWIW, --experimental_repository_cache only adds additional caching between bazel projects. Bazel caches external repositories regardless, it just doesn't share them between various workspaces on your machine.

@abergmeier-dsfishlabs
Copy link
Contributor Author

--experimental_repository_cache only adds additional caching between bazel projects. Bazel caches external repositories regardless, it just doesn't share them between various workspaces on your machine.

When I build with experimental_repository_cache and then query without, it tries to download the http_archive. This then breaks working offline.

@kchodorow
Copy link
Contributor

Hmm, that is a more serious bug. Definitely not intended.

@buchgr buchgr added P1 I'll work on this now. (Assignee required) type: bug labels Apr 10, 2017
@laszlocsomor
Copy link
Contributor

@abergmeier-dsfishlabs :

Maybe it would be good to have a meta-issue so all options of build get supported for query, too. AFAIR there are more options not working for query.

See #3054

@laszlocsomor
Copy link
Contributor

@kchodorow, @damienmg : Is this really P1? If so, let's find an assignee and milestone. If not, let's demote to P2 or P3.

@damienmg
Copy link
Contributor

Well I don't think this is a P1 until fixing repository caching becomes a P1 again... (IMO it should be but we have so many P1...)

@laszlocsomor laszlocsomor added P2 We'll consider working on this in future. (Assignee optional) and removed P1 I'll work on this now. (Assignee required) labels May 30, 2017
@laszlocsomor
Copy link
Contributor

Thanks! Dropped the priority.

we have so many P1

Yes, and as this week's sheriff I feel uncomfortable with that :)

@dslomov dslomov added external-repos-triaged P1 I'll work on this now. (Assignee required) and removed P2 We'll consider working on this in future. (Assignee optional) labels Jan 11, 2018
@aehlig
Copy link
Contributor

aehlig commented Jan 24, 2018

First remark: http_archive does enough caching so that bazel query works also offline for every repository that was accessed while being online (see https://bazel-review.googlesource.com/c/bazel/+/33750/). So we can probably change the priority.

Second: In fact, a quick test with the release candidate of 0.10.0 shows that --experimental_repository_chache is supported for bazel query and does the caching one expects. So, it seems someone already implemented that feature request without closing the issue. Will add a test to ensure it stays that way.

@aehlig aehlig added P2 We'll consider working on this in future. (Assignee optional) and removed P1 I'll work on this now. (Assignee required) labels Jan 24, 2018
bazel-io pushed a commit that referenced this issue Jan 24, 2018
Add a test verifying that http_archive from @bazel_tools caches
repositories, also for subsequent queries. Provides a workaround
for #2780.

Change-Id: Ie842c2abf47f42f75e146e454be4ab52efd12ada
PiperOrigin-RevId: 183063093
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P2 We'll consider working on this in future. (Assignee optional) type: bug
Projects
None yet
Development

No branches or pull requests

8 participants