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: improve UX when src batch apply|preview is run on an unsupported instance #690

Open
courier-new opened this issue Feb 2, 2022 · 0 comments

Comments

@courier-new
Copy link
Contributor

courier-new commented Feb 2, 2022

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?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant