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

test: fixTestWorkspaceAgentReportStats flake#17678

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
ethanndickson merged 1 commit intomainfromethan/fix-stats-last-used-at-flake
May 5, 2025

Conversation

ethanndickson
Copy link
Member

@ethanndicksonethanndickson commentedMay 5, 2025
edited
Loading

Closescoder/internal#609.

As seen in the below logs, thelast_used_at time was updating, but just to the same value that it was on creation;dbtime.Now was called in quick succession.

 t.go:106: 2025-05-05 12:11:54.166 [info]  coderd.workspace_usage_tracker: updated workspaces last_used_at  count=1  now="2025-05-05T12:11:54.161329Z"    t.go:106: 2025-05-05 12:11:54.172 [debu]  coderd: GET  host=localhost:50422  path=/api/v2/workspaces/745b7ff3-47f2-4e1a-9452-85ea48ba5c46  proto=HTTP/1.1  remote_addr=127.0.0.1  start="2025-05-05T12:11:54.1669073Z"  workspace_name=peaceful_faraday34  requestor_id=b2cf02ae-2181-480b-bb1f-95dc6acb6497  requestor_name=testuser  requestor_email=""  took=5.2105ms  status_code=200  latency_ms=5  params_workspace=745b7ff3-47f2-4e1a-9452-85ea48ba5c46  request_id=7fd5ea90-af7b-4104-91c5-9ca64bc2d5e6    workspaceagentsrpc_test.go:70:         Error Trace:C:/actions-runner/coder/coder/coderd/workspaceagentsrpc_test.go:70        Error:      Should be true        Test:       TestWorkspaceAgentReportStats        Messages:   2025-05-05 12:11:54.161329 +0000 UTC is not after 2025-05-05 12:11:54.161329 +0000 UTC

If we change the initialLastUsedAt time to be a time in the past, ticking with adbtime.Now will always update it to a later value. If it never updates, the condition will still fail.

@ethanndicksonGraphite App
Copy link
MemberAuthor

This stack of pull requests is managed byGraphite. Learn more aboutstacking.

@ethanndicksonethanndickson marked this pull request as ready for reviewMay 5, 2025 13:18
Copy link
Contributor

@hugodutkahugodutka left a comment

Choose a reason for hiding this comment

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

thanks Ethan!

@ethanndicksonethanndickson merged commit4369765 intomainMay 5, 2025
44 checks passed
@ethanndicksonethanndickson deleted the ethan/fix-stats-last-used-at-flake branchMay 5, 2025 14:15
@github-actionsgithub-actionsbot locked and limited conversation to collaboratorsMay 5, 2025
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.
Reviewers

@hugodutkahugodutkahugodutka approved these changes

Assignees

@ethanndicksonethanndickson

Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

flake: TestWorkspaceAgentReportStats
2 participants
@ethanndickson@hugodutka

[8]ページ先頭

©2009-2025 Movatter.jp