Skip to content

batches: fail earlier on dotcom

Erik Seliger requested to merge kr/fail-earlier-dotcom into main

Created by: courier-new

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"
     ]
   }

Merge request reports

Loading