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

add experimental site config setting to restrict cody to users by the cody-experimental feature flag#50668

Merged
beyang merged 2 commits into
mainfrom
bl/whitelist-users
Apr 14, 2023
Merged

add experimental site config setting to restrict cody to users by the cody-experimental feature flag#50668
beyang merged 2 commits into
mainfrom
bl/whitelist-users

Conversation

@beyang

@beyang beyang commented Apr 14, 2023

Copy link
Copy Markdown
Member

Addresses https://github.com/sourcegraph/sourcegraph/issues/50632

To enable this, the Sourcegraph site admin must do the following:

  1. Set "codyRestrictUsersFeatureFlag": true in site config under "experimentalFeatures".
  2. Create a feature flag called cody-experimental through https://$SOURCEGRAPH_HOST/site-admin/feature-flags
  3. Set the default value of the feature flag to false and then add overrides to true for specific users, as we do on sourcegraph.com

The feature flag must be called exactly "cody-experimental."

Test plan

Affects only Cody (experimental). Tested locally.

@cla-bot cla-bot Bot added the cla-signed label Apr 14, 2023
@beyang beyang force-pushed the bl/whitelist-users branch from 35160a8 to 0e139d1 Compare April 14, 2023 22:16
@beyang beyang marked this pull request as ready for review April 14, 2023 22:20
@beyang beyang requested a review from a team April 14, 2023 22:23

@sqs sqs left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@beyang beyang enabled auto-merge (squash) April 14, 2023 22:27
@beyang beyang disabled auto-merge April 14, 2023 22:27
@beyang beyang enabled auto-merge (squash) April 14, 2023 22:29
@beyang beyang merged commit 0b460b4 into main Apr 14, 2023
@beyang beyang deleted the bl/whitelist-users branch April 14, 2023 22:42
@github-actions

Copy link
Copy Markdown
Contributor

The backport to 5.0 failed:

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.0 5.0
# Navigate to the new working tree
cd .worktrees/backport-5.0
# Create a new branch
git switch --create backport-50668-to-5.0
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 0b460b4b5738617c34fcb2e4be103c55ac8bd69a
# Push it to GitHub
git push --set-upstream origin backport-50668-to-5.0
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-5.0

Then, create a pull request where the base branch is 5.0 and the compare/head branch is backport-50668-to-5.0.

@github-actions github-actions Bot added backports failed-backport-to-5.0 release-blocker Prevents us from releasing: https://about.sourcegraph.com/handbook/engineering/releases labels Apr 17, 2023
eseliger pushed a commit that referenced this pull request Apr 17, 2023
…mental" feature flag (#50668)

Addresses https://github.com/sourcegraph/sourcegraph/issues/50632

To enable this, the Sourcegraph site admin must do the following:
1. Set `"codyRestrictUsersFeatureFlag": true` in site config under
`"experimentalFeatures"`.
2. Create a feature flag called `cody-experimental` through
https://$SOURCEGRAPH_HOST/site-admin/feature-flags
3. Set the default value of the feature flag to `false` and then add
overrides to `true` for specific users, as we do on sourcegraph.com

(cherry picked from commit 0b460b4)
@eseliger eseliger mentioned this pull request Apr 17, 2023
coury-clark pushed a commit that referenced this pull request Apr 17, 2023
This backports both 
- #49920
- #50668 

to 5.0. The former is cherry picked to reduce merge conflicts and make
potential future cherry picks a bit easier.
I also had to backport adding a bazelignore entry for `client/cody`
because I couldn't update the build files on this branch anymore. There
seems to have been a few misses in buildfile updates so this PR is
unfortunately quite noisy.

## Test plan

CI and code review.

---------

Co-authored-by: Rok Novosel <rok@sourcegraph.com>
Co-authored-by: Beyang Liu <beyang@sourcegraph.com>
@eseliger eseliger removed the release-blocker Prevents us from releasing: https://about.sourcegraph.com/handbook/engineering/releases label Apr 17, 2023
camdencheek pushed a commit that referenced this pull request May 15, 2023
…mental" feature flag (#50668)

Addresses https://github.com/sourcegraph/sourcegraph/issues/50632

To enable this, the Sourcegraph site admin must do the following:
1. Set `"codyRestrictUsersFeatureFlag": true` in site config under
`"experimentalFeatures"`.
2. Create a feature flag called `cody-experimental` through
https://$SOURCEGRAPH_HOST/site-admin/feature-flags
3. Set the default value of the feature flag to `false` and then add
overrides to `true` for specific users, as we do on sourcegraph.com

(cherry picked from commit 0b460b4)
camdencheek pushed a commit that referenced this pull request May 16, 2023
…mental" feature flag (#50668)

Addresses https://github.com/sourcegraph/sourcegraph/issues/50632

To enable this, the Sourcegraph site admin must do the following:
1. Set `"codyRestrictUsersFeatureFlag": true` in site config under
`"experimentalFeatures"`.
2. Create a feature flag called `cody-experimental` through
https://$SOURCEGRAPH_HOST/site-admin/feature-flags
3. Set the default value of the feature flag to `false` and then add
overrides to `true` for specific users, as we do on sourcegraph.com

(cherry picked from commit 0b460b4)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants