8000 fix: do not warn on valid known experiments by johnstcn · Pull Request #18514 · coder/coder · GitHub
[go: up one dir, main page]

Skip to content

fix: do not warn on valid known experiments #18514

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 3 commits into from
Jun 24, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading 8000
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
coderd: rename handler to match route and semantics
  • Loading branch information
johnstcn committed Jun 23, 2025
commit 38d9e77aa0fa99c78d4993b932512ba2f403f60d
2 changes: 1 addition & 1 deletion coderd/coderd.go
Original file line number Diff line number Diff line change
Expand Up @@ -972,7 +972,7 @@ func New(options *Options) *API {
})
r.Route("/experiments", func(r chi.Router) {
r.Use(apiKeyMiddleware)
r.Get("/available", handleExperimentsSafe)
r.Get("/available", handleExperimentsAvailable)
Copy link
Member

Choose a reason for hiding this comment

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

Kinda unfortunate we have /available that returns only the safe experiments. Ideally there would be a /available and /safe. Or just have /available return a map[string]bool where the bool is true for safe or something.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah I considered also returning all available experiments here but elected to keep the scope of this PR small.

r.Get("/", api.handleExperimentsGet)
})
r.Get("/updatecheck", api.updateCheck)
Expand Down
2 changes: 1 addition & 1 deletion coderd/experiments.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ func (api *API) handleExperimentsGet(rw http.ResponseWriter, r *http.Request) {
// @Tags General
// @Success 200 {array} codersdk.Experiment
// @Router /experiments/available [get]
func handleExperimentsSafe(rw http.ResponseWriter, r *http.Request) {
func handleExperimentsAvailable(rw http.ResponseWriter, r *http.Request) {
ctx := r.Context()
httpapi.Write(ctx, rw, http.StatusOK, codersdk.AvailableExperiments{
Safe: codersdk.ExperimentsSafe,
Expand Down
0