-
Notifications
You must be signed in to change notification settings - Fork 70
Remove src-cli workspace resolution #819
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
| repos, _, err := svc.ResolveRepositoriesOn(ctx, &on) | ||
| if err != nil { | ||
| return errors.Wrapf(err, "Resolving %q", on.String()) | ||
| _, repos, err := svc.ResolveWorkspacesForBatchSpec(ctx, spec, allowUnsupported, allowIgnored) |
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.
As discussed, this doesn't show the individual queries anymore. A follow-up will deprecate this command and create a new workspaces command as a replacement, that has a more elaborate output, and also properly supports workspaces as a native feature.
This is available as a faster API from the backend now, so no need to keep this duplicative, slower code. This is a 4.0 deprecation execution.
6af22f2 to
34f8f9f
Compare
courier-new
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.
YAY SO MANY DELETIONS!! 🎉
Co-authored-by: Kelli Rockwell <[email protected]>
This is available as a faster API from the backend now, so no need to keep this duplicative, slower code. This is a 4.0 deprecation execution.
This bumps sourcegraph/sourcegraph/lib to pull in the latest changes from https://github.com/sourcegraph/sourcegraph/pull/63613 to support the new `version` field for batch specs. Notes: - To resolve repos, batches calls the GraphQL endpoint `resolveWorkspacesForBatchSpec`, which takes the serialized spec. This means all the logic to resolve repos is outsourced to Sourcegraph. This is great news for this PR because we don't have to worry how `on.RepositoriesMatchingQuery` is interpreted. The code path in which src-cli itself resolves the workspaces was removed in #819. ### Test plan - New unit tests - Manual testing. I tested the following workflow - `src batch new -f test.spec.yaml` (-> spec contains `version: 2`) - `src batch apply -f test.spec.yaml` (-> validation passes, batch spec shows up in Sourcegraph db) - `src batch validate -f test.spec.yaml` (-> validation passes or fails if I change the version to an unsupported value) - `src batch repos -f test.spec.yaml` (-> checked that returned repos match with expected pattern type) Closes SPLF-126
This is available as a faster API from the backend now, so no need to keep this duplicative, slower code. This is a 4.0 deprecation execution.
Comes with https://github.com/sourcegraph/sourcegraph/pull/40426.
Closes https://github.com/sourcegraph/sourcegraph/issues/38968.
Test plan
Verified execution still works.