Skip to content
This repository was archived by the owner on Sep 30, 2024. It is now read-only.

sec: Make GraphQL cost limits configurable#58346

Merged
evict merged 9 commits into
mainfrom
vincent/graphql-cost-config
Nov 15, 2023
Merged

sec: Make GraphQL cost limits configurable#58346
evict merged 9 commits into
mainfrom
vincent/graphql-cost-config

Conversation

@evict

@evict evict commented Nov 15, 2023

Copy link
Copy Markdown
Contributor

This makes it easier for customer site-admin to change the GraphQL limits. It adds a RateLimits function to fetch the structure and makes sure we have default values.

Test plan

CI tests, test locally.

@evict evict requested review from a team and eseliger November 15, 2023 17:30
@evict evict self-assigned this Nov 15, 2023
@cla-bot cla-bot Bot added the cla-signed label Nov 15, 2023
@sourcegraph-bot

sourcegraph-bot commented Nov 15, 2023

Copy link
Copy Markdown
Contributor

Codenotify: Notifying subscribers in CODENOTIFY files for diff cb88204...633a35f.

Notify File(s)
@keegancsmith cmd/frontend/graphqlbackend/search_test.go

@evict evict force-pushed the vincent/graphql-cost-config branch from 75471b8 to 4e3b22f Compare November 15, 2023 17:33
Comment thread schema/site.schema.json Outdated
Comment thread internal/conf/computed.go Outdated
Comment thread cmd/frontend/graphqlbackend/graphqlbackend.go Outdated
@evict evict requested a review from eseliger November 15, 2023 17:58
@evict evict force-pushed the vincent/graphql-cost-config branch from eaac4d6 to ba71eeb Compare November 15, 2023 17:58
@evict evict enabled auto-merge (squash) November 15, 2023 18:10
@evict evict added the release-blocker Prevents us from releasing: https://about.sourcegraph.com/handbook/engineering/releases label Nov 15, 2023
@evict evict disabled auto-merge November 15, 2023 19:08
@evict evict force-pushed the vincent/graphql-cost-config branch from 7badae0 to 87b0ad3 Compare November 15, 2023 19:39
@evict evict enabled auto-merge (squash) November 15, 2023 19:40
@evict evict merged commit 8ac56ca into main Nov 15, 2023
@evict evict deleted the vincent/graphql-cost-config branch November 15, 2023 20:18
@sourcegraph-release-bot

Copy link
Copy Markdown
Collaborator

The backport to 5.2 failed at https://github.com/sourcegraph/sourcegraph/actions/runs/6882470325:

The process '/usr/bin/git' failed with exit code 1

To backport manually, run these commands in your terminal:

# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-5.2 5.2
# Navigate to the new working tree
cd .worktrees/backport-5.2
# Create a new branch
git switch --create backport-58346-to-5.2
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 8ac56cacf3ecf6c4ca5f706265edae8d85a7145a
# Push it to GitHub
git push --set-upstream origin backport-58346-to-5.2
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-5.2

If you encouter conflict, first resolve the conflict and stage all files, then run the commands below:

git cherry-pick --continue
# Push it to GitHub
git push --set-upstream origin backport-58346-to-5.2
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-5.2
  • Follow above instructions to backport the commit.
  • Create a pull request where the base branch is 5.2 and the compare/head branch is backport-58346-to-5.2., click here to create the pull request.
  • Make sure to tag @sourcegraph/release-guild in the pull request description.
  • Once the backport pull request is created, kindly remove the release-blocker from this pull request.

evict added a commit that referenced this pull request Nov 15, 2023
* add ratelimit configuration to site-admin

(cherry picked from commit 8ac56ca)
evict added a commit that referenced this pull request Nov 15, 2023
* add ratelimit configuration to site-admin

(cherry picked from commit 8ac56ca)
mohammadualam pushed a commit that referenced this pull request Nov 15, 2023
sec: Make GraphQL cost limits configurable (#58346)

* add ratelimit configuration to site-admin

(cherry picked from commit 8ac56ca)
vovakulikov pushed a commit that referenced this pull request Dec 12, 2023
* add ratelimit configuration to site-admin
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

backport 5.2 backports cla-signed failed-backport-to-5.2 release-blocker Prevents us from releasing: https://about.sourcegraph.com/handbook/engineering/releases

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants