René's URL Explorer Experiment


Title: fix: Use context.Background() in client constructors by samuelkim7 · Pull Request #5897 · feast-dev/feast · GitHub

Open Graph Title: fix: Use context.Background() in client constructors by samuelkim7 · Pull Request #5897 · feast-dev/feast

X Title: fix: Use context.Background() in client constructors by samuelkim7 · Pull Request #5897 · feast-dev/feast

Description: What this PR does / why we need it: This PR fixes a critical context canceled bug in the GCS/S3 RegistryStore and DynamoDB OnlineStore constructors. The Bug: Immediate Context Cancellation During testing with the Go feature server (running in a local Docker container) connected to live cloud infrastructure (GCS, Redis), the following error occurred immediately upon startup: {"level":"error","error":"Get \"https://storage.googleapis.com/.../feature_registry.db\": Post \"https://oauth2.googleapis.com/token\": context canceled", "message":"Registry refresh Failed"} Root Cause In the previous implementation, the constructor (NewGCSRegistryStore) initialized cloud clients using context.WithTimeout() and defer cancel(). Because cancel() is called immediately when the constructor returns, the base context for the GCS client becomes invalidated. This leads to an immediate failure when the client attempts to perform its first operation (like fetching an OAuth token or reading the registry), even if the 5-second timeout hasn't elapsed. The Fix: Lifecycle Alignment A storage client's lifecycle should be tied to the server's uptime. Constructor (Long-lived): Changed to use context.Background(). This ensures the client's underlying connection and token-refresh routines remain valid as long as the server is running. Methods (Request-scoped): Kept the 5-second context.WithTimeout() inside individual methods (GetRegistryProto, Teardown). This correctly applies a deadline to specific I/O operations without killing the persistent client. This follows Go's recommended practice of not storing or canceling request-scoped contexts in long-lived objects. Consistency To ensure architectural consistency across the project and prevent similar latent bugs, this fix has been applied to: GCS Registry Store (NewGCSRegistryStore) S3 Registry Store (NewS3RegistryStore) DynamoDB Online Store (NewDynamodbOnlineStore) Which issue(s) this PR fixes: Fixes the context canceled error that prevents the Go feature server from properly connecting to live cloud registries and online stores. Misc Refactored internal variable names (changing lr to rs in NewS3RegistryStore) to align with the naming conventions used in gcs.go and to accurately reflect their purpose as RegistryStore.

Open Graph Description: What this PR does / why we need it: This PR fixes a critical context canceled bug in the GCS/S3 RegistryStore and DynamoDB OnlineStore constructors. The Bug: Immediate Context Cancellation During ...

X Description: What this PR does / why we need it: This PR fixes a critical context canceled bug in the GCS/S3 RegistryStore and DynamoDB OnlineStore constructors. The Bug: Immediate Context Cancellation During ...

Opengraph URL: https://github.com/feast-dev/feast/pull/5897

X: @github

direct link

Domain: github.com

route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:59c27d07-4b1a-ef3e-a400-84126541a573
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-id9CC0:321DA7:570FF:74797:6A4EA6CA
html-safe-nonce8cdc7f5ab2296c24b7dc3282621972c94322035590a46a51fa3d9f9429c91f1b
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5Q0MwOjMyMURBNzo1NzBGRjo3NDc5Nzo2QTRFQTZDQSIsInZpc2l0b3JfaWQiOiI4NzQ4NjM1MDk5OTU0NTg3MzM4IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmac14e49569b29dcfa047231bddccff6463253fa20df16a87e3c2f3a489bc5af4ec
hovercard-subject-tagpull_request:3203775196
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/feast-dev/feast/pull/5897/files
twitter:imagehttps://avatars.githubusercontent.com/u/65876994?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/65876994?s=400&v=4
og:image:altWhat this PR does / why we need it: This PR fixes a critical context canceled bug in the GCS/S3 RegistryStore and DynamoDB OnlineStore constructors. The Bug: Immediate Context Cancellation During ...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None41b6ab3ba6d20a71766ac245b5a4a94c6fc672a9cd4da7d44c1b33ab8bf6a21c
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/feast-dev/feast git https://github.com/feast-dev/feast.git
octolytics-dimension-user_id57027613
octolytics-dimension-user_loginfeast-dev
octolytics-dimension-repository_id161133770
octolytics-dimension-repository_nwofeast-dev/feast
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id161133770
octolytics-dimension-repository_network_root_nwofeast-dev/feast
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
releasee6a744804e8e70f97b4d5a18a94dcc63db22f97a
ui-targetcanary-1
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/feast-dev/feast/pull/5897/files#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Ffeast-dev%2Ffeast%2Fpull%2F5897%2Ffiles
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub Copilot appDirect agents from issue to mergehttps://github.com/features/ai/github-app
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
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
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
View all resourceshttps://github.com/resources
GitHub SponsorsFund open source developershttps://github.com/open-source/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/open-source/accelerator
GitHub Starshttps://stars.github.com
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://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
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Ffeast-dev%2Ffeast%2Fpull%2F5897%2Ffiles
Sign up https://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=feast-dev%2Ffeast
Reloadhttps://github.com/feast-dev/feast/pull/5897/files
Reloadhttps://github.com/feast-dev/feast/pull/5897/files
Reloadhttps://github.com/feast-dev/feast/pull/5897/files
Please reload this pagehttps://github.com/feast-dev/feast/pull/5897/files
feast-dev https://github.com/feast-dev
feasthttps://github.com/feast-dev/feast
Notifications https://github.com/login?return_to=%2Ffeast-dev%2Ffeast
Fork 1.4k https://github.com/login?return_to=%2Ffeast-dev%2Ffeast
Star 7.1k https://github.com/login?return_to=%2Ffeast-dev%2Ffeast
Code https://github.com/feast-dev/feast
Issues 212 https://github.com/feast-dev/feast/issues
Pull requests 170 https://github.com/feast-dev/feast/pulls
Discussions https://github.com/feast-dev/feast/discussions
Actions https://github.com/feast-dev/feast/actions
Security and quality 1 https://github.com/feast-dev/feast/security
Insights https://github.com/feast-dev/feast/pulse
Code https://github.com/feast-dev/feast
Issues https://github.com/feast-dev/feast/issues
Pull requests https://github.com/feast-dev/feast/pulls
Discussions https://github.com/feast-dev/feast/discussions
Actions https://github.com/feast-dev/feast/actions
Security and quality https://github.com/feast-dev/feast/security
Insights https://github.com/feast-dev/feast/pulse
Sign up for GitHub https://github.com/signup?return_to=%2Ffeast-dev%2Ffeast%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Ffeast-dev%2Ffeast%2Fissues%2Fnew%2Fchoose
franciscojavierarceohttps://github.com/franciscojavierarceo
feast-dev:masterhttps://github.com/feast-dev/feast/tree/master
samuelkim7:fix/go-constructor-context-cancelhttps://github.com/samuelkim7/feast/tree/fix/go-constructor-context-cancel
Conversation 1 https://github.com/feast-dev/feast/pull/5897
Commits 1 https://github.com/feast-dev/feast/pull/5897/commits
Checks 23 https://github.com/feast-dev/feast/pull/5897/checks
Files changed https://github.com/feast-dev/feast/pull/5897/files
Please reload this pagehttps://github.com/feast-dev/feast/pull/5897/files
fix: Use context.Background() in client constructors https://github.com/feast-dev/feast/pull/5897/files#top
Show all changes 1 commit https://github.com/feast-dev/feast/pull/5897/files
02fe5d6 fix: Use context.Background() in client constructors samuelkim7 Jan 23, 2026 https://github.com/feast-dev/feast/pull/5897/commits/02fe5d64d02f07b0be8be606a2b60f0577e6d225
Clear filters https://github.com/feast-dev/feast/pull/5897/files
Please reload this pagehttps://github.com/feast-dev/feast/pull/5897/files
Please reload this pagehttps://github.com/feast-dev/feast/pull/5897/files
dynamodbonlinestore.go https://github.com/feast-dev/feast/pull/5897/files#diff-8be1c5de18e512cbd3b2638f530d373430923a08859146dc15b89667e347f932
gcs.go https://github.com/feast-dev/feast/pull/5897/files#diff-625d9edc54989d669fba593c608791301af07d379397effa1f0a76cdf9e24c9f
s3.go https://github.com/feast-dev/feast/pull/5897/files#diff-07244ff1695c53374eb8068c10a5ce5d78bdcbb4abd4577022c506078b89d6b9
https://github.com/feast-dev/feast/blob/master/CODEOWNERS#L6
go/internal/feast/onlinestore/dynamodbonlinestore.gohttps://github.com/feast-dev/feast/pull/5897/files#diff-8be1c5de18e512cbd3b2638f530d373430923a08859146dc15b89667e347f932
View file https://github.com/samuelkim7/feast/blob/02fe5d64d02f07b0be8be606a2b60f0577e6d225/go/internal/feast/onlinestore/dynamodbonlinestore.go
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/feast-dev/feast/pull/5897/{{ revealButtonHref }}
https://github.com/feast-dev/feast/pull/5897/files#diff-8be1c5de18e512cbd3b2638f530d373430923a08859146dc15b89667e347f932
https://github.com/feast-dev/feast/pull/5897/files#diff-8be1c5de18e512cbd3b2638f530d373430923a08859146dc15b89667e347f932
https://github.com/feast-dev/feast/blob/master/CODEOWNERS#L6
go/internal/feast/registry/gcs.gohttps://github.com/feast-dev/feast/pull/5897/files#diff-625d9edc54989d669fba593c608791301af07d379397effa1f0a76cdf9e24c9f
View file https://github.com/samuelkim7/feast/blob/02fe5d64d02f07b0be8be606a2b60f0577e6d225/go/internal/feast/registry/gcs.go
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/feast-dev/feast/pull/5897/{{ revealButtonHref }}
https://github.com/feast-dev/feast/pull/5897/files#diff-625d9edc54989d669fba593c608791301af07d379397effa1f0a76cdf9e24c9f
https://github.com/feast-dev/feast/pull/5897/files#diff-625d9edc54989d669fba593c608791301af07d379397effa1f0a76cdf9e24c9f
https://github.com/feast-dev/feast/blob/master/CODEOWNERS#L6
go/internal/feast/registry/s3.gohttps://github.com/feast-dev/feast/pull/5897/files#diff-07244ff1695c53374eb8068c10a5ce5d78bdcbb4abd4577022c506078b89d6b9
View file https://github.com/samuelkim7/feast/blob/02fe5d64d02f07b0be8be606a2b60f0577e6d225/go/internal/feast/registry/s3.go
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/feast-dev/feast/pull/5897/{{ revealButtonHref }}
https://github.com/feast-dev/feast/pull/5897/files#diff-07244ff1695c53374eb8068c10a5ce5d78bdcbb4abd4577022c506078b89d6b9
https://github.com/feast-dev/feast/pull/5897/files#diff-07244ff1695c53374eb8068c10a5ce5d78bdcbb4abd4577022c506078b89d6b9
Please reload this pagehttps://github.com/feast-dev/feast/pull/5897/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.