Skip to content

batches: improve UX when src batch apply|preview is run on an unsupported instance #690

Closed

Description

@courier-new

Currently if you run src batch preview|apply on dotcom or another environment where batch changes is unsupported, it will fail on the version check when it tries to query batch changes and GraphQL returns an error. This is a bit hacky and could be cleaned up:

  • Expose a proper field like batchChangesEnabled from the GraphQL root query which can be queried in place of trying to access actual batch changes features, to save a trip to the DB.
    • Where does this live in the schema?
    • What if batch changes is only enabled for certain users?
    • What do we do for instances on an older version of Sourcegraph before this field was introduced?
  • Query this at the same time as the version, as currently, but handle it more elegantly, parsing and providing a nicer error message than just bubbling up the GraphQL wrapped error.
    • Can we point users to a marketing page here?
    • Does this need to happen for other src commands too?

Activity

  1. keegancsmith commented on Apr 8, 2026

    @keegancsmith
    Member

    @burmudar #1291 contains a fix which just specially handles the error. However, I do think its better to explicitly ask the graphql api if batch changes is enabled like mentioned in the issue description.

  2. linear commented on Apr 8, 2026

    @linear

    from william.bezuidenhout:

    Nice! I think we might need that to be the fallback when not talking to a recent Sourcegraph version

  3. burmudar commented on Jul 1, 2026

    @burmudar
    Contributor

    Closing this issue as part of repository maintenance. We are no longer using GitHub issues to track src-cli requests or reports. For future questions or support requests, please contact Sourcegraph Support (mailto:support@sourcegraph.com).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions