Remove src-cli workspace resolution#819
Merged
Merged
Conversation
eseliger
commented
Aug 16, 2022
| 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) |
Member
Author
There was a problem hiding this comment.
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
approved these changes
Aug 23, 2022
courier-new
left a comment
Contributor
There was a problem hiding this comment.
YAY SO MANY DELETIONS!! 🎉
Piszmog
approved these changes
Aug 23, 2022
Co-authored-by: Kelli Rockwell <kelli@sourcegraph.com>
scjohns
pushed a commit
that referenced
this pull request
Apr 24, 2023
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.
stefanhengl
added a commit
that referenced
this pull request
Jul 10, 2024
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 file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.