René's URL Explorer Experiment


Title: fix(coderd/x/gitsync): stop retrying unimplemented git provider types forever · Issue #28141 · coder/coder · GitHub

Open Graph Title: fix(coderd/x/gitsync): stop retrying unimplemented git provider types forever · Issue #28141 · coder/coder

X Title: fix(coderd/x/gitsync): stop retrying unimplemented git provider types forever · Issue #28141 · coder/coder

Description: Follow-up from #27711 (CRF-14). Problem Five configured git provider types (bitbucket-cloud, bitbucket-server, azure-devops, azure-devops-entra, gitea) get (nil, nil) from gitprovider.New, so gitsync re-queues every affected row every Di...

Open Graph Description: Follow-up from #27711 (CRF-14). Problem Five configured git provider types (bitbucket-cloud, bitbucket-server, azure-devops, azure-devops-entra, gitea) get (nil, nil) from gitprovider.New, so gitsy...

X Description: Follow-up from #27711 (CRF-14). Problem Five configured git provider types (bitbucket-cloud, bitbucket-server, azure-devops, azure-devops-entra, gitea) get (nil, nil) from gitprovider.New, so gitsy...

Opengraph URL: https://github.com/coder/coder/issues/28141

X: @github

direct link

Domain: github.com

IPv4 address: 140.82.113.3


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"fix(coderd/x/gitsync): stop retrying unimplemented git provider types forever","articleBody":"Follow-up from #27711 (CRF-14).\n\n## Problem\n\nFive configured git provider types (bitbucket-cloud, bitbucket-server, azure-devops, azure-devops-entra, gitea) get `(nil, nil)` from `gitprovider.New`, so `gitsync` re-queues every affected row every `DiffStatusTTL` (120s) forever. It logs `\"no provider for origin %q\"` (`coderd/x/gitsync/gitsync.go`, the `provider == nil` branch), blaming origin matching (a config mistake the operator can fix) rather than a missing implementation (which they cannot).\n\nRows are per-chat (`chat_diff_statuses.chat_id` is the primary key), not per-commit. The cost is one DB write per affected chat per 120s, multiplied across deployments. Bitbucket and Azure DevOps are used by real paying customers, so the churn is real.\n\n## Agreed design decisions (from discussion on #27711)\n\n1. **Distinguish \"unimplemented git type\" from \"no matching config.\"** These are two different errors with different root causes. Do not conflate them. A misconfigured origin should keep the current short backoff (the operator can fix it), while an unimplemented type should get a long backoff (nothing to fix until code ships).\n\n2. **Long backoff, not a terminal flag.** Do not add a permanent `unsupported` flag or column. A flag would require `MarkStale` to clear it on revival, which is easy to forget. A long backoff reuses the existing `NoTokenBackoff` pattern and keeps revival free.\n\n3. **Revival is confirmed safe.** `Worker.MarkStale` (`coderd/x/gitsync/worker.go`) resets `stale_at` to the past unconditionally via `markStaleSingle` whenever the agent reports git activity. So a row parked with a long backoff is revived by new commits regardless of the backoff duration. Verified by tracing, not guessing.\n\n4. **Migration bump for new providers.** When a provider implementation ships (e.g. bitbucket), the accompanying database migration should reset `stale_at` on the parked rows so they all wake at once. This makes even a very long backoff safe: shipping the implementation ships the wake-up.\n\n## Shape of the fix\n\nThe distinction is currently collapsed at two layers:\n\n- `resolveGitProvider(ctx, origin)` returns a bare `gitprovider.Provider`. A `nil` conflates \"origin matched no config\" and \"matched a config but the git type is unimplemented.\" `ProviderResolver` is `func(ctx, origin) gitprovider.Provider`, a single return value with no room to carry the reason.\n- `Config.Git()` deliberately returns `(nil, nil)` for unimplemented types (see CRF-13 and the doc comment in `coderd/externalauth/externalauth.go`). Callers cannot distinguish the two cases from the return values.\n\nSo the fix needs to:\n\n1. Signal three states from the resolver: matched+implemented, matched+unimplemented, no-match. Change `ProviderResolver` to return an error, or add a parallel \"is this origin's provider implemented\" check.\n2. Introduce a sentinel such as `ErrProviderUnimplemented` and propagate it from `resolveGitProvider` through `Refresher.Refresh` into the worker's backoff branch (the block next to `ErrNoTokenAvailable` in `Worker.tick`).\n3. Add a long backoff constant (e.g. `NotImplementedBackoff`) and apply it when the error matches.\n4. `TestWorker_NoTokenBackoff` (`coderd/x/gitsync/worker_test.go`) is the template for the backoff test.\n\n## Estimate\n\nAbout 150-200 lines including tests. Roughly 40 production lines across `coderd/exp_chats.go` (resolver) and `coderd/x/gitsync/gitsync.go` / `worker.go` (type change, propagation, backoff), plus about 100-120 lines of tests. Contained to `coderd/x/gitsync` and `coderd/exp_chats.go`. No DB migration is needed for the fix itself; the wake-up migration ships with each future provider implementation.\n\n> 🤖 Generated by Coder Agents on behalf of @johnstcn.","author":{"url":"https://github.com/johnstcn","@type":"Person","name":"johnstcn"},"datePublished":"2026-08-13T17:37:01Z","url":"https://github.com/coder/coder/issues/28141"}

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/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:d1eb6f1f-ff8c-4385-9995-72c55e6ce058
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idDF94:179D40:1217FF:189B5D:6B044E77
html-safe-noncea79312b226734367b5f2f8e1d60e3c57b8c80e611d26111ebd3794261430d740
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJERjk0OjE3OUQ0MDoxMjE3RkY6MTg5QjVEOjZCMDQ0RTc3IiwidmlzaXRvcl9pZCI6IjM5Njc2OTY2Njk2NTA0NzI1NjciLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac1cc05b7ce2b77534b68c8bab263c08f32adb02dc9d98f2185bd01d7838babf33
hovercard-subject-tagissue:5144128977
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/coder/coder/28141/issue_layout
twitter:imagehttps://opengraph.githubassets.com/1069853d028887a505638d07e13dc3992a23198148be8e53efa618b8d1622d59/coder/coder/issues/28141
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/1069853d028887a505638d07e13dc3992a23198148be8e53efa618b8d1622d59/coder/coder/issues/28141
og:image:altFollow-up from #27711 (CRF-14). Problem Five configured git provider types (bitbucket-cloud, bitbucket-server, azure-devops, azure-devops-entra, gitea) get (nil, nil) from gitprovider.New, so gitsy...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamejohnstcn
hostnamegithub.com
expected-hostnamegithub.com
None002aa6b95ffa730b0aec436a5c383f536ad677284e60056037fb120afe37b730
turbo-cache-controlno-preview
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
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release059f24c781e3a0d7df3f27a97da0e93fab06ae39
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/coder/coder/issues/28141#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fcoder%2Fcoder%2Fissues%2F28141
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%2Fissues%2F28141
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=coder%2Fcoder
Reloadhttps://github.com/coder/coder/issues/28141
Reloadhttps://github.com/coder/coder/issues/28141
Reloadhttps://github.com/coder/coder/issues/28141
coderhttps://github.com/coder
coderhttps://github.com/coder/coder
Codehttps://github.com/coder/coder
Issues322 (322)https://github.com/coder/coder/issues
Pull requests474 (474)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
https://github.com/coder/coder
New issuehttps://github.com/login?return_to=https://github.com/coder/coder/issues/28141
New issuehttps://github.com/login?return_to=https://github.com/coder/coder/issues/28141
#32116https://github.com/coder/coder/pull/32116
fix(coderd/x/gitsync): stop retrying unimplemented git provider types foreverhttps://github.com/coder/coder/issues/28141#top
#32116https://github.com/coder/coder/pull/32116
bughttps://github.com/coder/coder/issues?q=state%3Aopen%20label%3A%22bug%22
https://github.com/johnstcn
johnstcnhttps://github.com/johnstcn
on Aug 13, 2026https://github.com/coder/coder/issues/28141#issue-5144128977
#27711https://github.com/coder/coder/pull/27711
#27711https://github.com/coder/coder/pull/27711
@johnstcnhttps://github.com/johnstcn
johnstcnhttps://github.com/johnstcn
bughttps://github.com/coder/coder/issues?q=state%3Aopen%20label%3A%22bug%22
on Aug 13, 2026https://github.com/coder/coder/issues/28141#event-29415252799
https://github.com/apps/linear-code
linear-codehttps://github.com/apps/linear-code
on Aug 13, 2026https://github.com/coder/coder/issues/28141#issuecomment-5284226912
Linear Codehttps://linear.app
ENG-3174https://linear.app/codercom/issue/ENG-3174
johnstcnhttps://github.com/johnstcn
on Aug 18, 2026https://github.com/coder/coder/issues/28141#event-29605409420
fix: follow-up fixes for conditional VCS requests (#27711)https://github.com/coder/coder/commit/6079c514ee991a4d89bf770ab91ff81b90a2127c
#27711https://github.com/coder/coder/pull/27711
6079c51https://github.com/coder/coder/commit/6079c514ee991a4d89bf770ab91ff81b90a2127c
https://github.com/bharadwaj-pendyala
bharadwaj-pendyalahttps://github.com/bharadwaj-pendyala
on Sep 26, 2026https://github.com/coder/coder/issues/28141#issuecomment-5849880719
Sign up for freehttps://github.com/signup?return_to=https://github.com/coder/coder/issues/28141
Sign in to commenthttps://github.com/login?return_to=https://github.com/coder/coder/issues/28141
bughttps://github.com/coder/coder/issues?q=state%3Aopen%20label%3A%22bug%22
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

Response headers:
Servergithub.com
Content-Typetext/html; charset=utf-8
Cache-Controlmax-age=0, private, must-revalidate

Viewport: width=device-width


URLs of crawlers that visited me.