Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

fix: merge cherry-picked items for v2.26.0#19678

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
stirby merged 15 commits intorelease/2.26fromcherry-26
Sep 2, 2025
Merged

Conversation

stirby
Copy link
Collaborator

@stirbystirby commentedSep 2, 2025
edited
Loading

johnstcnand others added15 commitsSeptember 2, 2025 18:02
…urce on stop transition (#19560)This works around the issue where a task may "disappear" on stop.Re-using the previous value of `has_ai_task` and `sidebar_app_id` on astop transition.---------Co-authored-by: Mathias Fredriksson <mafredri@gmail.com>(cherry picked from commitbd139f3)
Quick fix for following issue in CLI:```$ go run ./cmd/coder exp task listEncountered an error running "coder exp task list", see "coder exp task list --help" for more informationerror: Trace=[list tasks: ]Internal error fetching task prompts and states.workspace 14d548f4-aaad-40dd-833b-6ffe9c9d31bc is not an AI task workspaceexit status 1```This occurs in a short time window directly after creating a new task.I took a stab at writing a test for this, but ran out of time. I'm notentirely sure what causes non-AI-task workspaces to be returned in thequery but I suspect it's when a workspace build is pending or running.(cherry picked from commitdbc6c98)
This PR reverts github.com/mark3labs/mcp-go to 0.32.0, which was theversion used by#18670 thatintroduced MCP HTTP support in Coder, and ensures dependabot doesn'tupgrade it automatically.A bug has been introduced in a recent version of mcp-go that causes someHTTP MCP requests to fail with the error message```[erro]  coderd.mcp: Failed to handle sampling response: no active session found for session mcp-session-e3cb7333-284f-46bd-a009-d611f1b690f6```The bug may be related to this issue:mark3labs/mcp-go#554.(cherry picked from commita2945b0)
## DescriptionThis PR introduces documentation for recently merged feature: externalworkspaces.#19285#19286#19287#19288---------Co-authored-by: Atif Ali <atif@coder.com>(cherry picked from commit33509f2)
…19612)The previous logic verified a generated name was valid, _and thenappended a suffix to it_. This was flawed as it would allow a 32character name, and then append an extra 5 characters to it.Instead we now append the suffix _and then_ verify it is valid.(cherry picked from commit347ab5b)
## DescriptionThis PR introduces one counter and two histograms related to workspacecreation and claiming. The goal is to provide clearer observability intohow workspaces are created (regular vs prebuild) and the time cost ofthose operations.### `coderd_workspace_creation_total`* Metric type: Counter* Name: `coderd_workspace_creation_total`* Labels: `organization_name`, `template_name`, `preset_name`This counter tracks whether a regular workspace (not created from aprebuild pool) was created using a preset or not.Currently, we already expose `coderd_prebuilt_workspaces_claimed_total`for claimed prebuilt workspaces, but we lack a comparable metric forregular workspace creations. This metric fills that gap, making itpossible to compare regular creations against claims.Implementation notes:* Exposed as a `coderd_` metric, consistent with other workspace-relatedmetrics (e.g. `coderd_api_workspace_latest_build`:https://github.com/coder/coder/blob/main/coderd/prometheusmetrics/prometheusmetrics.go#L149).* Every `defaultRefreshRate` (1 minute ), DB query`GetRegularWorkspaceCreateMetrics` is executed to fetch all regularworkspaces (not created from a prebuild pool).* The counter is updated with the total from all time (not just sincemetric introduction). This differs from the histograms below, which onlyaccumulate from their introduction forward.### `coderd_workspace_creation_duration_seconds` &`coderd_prebuilt_workspace_claim_duration_seconds`* Metric types: Histogram* Names:  * `coderd_workspace_creation_duration_seconds`* Labels: `organization_name`, `template_name`, `preset_name`, `type`(`regular`, `prebuild`)  * `coderd_prebuilt_workspace_claim_duration_seconds`    * Labels: `organization_name`, `template_name`, `preset_name`We already have `coderd_provisionerd_workspace_build_timings_seconds`,which tracks build run times for all workspace builds handled by theprovisioner daemon.However, in the context of this issue, we are only interested increation and claim build times, not all transitions; additionally, thismetric does not include `preset_name`, and adding it there wouldsignificantly increase cardinality. Therefore, separate more focusedmetrics are introduced here:* `coderd_workspace_creation_duration_seconds`: Build time to create aworkspace (either a regular workspace or the build into a prebuild pool,for prebuild initial provisioning build).* `coderd_prebuilt_workspace_claim_duration_seconds`: Time to claim aprebuilt workspace from the pool.The reason for two separate histograms is that:* Creation (regular or prebuild): provisioning builds with similar timemagnitude, generally expected to take longer than a claim operation.* Claim: expected to be a much faster provisioning build.#### Native histogram usageProvisioning times vary widely between projects. Using static bucketsrisks unbalanced or poorly informative histograms.To address this, these metrics use [Prometheus nativehistograms](https://prometheus.io/docs/specs/native_histograms/):* First introduced in Prometheus v2.40.0* Recommended stable usage from v2.45+* Requires Go client `prometheus/client_golang` v1.15.0+* Experimental and must be explicitly enabled on the server(`--enable-feature=native-histograms`)For compatibility, we also retain a classic bucket definition (alignedwith the existing provisioner metric:https://github.com/coder/coder/blob/main/provisionerd/provisionerd.go#L182-L189).* If native histograms are enabled, Prometheus ingests thehigh-resolution histogram.* If not, it falls back to the predefined buckets.Implementation notes:* Unlike the counter, these histograms are updated in real-time atworkspace build job completion.* They reflect data only from the point of introduction forward (nohistorical backfill).## Relates toCloses:#19528Native histograms tested in observability stack:coder/observability#50(cherry picked from commit0ab345c)
…19601)Previously, if you had a new license that would start before the currentone fully expired, you would get a warning. Now, the license validityperiods are merged together, and a warning is only generated based onthe end of the current contiguous period of license coverage.Closes#19498(cherry picked from commit605dad8)
…ic (#19641)## DescriptionWhen creating a prebuilt workspace, both `flags.IsPrebuild` and`flags.IsFirstBuild` are true. Previously, the logic rejected cases withmultiple flags, so `coderd_workspace_creation_duration_seconds` wasn’tupdated for prebuilt creations. This is the only valid scenario wheretwo flags can be true.## Changes* Fix logic to update `coderd_workspace_creation_duration_seconds`metric for prebuilt workspaces.* Add prebuild helper functions to coderdenttest (other prebuild testscan reuse this).* Update workspace's provisionerdmetric tests to include this metric.Follow-up:#19503Related to:#19528(cherry picked from commit353f5de)
- Removes GetManagedAgentCount query- Adds new table `usage_events_daily` which stores aggregated usageevents by the type and UTC day- Adds trigger to update the values in this table when a new row isinserted into `usage_events`- Adds a migration that adds `usage_events_daily` rows for existing datain `usage_events`- Adds tests for the trigger- Adds tests for the backfill query in the migrationSince the `usage_events` table is unreleased currently, this migrationwill do nothing on real deployments and will only affect previewdeployments such as dogfood.Closescoder/internal#943(cherry picked from commit39bf3ba)
…19667)* provisionerdserver: Expires prebuild user token for workspace, if itexists, when regenerating session token.* dbauthz: disallow prebuilds user from creating api keys* dbpurge: added functionality to expire stale api keys owned by theprebuilds user(cherry picked from commit06cbb28)
Fixes#19671(re-?)Adds an audit log entry when an API key is created via `coderlogin`.NOTE: This does _not_ backfill audit logs.<img width="1354" height="207" alt="Screenshot 2025-09-02 at 14 16 24"src="https://github.com/user-attachments/assets/921e85c1-eced-4a19-9d37-8f84f4af1e73"/>(cherry picked from commitbd6e91e)
@stirbystirby changed the titlefix(release): Merge cherry-picks for v2.26.0fix(release): merge cherry-picked items for v2.26.0Sep 2, 2025
@stirbystirby changed the titlefix(release): merge cherry-picked items for v2.26.0fix: merge cherry-picked items for v2.26.0Sep 2, 2025
@stirbystirby changed the base branch frommain torelease/2.26September 2, 2025 19:50
@stirbystirby requested a review fromsreyaSeptember 2, 2025 19:50
@stirbystirby merged commit0a73f84 intorelease/2.26Sep 2, 2025
13 checks passed
@stirbystirby deleted the cherry-26 branchSeptember 2, 2025 21:19
@github-actionsgithub-actionsbot locked and limited conversation to collaboratorsSep 2, 2025
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.
Reviewers

@sreyasreyasreya approved these changes

@aslilacaslilacAwaiting requested review from aslilacaslilac is a code owner

@ParkreinerParkreinerAwaiting requested review from ParkreinerParkreiner is a code owner

Assignees

@stirbystirby

Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

11 participants
@stirby@sreya@johnstcn@hugodutka@kacpersaw@DanielleMaywood@ssncferreira@brettkolodny@deansheather@matifali@Emyrk

[8]ページ先頭

©2009-2025 Movatter.jp