-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Code Intelligence: Update configuration policy UI #47416
Conversation
Bundle size report 📦
Look at the Statoscope report for a full comparison between the commits dc1da00 and e2ede87 or learn more. Open explanation
|
| // Policy isn't targeted at a specific repository | ||
| !policy.repository && | ||
| // Policy does not have a targeted repository pattern. | ||
| // TODO(#47432): This is flaky as repoPatterns can match all repositories (e.g. '*'). We should return a flag that indicates if this has happened. |
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.
👍
plan to address this issue before EoW
|
Just to chat about future directions:
Note that the "protected" policies are hard-coded into the instance, so there will only ever be a handful (right now three, and there's no pressure to add another default). Is that your looking for here just a "protected/non-protected" filter on the GraphQL endpoint to fetch all related policies?
If we ask for all bracnhes on a large monorepo (matching '*' for instance) do we expect to have some text like "See all 12384791874 tags" and expect to render them all? Do we want to add some kind of upper bound here on either the frontend (if over some threshold render a non-actionable link) or backend (maximum allowable return set size)? |
That's right. There isn't a nice way to filter these out on the client as it requires fetching the entire list (we also currently paginate and allow filtering, so gets weird). It'd be ideal if we had a simple GQL variable to filter against protected/non-protected policies.
Good point. I have set 1000 as a limit for both repositories and git branches/tags. That feels reasonable enough to me as something which should cover most use cases without leading to users accidentally triggering a huge query. LMK if you disagree |
|
Codenotify: Notifying subscribers in CODENOTIFY files for diff e2ede87...dc1da00.
|
Updates the code intel configuration policy with various changes and improvements.
Closes https://github.com/sourcegraph/sourcegraph/issues/47111
Related designs
What this PR does do
This PR has quite a lot of small changes that don't make sense to split into different PRs but equally are hard to infer from the diff in a single PR. Here is my log of what has changed (aside from just general fixes and improvements):
What this PR does not do
Some screenshots
Test plan
Tested locally
App preview:
Check out the client app preview documentation to learn more.