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

archive: re-use shard cache in e2e rank tests #697

Closed
wants to merge 1 commit into from

Conversation

keegancsmith
Copy link
Member

Indexing the sourcegraph repo takes a couple of seconds on my laptop. Most changes we make do not change the structure of the shard. This commit introduces a default behaviour of reusing shards between go test invocations. If on CI it will always recompute. This way if we accidently think everything is alright locally it will get caught on CI.

Test Plan: CI

Based on #695

Indexing the sourcegraph repo takes a couple of seconds on my laptop.
Most changes we make do not change the structure of the shard. This
commit introduces a default behaviour of reusing shards between go test
invocations. If on CI it will always recompute. This way if we
accidently think everything is alright locally it will get caught on CI.

Test Plan: CI
Copy link
Member

@jtibshirani jtibshirani left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's always nice to cut down on test state, and have local tests match CI as closely as possible 🤔 I could see a newcomer to Zoekt scratching their heads over why a particular test passes locally but not in CI!

Would it make sense to default to no shard cache, then you could pass a flag shard_cache to speed up local testing? Or brainstorming a different approach: mark certain tests as "slow tests" and don't run them locally by default, unless a "include_slow" flag is passed?

@keegancsmith
Copy link
Member Author

It's always nice to cut down on test state, and have local tests match CI as closely as possible 🤔 I could see a newcomer to Zoekt scratching their heads over why a particular test passes locally but not in CI!

Yeah you are right, probably better to just be slow :)

Would it make sense to default to no shard cache, then you could pass a flag shard_cache to speed up local testing? Or brainstorming a different approach: mark certain tests as "slow tests" and don't run them locally by default, unless a "include_slow" flag is passed?

There is the flag go test -short which is meant to skip slower tests. What I will do is abandon this PR and instead just skip the test if -short is specified.

@keegancsmith keegancsmith deleted the k/integration-faster branch November 16, 2023 08:16
@keegancsmith keegancsmith restored the k/integration-faster branch January 11, 2024 05:26
@keegancsmith keegancsmith deleted the k/integration-faster branch January 11, 2024 05:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants