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

batches: fail earlier on dotcom #688

Merged
merged 6 commits into from
Feb 3, 2022
Merged

batches: fail earlier on dotcom #688

merged 6 commits into from
Feb 3, 2022

Conversation

courier-new
Copy link
Contributor

@courier-new courier-new commented Feb 1, 2022

This PR is in response to https://github.com/sourcegraph/sourcegraph/issues/28252 and does two things:

  • Lessens the arbitrarily large default count applied to the batch spec repositoriesMatchingQuery from 999999 to 99999, which is less likely to cause timeouts. Decided not to proceed with this change since we haven't heard of actual enterprise customers running into timeouts yet and this is expected to become a non-issue once we actually use count: all.
  • Requests BC-specific information from the version GraphQL query so that it produces an error on dotcom or in an environment where batch changes is not available. This has the effect that src preview|apply will fail right away on the first thing it does, which is the version check, as opposed to much later after execution finishes and we go to upload changesets:
failed to query Sourcegraph version to check for available features: GraphQL errors: 1 error occurred:
   	* {
     "message": "access to batch changes on Sourcegraph.com is currently not available",
     "path": [
       "batchChanges"
     ]
   }

@courier-new courier-new requested a review from a team February 1, 2022 06:28
@courier-new courier-new self-assigned this Feb 1, 2022
Copy link
Member

@eseliger eseliger left a comment

Choose a reason for hiding this comment

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

LGTM pending we don't change the count thingy

internal/batches/service/service.go Outdated Show resolved Hide resolved
internal/batches/service/service.go Outdated Show resolved Hide resolved
Copy link
Contributor

@LawnGnome LawnGnome left a comment

Choose a reason for hiding this comment

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

This needs a changelog entry, but otherwise LGTM modulo the things Erik also said.

internal/batches/service/service.go Outdated Show resolved Hide resolved
@courier-new
Copy link
Contributor Author

Omg I'm so out of practice with CHANGELOG because we never log anything for SSBC since it's all experimental. 😂 Thanks for the reminder, Adam.

@courier-new courier-new merged commit 1a868b7 into main Feb 3, 2022
@courier-new courier-new deleted the kr/fail-earlier-dotcom branch February 3, 2022 16:14
scjohns pushed a commit that referenced this pull request Apr 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants