René's URL Explorer Experiment


Title: fix(cli)!: protect client Logger and refactor cli scaletest tests by johnstcn · Pull Request #8317 · coder/coder · GitHub

Open Graph Title: fix(cli)!: protect client Logger and refactor cli scaletest tests by johnstcn · Pull Request #8317 · coder/coder

X Title: fix(cli)!: protect client Logger and refactor cli scaletest tests by johnstcn · Pull Request #8317 · coder/coder

Description: This attempts to address the test flakes reported in #4942 -- sadly, the runner logs have expired and are no longer available so I've done a best-effort fix here. (breaking?) Protects Logger and LogBodies fields of codersdk.Client with its mutex. This addresses a data race in cli/scaletest. Fillets the existing cli/createworkspaces unit test and moves the testing logic there into the tests under scaletest/createworkspaces. Adds testutil.RaceEnabled bool const and conditionaly skips previously-skipped tests under scaletest/ if the race detector is enabled. This is unfortunate and sad, but I would prefer to have these tests at least running without the race detector than not running at all. Adds IgnoreErrors option to fake in-memory agent loggers; having the agents fail the test immediately when they encounter any sort of error isn't really helpful.

Open Graph Description: This attempts to address the test flakes reported in #4942 -- sadly, the runner logs have expired and are no longer available so I've done a best-effort fix here. (breaking?) Protects Logger a...

X Description: This attempts to address the test flakes reported in #4942 -- sadly, the runner logs have expired and are no longer available so I've done a best-effort fix here. (breaking?) Protects Logg...

Opengraph URL: https://github.com/coder/coder/pull/8317

X: @github

direct link

Domain: github.com

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:c0664585-8f31-61fc-66a4-6e1272df2c92
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idD2D6:3A4875:28B355B:3645C8A:6B01B5E5
html-safe-nonce6e1f091e96c53b2258f9e8cf9ab41a7f5e7385b8c99dc6f15b30d60d9faef518
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEMkQ2OjNBNDg3NToyOEIzNTVCOjM2NDVDOEE6NkIwMUI1RTUiLCJ2aXNpdG9yX2lkIjoiNDg4MjgwNTI0MjM3MjE0MjU2NSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac6d3242347536ad404f1ffdfd9ae682b95a0e73b55855b0b70c826dedad593956
hovercard-subject-tagpull_request:1420762566
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/coder/coder/pull/8317/files
twitter:imagehttps://avatars.githubusercontent.com/u/4949514?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/4949514?s=400&v=4
og:image:altThis attempts to address the test flakes reported in #4942 -- sadly, the runner logs have expired and are no longer available so I've done a best-effort fix here. (breaking?) Protects Logger a...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
Nonecc5dfdd32f62ebd3223cab3af3aa2b268d3605218237326a48a99d1efd89495c
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/coder/coder git https://github.com/coder/coder.git
octolytics-dimension-user_id95932066
octolytics-dimension-user_logincoder
octolytics-dimension-repository_id440752086
octolytics-dimension-repository_nwocoder/coder
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id440752086
octolytics-dimension-repository_network_root_nwocoder/coder
turbo-body-classeslogged-out env-production page-responsive full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release8c77c9e8439031ad54c75a250694842892f693e1
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/coder/coder/pull/8317/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fcoder%2Fcoder%2Fpull%2F8317%2Ffiles
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fcoder%2Fcoder%2Fpull%2F8317%2Ffiles
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=coder%2Fcoder
Reloadhttps://github.com/coder/coder/pull/8317/files
Reloadhttps://github.com/coder/coder/pull/8317/files
Reloadhttps://github.com/coder/coder/pull/8317/files
coderhttps://github.com/coder
coderhttps://github.com/coder/coder
Codehttps://github.com/coder/coder
Issues320 (320)https://github.com/coder/coder/issues
Pull requests470 (470)https://github.com/coder/coder/pulls
Discussionshttps://github.com/coder/coder/discussions
Actionshttps://github.com/coder/coder/actions
Projectshttps://github.com/coder/coder/projects
Security and quality49 (49)https://github.com/coder/coder/security
Insightshttps://github.com/coder/coder/insights
Sign up for GitHub https://github.com/signup?return_to=%2Fcoder%2Fcoder%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Fcoder%2Fcoder%2Fissues%2Fnew%2Fchoose
johnstcnhttps://github.com/johnstcn
mainhttps://github.com/coder/coder/tree/main
cj/scaletest-createworkspaces-flakehttps://github.com/coder/coder/tree/cj/scaletest-createworkspaces-flake
Conversation 16 https://github.com/coder/coder/pull/8317
Commits 16 https://github.com/coder/coder/pull/8317/commits
Checks 0 https://github.com/coder/coder/pull/8317/checks
Files changed https://github.com/coder/coder/pull/8317/files
Please reload this pagehttps://github.com/coder/coder/pull/8317/files
fix(cli)!: protect client Logger and refactor cli scaletest tests https://github.com/coder/coder/pull/8317/files#top
Show all changes 16 commits https://github.com/coder/coder/pull/8317/files
8f07b9b fix data race in scaletest_test johnstcn Jul 4, 2023 https://github.com/coder/coder/pull/8317/commits/8f07b9b541690fa9f64044bc46b4f37cbda797e3
b0b55f9 add TODO johnstcn Jul 4, 2023 https://github.com/coder/coder/pull/8317/commits/b0b55f925155bd5d52390ed6a72be2d451ec6f14
f863a83 fillet cli scaletest createworkspaces test, bulk up tests in scaletes… johnstcn Jul 5, 2023 https://github.com/coder/coder/pull/8317/commits/f863a8336b0678f71aa032777a7dc278deaefeaf
b3d1c6e make fmt johnstcn Jul 5, 2023 https://github.com/coder/coder/pull/8317/commits/b3d1c6e8869687db0787ac68194d90ba5ef1f52e
9fb7479 appease the linter johnstcn Jul 5, 2023 https://github.com/coder/coder/pull/8317/commits/9fb747955f85d49149d0cf2e2618cf6c3fcebb69
a7f7e10 wait for template version before creating template johnstcn Jul 5, 2023 https://github.com/coder/coder/pull/8317/commits/a7f7e1088cb55e3ec042744d4eb82ea187cb4b66
b511f16 unskip scaletest/workspacebuild tests johnstcn Jul 5, 2023 https://github.com/coder/coder/pull/8317/commits/b511f16bc48e3db2db200c4349b04d9b36369956
f45f938 add IgnoreErrors option to agent loggers johnstcn Jul 5, 2023 https://github.com/coder/coder/pull/8317/commits/f45f938555a2bc1d90aa9e05f218af633ef104ac
86c553c coderd: TestDeploymentStats: make test slightly less time-sensitive johnstcn Jul 5, 2023 https://github.com/coder/coder/pull/8317/commits/86c553c619aba01c9a913510ee1164a7c16cb830
d38b6c8 fix potential race in test cleanup johnstcn Jul 5, 2023 https://github.com/coder/coder/pull/8317/commits/d38b6c8693534ea22cd9c98d25d39343214491a6
543a8f1 address comments re: RaceEnabled johnstcn Jul 5, 2023 https://github.com/coder/coder/pull/8317/commits/543a8f16d1b88ebf9f09597d9b0b43282ae3f413
a51dba7 fixup! address comments re: RaceEnabled johnstcn Jul 5, 2023 https://github.com/coder/coder/pull/8317/commits/a51dba73149f8f2b0d2a3282ae5f2b3bf5bfb81d
aaf3829 Merge remote-tracking branch 'origin/main' into cj/scaletest-createwo… johnstcn Jul 5, 2023 https://github.com/coder/coder/pull/8317/commits/aaf3829f9e25ef405d4cece2bd82c0ab9c170c05
2bcd712 client: make it clear what fields mu protects johnstcn Jul 5, 2023 https://github.com/coder/coder/pull/8317/commits/2bcd7128be4e67fcb82a56de7a3cb4a076f93573
61dc5f9 make cleanup nicer johnstcn Jul 5, 2023 https://github.com/coder/coder/pull/8317/commits/61dc5f9e957b2b55d9c3369355510066d6ee132c
efeac86 Merge remote-tracking branch 'origin/main' into cj/scaletest-createwo… johnstcn Jul 6, 2023 https://github.com/coder/coder/pull/8317/commits/efeac8688c2ea54872c087238766fd2c2b86f36c
Clear filters https://github.com/coder/coder/pull/8317/files
Please reload this pagehttps://github.com/coder/coder/pull/8317/files
Please reload this pagehttps://github.com/coder/coder/pull/8317/files
agent.go https://github.com/coder/coder/pull/8317/files#diff-f79a293a9987904ac41f4ad561b263b381e7ee002d2b46b5fed0a2b0e349d589
root.go https://github.com/coder/coder/pull/8317/files#diff-f95036fc6ff63eb5fcf251353f47b191fa8a2d927d37eacbb51e47e74e5f71f4
scaletest_test.go https://github.com/coder/coder/pull/8317/files#diff-c018665f988df1be52d552cb7b1c5a742c9163735c04aded3a93d123a7589ff1
ssh.go https://github.com/coder/coder/pull/8317/files#diff-e288cc849ca774d47294f4f6c71c4ec171f6e0b15491e7220a0144dbfc1a43bc
ssh_test.go https://github.com/coder/coder/pull/8317/files#diff-2caee0e73c6bfeed4632d116a45feccdbdb7a4dfd21a7b7aad510cf087873c9e
deployment_test.go https://github.com/coder/coder/pull/8317/files#diff-42f3059660c07ba7a0dfd0fde8c83b6e56b730654c57a4c063b36ec59a894e62
agentsdk.go https://github.com/coder/coder/pull/8317/files#diff-4fcb60bf1885858aa2ee3af38f90a99bd81018144ca884f6e8477e6ba408c611
client.go https://github.com/coder/coder/pull/8317/files#diff-64a48277adf9f0d069a419bbb8ecbe9ba8e38cc43b95fa21d16a750cf194cd88
client_internal_test.go https://github.com/coder/coder/pull/8317/files#diff-6749055bc31510f5fe59cb5f8c11745397bf6b468a6d883d58cfa96a8f163e8a
appearance_test.go https://github.com/coder/coder/pull/8317/files#diff-9f9be03147dcec29da2fdb550fdb5752c04642d29828541c66f3f58a14e3f553
run.go https://github.com/coder/coder/pull/8317/files#diff-4cd5f2a12b9372ba14a1f99a0356b273b064b3c4c327cf054896ea6698d6fff4
run.go https://github.com/coder/coder/pull/8317/files#diff-f905dba685aa86cf93813e0e4f2e181d1b8f5cd7b415988f61a169a9c1a69507
run_test.go https://github.com/coder/coder/pull/8317/files#diff-3385f865f44e9b8dfd382ea1136d3edad81765c491eb66f481247c571b9bcb90
run.go https://github.com/coder/coder/pull/8317/files#diff-c00c52e3921de6c79477a1e16c73a7ac300ac688e04af8462dca7f4c3083e26e
run.go https://github.com/coder/coder/pull/8317/files#diff-adcfa4b8d4ca85b71116c1dc87cbb6013247498cc4ed92ad41b2968b5f49d8a2
run_test.go https://github.com/coder/coder/pull/8317/files#diff-8f8db92be387cfddc547c988406572a188d12430772238c8d4410a8f84e23560
run.go https://github.com/coder/coder/pull/8317/files#diff-d07b0b9975412333d2648255be91b633b4c73837798ba635d9c7d529e888fcfc
race.go https://github.com/coder/coder/pull/8317/files#diff-42dc17e3a3e48cb59c0e0555082fd4394df42531424555b7aad55fa02144b5a5
race_off.go https://github.com/coder/coder/pull/8317/files#diff-802b840c77776f12308077ed9c3733a7d0dccaf851e57a0d4362e72ed0296a58
race_on.go https://github.com/coder/coder/pull/8317/files#diff-4fa948d1f5ebe8b87f71bb8fc34bde485ae7f8b1c83bc2136664e6b57351e869
cli/agent.gohttps://github.com/coder/coder/pull/8317/files#diff-f79a293a9987904ac41f4ad561b263b381e7ee002d2b46b5fed0a2b0e349d589
View file https://github.com/coder/coder/blob/efeac8688c2ea54872c087238766fd2c2b86f36c/cli/agent.go
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/coder/coder/pull/8317/{{ revealButtonHref }}
https://github.com/coder/coder/pull/8317/files#diff-f79a293a9987904ac41f4ad561b263b381e7ee002d2b46b5fed0a2b0e349d589
https://github.com/coder/coder/pull/8317/files#diff-f79a293a9987904ac41f4ad561b263b381e7ee002d2b46b5fed0a2b0e349d589
cli/root.gohttps://github.com/coder/coder/pull/8317/files#diff-f95036fc6ff63eb5fcf251353f47b191fa8a2d927d37eacbb51e47e74e5f71f4
View file https://github.com/coder/coder/blob/efeac8688c2ea54872c087238766fd2c2b86f36c/cli/root.go
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/coder/coder/pull/8317/{{ revealButtonHref }}
https://github.com/coder/coder/pull/8317/files#diff-f95036fc6ff63eb5fcf251353f47b191fa8a2d927d37eacbb51e47e74e5f71f4
https://github.com/coder/coder/pull/8317/files#diff-f95036fc6ff63eb5fcf251353f47b191fa8a2d927d37eacbb51e47e74e5f71f4
cli/scaletest_test.gohttps://github.com/coder/coder/pull/8317/files#diff-c018665f988df1be52d552cb7b1c5a742c9163735c04aded3a93d123a7589ff1
View file https://github.com/coder/coder/blob/efeac8688c2ea54872c087238766fd2c2b86f36c/cli/scaletest_test.go
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/coder/coder/pull/8317/{{ revealButtonHref }}
https://github.com/coder/coder/pull/8317/files#diff-c018665f988df1be52d552cb7b1c5a742c9163735c04aded3a93d123a7589ff1
johnstcnhttps://github.com/johnstcn
Jul 5, 2023https://github.com/coder/coder/pull/8317/files#r1252842835
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/coder/coder/pull/8317/files
https://github.com/coder/coder/pull/8317/files#diff-c018665f988df1be52d552cb7b1c5a742c9163735c04aded3a93d123a7589ff1
cli/ssh.gohttps://github.com/coder/coder/pull/8317/files#diff-e288cc849ca774d47294f4f6c71c4ec171f6e0b15491e7220a0144dbfc1a43bc
View file https://github.com/coder/coder/blob/efeac8688c2ea54872c087238766fd2c2b86f36c/cli/ssh.go
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/coder/coder/pull/8317/{{ revealButtonHref }}
https://github.com/coder/coder/pull/8317/files#diff-e288cc849ca774d47294f4f6c71c4ec171f6e0b15491e7220a0144dbfc1a43bc
https://github.com/coder/coder/pull/8317/files#diff-e288cc849ca774d47294f4f6c71c4ec171f6e0b15491e7220a0144dbfc1a43bc
cli/ssh_test.gohttps://github.com/coder/coder/pull/8317/files#diff-2caee0e73c6bfeed4632d116a45feccdbdb7a4dfd21a7b7aad510cf087873c9e
View file https://github.com/coder/coder/blob/efeac8688c2ea54872c087238766fd2c2b86f36c/cli/ssh_test.go
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/coder/coder/pull/8317/{{ revealButtonHref }}
https://github.com/coder/coder/pull/8317/files#diff-2caee0e73c6bfeed4632d116a45feccdbdb7a4dfd21a7b7aad510cf087873c9e
https://github.com/coder/coder/pull/8317/files#diff-2caee0e73c6bfeed4632d116a45feccdbdb7a4dfd21a7b7aad510cf087873c9e
coderd/deployment_test.gohttps://github.com/coder/coder/pull/8317/files#diff-42f3059660c07ba7a0dfd0fde8c83b6e56b730654c57a4c063b36ec59a894e62
View file https://github.com/coder/coder/blob/efeac8688c2ea54872c087238766fd2c2b86f36c/coderd/deployment_test.go
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/coder/coder/pull/8317/{{ revealButtonHref }}
https://github.com/coder/coder/pull/8317/files#diff-42f3059660c07ba7a0dfd0fde8c83b6e56b730654c57a4c063b36ec59a894e62
https://github.com/coder/coder/pull/8317/files#diff-42f3059660c07ba7a0dfd0fde8c83b6e56b730654c57a4c063b36ec59a894e62
https://github.com/coder/coder/pull/8317/files#diff-42f3059660c07ba7a0dfd0fde8c83b6e56b730654c57a4c063b36ec59a894e62
codersdk/agentsdk/agentsdk.gohttps://github.com/coder/coder/pull/8317/files#diff-4fcb60bf1885858aa2ee3af38f90a99bd81018144ca884f6e8477e6ba408c611
View file https://github.com/coder/coder/blob/efeac8688c2ea54872c087238766fd2c2b86f36c/codersdk/agentsdk/agentsdk.go
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/coder/coder/pull/8317/{{ revealButtonHref }}
https://github.com/coder/coder/pull/8317/files#diff-4fcb60bf1885858aa2ee3af38f90a99bd81018144ca884f6e8477e6ba408c611
https://github.com/coder/coder/pull/8317/files#diff-4fcb60bf1885858aa2ee3af38f90a99bd81018144ca884f6e8477e6ba408c611
https://github.com/coder/coder/pull/8317/files#diff-4fcb60bf1885858aa2ee3af38f90a99bd81018144ca884f6e8477e6ba408c611
Please reload this pagehttps://github.com/coder/coder/pull/8317/files
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.