-
Notifications
You must be signed in to change notification settings - Fork 87
batches: document new version field #477
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
Conversation
This adds documentation for the new batch spec version. Relates to https://github.com/sourcegraph/sourcegraph/pull/63613
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
|
@stefanhengl content looks good. Are we ready to merge this to working branch? |
I am waiting for https://github.com/sourcegraph/sourcegraph/pull/63613 to merge. It shouldn't take much longer |
This is part of the Keyword GA Project. Batch Changes uses Sourcegraph queries to define the list of repositories on which the batch change will run. With this change we default to pattern type "keyword" instead of "standard". To make this a backward compatible change, we also introduce a version identifier to batch specs. Authors can specify `version: 2` in the spec, in which case we default to pattern type "keyword". Existing specs (without a specified version) and specs with `version: 1` will keep using pattern type "standard". Notes: - Corresponding doc update [PR](sourcegraph/docs#477) - We don't have a query input field, but instead the query is defined in a batch spec YAML. It didn't feel right to edit the YAML and append "patternType: " on save, which is what we do for Code Monitors and Insights. - I misuse the pattern type query parameter to effectively override the version. Once we introduce "V4" we should come back here and clean up. I left a TODO in the code. Test plan: - New and updated unit tests - manual testing - new batch changes use `version: 2` by default. - using an unsupported version returns an error - I ran various "on:" queries to verify that version 2 uses keyword search and version 1 uses standard search.
jtibshirani
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me! Left a small suggestion.
|
|
||
| ### Version 1 | ||
|
|
||
| default |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I find this a bit confusing, because we actually want users to consider Version 2 the default choice. Maybe we could say "The schema version before Sourcegraph version 5.5. For now, if no version is specified, batch changes will use this schema version. It is recommended to switch to version 2."
This adds documentation for the new batch spec version.
Relates to https://github.com/sourcegraph/sourcegraph/pull/63613
Closes SPLF-130