-
Notifications
You must be signed in to change notification settings - Fork 889
feat: add --experiments flag #5767
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
Merged
Merged
Changes from 15 commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
76c7b91
feat: support multiple values for --experimental
johnstcn 626d81b
develop.sh: allow passing additional args to backend API via -- arg1=…
johnstcn d93a373
fix swaggerparser test
johnstcn e82c306
make fmt
johnstcn 047771c
require AuthN on /api/v2/experiments
johnstcn 3ba27ea
fixup! require AuthN on /api/v2/experiments
johnstcn 3ebb778
fix nits
johnstcn 2aeb93e
add type alias for codersdk.Experiment
johnstcn 53d92d7
make it clear that Entitlements.Experimental is deprecated
johnstcn ef0cbc3
remove unnecessary types as they are now autogenerated
johnstcn 8fdb21b
apply suggestions from code review
johnstcn 0cb9a6a
fixup! apply suggestions from code review
johnstcn 44e9638
warn about dragons
johnstcn 6c32aa5
fix apidoc type
johnstcn 1cbaaf7
codersdk.Experiments no longer needs be flaggable or special-cased in…
johnstcn 67d07f3
lower-case when ingesting and comparing experiments
johnstcn 196b263
update apitypings unit tests
johnstcn File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package coderd | ||
|
||
import ( | ||
"net/http" | ||
|
||
"github.com/coder/coder/coderd/httpapi" | ||
) | ||
|
||
// @Summary Get experiments | ||
// @ID get-experiments | ||
// @Security CoderSessionToken | ||
// @Produce json | ||
// @Tags General | ||
// @Success 200 {array} codersdk.Experiment | ||
// @Router /experiments [get] | ||
func (api *API) handleExperimentsGet(rw http.ResponseWriter, r *http.Request) { | ||
ctx := r.Context() | ||
httpapi.Write(ctx, rw, http.StatusOK, api.Experiments) | ||
} |
Oops, something went wrong.
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.
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.
Should print a deprecation notice at the top of server.go. Or we could implement it as a "Deprecated string" on DeploymentConfigField
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.
It's hidden. So it should not matter right?
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.
Well to notify old deployments that still have the variable set that they need to unset it or it won't work soon
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.
I mean printing a notice if the flag or env var is present
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.
warning gets printed in
initExperiments
at the bottom ofcoderd.go
; folks may or may not be looking for it though