René's URL Explorer Experiment


Title: Unable to `feast apply` when using SQL Registry · Issue #3000 · feast-dev/feast · GitHub

Open Graph Title: Unable to `feast apply` when using SQL Registry · Issue #3000 · feast-dev/feast

X Title: Unable to `feast apply` when using SQL Registry · Issue #3000 · feast-dev/feast

Description: Expected Behavior Using a SQL registry, we should be able to run feast apply more than once for a given project, so that feast can identify the diff between the existing registry and project. Current Behavior When using a SQL registry, r...

Open Graph Description: Expected Behavior Using a SQL registry, we should be able to run feast apply more than once for a given project, so that feast can identify the diff between the existing registry and project. Curre...

X Description: Expected Behavior Using a SQL registry, we should be able to run feast apply more than once for a given project, so that feast can identify the diff between the existing registry and project. Curre...

Opengraph URL: https://github.com/feast-dev/feast/issues/3000

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Unable to `feast apply` when using SQL Registry","articleBody":"## Expected Behavior \r\nUsing a SQL registry, we should be able to run `feast apply` more than once for a given project, so that feast can identify the diff between the existing registry and project.\r\n\r\n## Current Behavior\r\nWhen using a SQL registry, running `feast apply` for the first time works. However, when running it again, it returns the following error:\r\n```\r\nTraceback (most recent call last):\r\n  File \"/Users/charleslariviere/.local/share/virtualenvs/data-feature-store-QM-Cj6mZ/bin/feast\", line 8, in \u003cmodule\u003e\r\n    sys.exit(cli())\r\n  File \"/Users/charleslariviere/.local/share/virtualenvs/data-feature-store-QM-Cj6mZ/lib/python3.8/site-packages/click/core.py\", line 1137, in __call__\r\n    return self.main(*args, **kwargs)\r\n  File \"/Users/charleslariviere/.local/share/virtualenvs/data-feature-store-QM-Cj6mZ/lib/python3.8/site-packages/click/core.py\", line 1062, in main\r\n    rv = self.invoke(ctx)\r\n  File \"/Users/charleslariviere/.local/share/virtualenvs/data-feature-store-QM-Cj6mZ/lib/python3.8/site-packages/click/core.py\", line 1668, in invoke\r\n    return _process_result(sub_ctx.command.invoke(sub_ctx))\r\n  File \"/Users/charleslariviere/.local/share/virtualenvs/data-feature-store-QM-Cj6mZ/lib/python3.8/site-packages/click/core.py\", line 1404, in invoke\r\n    return ctx.invoke(self.callback, **ctx.params)\r\n  File \"/Users/charleslariviere/.local/share/virtualenvs/data-feature-store-QM-Cj6mZ/lib/python3.8/site-packages/click/core.py\", line 763, in invoke\r\n    return __callback(*args, **kwargs)\r\n  File \"/Users/charleslariviere/.local/share/virtualenvs/data-feature-store-QM-Cj6mZ/lib/python3.8/site-packages/click/decorators.py\", line 26, in new_func\r\n    return f(get_current_context(), *args, **kwargs)\r\n  File \"/Users/charleslariviere/.local/share/virtualenvs/data-feature-store-QM-Cj6mZ/lib/python3.8/site-packages/feast/cli.py\", line 492, in apply_total_command\r\n    apply_total(repo_config, repo, skip_source_validation)\r\n  File \"/Users/charleslariviere/.local/share/virtualenvs/data-feature-store-QM-Cj6mZ/lib/python3.8/site-packages/feast/usage.py\", line 274, in wrapper\r\n    return func(*args, **kwargs)\r\n  File \"/Users/charleslariviere/.local/share/virtualenvs/data-feature-store-QM-Cj6mZ/lib/python3.8/site-packages/feast/repo_operations.py\", line 305, in apply_total\r\n    apply_total_with_repo_instance(\r\n  File \"/Users/charleslariviere/.local/share/virtualenvs/data-feature-store-QM-Cj6mZ/lib/python3.8/site-packages/feast/repo_operations.py\", line 265, in apply_total_with_repo_instance\r\n    registry_diff, infra_diff, new_infra = store.plan(repo)\r\n  File \"/Users/charleslariviere/.local/share/virtualenvs/data-feature-store-QM-Cj6mZ/lib/python3.8/site-packages/feast/usage.py\", line 285, in wrapper\r\n    raise exc.with_traceback(traceback)\r\n  File \"/Users/charleslariviere/.local/share/virtualenvs/data-feature-store-QM-Cj6mZ/lib/python3.8/site-packages/feast/usage.py\", line 274, in wrapper\r\n    return func(*args, **kwargs)\r\n  File \"/Users/charleslariviere/.local/share/virtualenvs/data-feature-store-QM-Cj6mZ/lib/python3.8/site-packages/feast/feature_store.py\", line 708, in plan\r\n    current_infra_proto = self._registry.proto().infra.__deepcopy__()\r\n  File \"/Users/charleslariviere/.local/share/virtualenvs/data-feature-store-QM-Cj6mZ/lib/python3.8/site-packages/feast/infra/registry_stores/sql.py\", line 666, in proto\r\n    r.infra.CopyFrom(self.get_infra(project).to_proto())\r\n  File \"/Users/charleslariviere/.local/share/virtualenvs/data-feature-store-QM-Cj6mZ/lib/python3.8/site-packages/feast/infra/registry_stores/sql.py\", line 558, in get_infra\r\n    return self._get_object(\r\n  File \"/Users/charleslariviere/.local/share/virtualenvs/data-feature-store-QM-Cj6mZ/lib/python3.8/site-packages/feast/infra/registry_stores/sql.py\", line 774, in _get_object\r\n    raise not_found_exception(name, project)\r\nTypeError: 'NoneType' object is not callable\r\n```\r\n\r\nThis error is raised because of what looks like a bug in `SqlRegistry.get_infra()`. Indeed, `SqlRegistry.get_infra()` calls `SqlRegistry._get_object()` but passing `None` for the `not_found_exception` argument.\r\n[feast/infra/registry_stores/sql.py\r\n](https://github.com/feast-dev/feast/blob/31be8e8965444ce52c16542bf3983093514d0abb/sdk/python/feast/infra/registry_stores/sql.py#L562)\r\n```python\r\n    ...\r\n    def get_infra(self, project: str, allow_cache: bool = False) -\u003e Infra:\r\n        return self._get_object(\r\n            managed_infra,\r\n            \"infra_obj\",\r\n            project,\r\n            InfraProto,\r\n            Infra,\r\n            \"infra_name\",\r\n            \"infra_proto\",\r\n            \u003e\u003e\u003e\u003e None, \u003c\u003c\u003c\u003c\r\n        )\r\n    ...\r\n    def _get_object(\r\n        self,\r\n        table,\r\n        name,\r\n        project,\r\n        proto_class,\r\n        python_class,\r\n        id_field_name,\r\n        proto_field_name,\r\n        \u003e\u003e\u003e not_found_exception \u003c\u003c\u003c,\r\n    ):\r\n        self._maybe_init_project_metadata(project)\r\n\r\n        with self.engine.connect() as conn:\r\n            stmt = select(table).where(\r\n                getattr(table.c, id_field_name) == name, table.c.project_id == project\r\n            )\r\n            row = conn.execute(stmt).first()\r\n            if row:\r\n                _proto = proto_class.FromString(row[proto_field_name])\r\n                return python_class.from_proto(_proto)\r\n        \u003e\u003e\u003e raise not_found_exception(name, project) \u003c\u003c\u003c\r\n```\r\nSince no rows are returned for the `managed_infra` table, `_get_object` attempts to raise an error with the `not_found_exception` callable provided, but since `None` was provided, it is unable to raise the error correctly.\r\n\r\nThis seems to be hiding the actual error, which is that no rows are returned from the `managed_infra` table, which I can confirm is indeed empty in the SQL backend. I've provided my `feature_store.yaml` configuration below -- is the expectation that something should be created in the `managed_infra` table?\r\n\r\n## Steps to reproduce\r\n`feature_store.yaml`\r\n```yaml\r\nproject: feature_store\r\nprovider: local\r\nregistry:\r\n    registry_type: sql\r\n    path: postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@${POSTGRES_HOST}:${POSTGRES_PORT}/${POSTGRES_DATABASE}\r\noffline_store:\r\n    type: snowflake.offline\r\n    account: ${SNOWFLAKE_ACCOUNT}\r\n    user: ${SNOWFLAKE_USER}\r\n    password: ${SNOWFLAKE_PASSWORD}\r\n    role: ${SNOWFLAKE_ROLE}\r\n    warehouse: ${SNOWFLAKE_WAREHOUSE}\r\n    database: ${SNOWFLAKE_DATABASE}\r\n    schema: ${SNOWFLAKE_SCHEMA}\r\nonline_store:\r\n    type: redis\r\n    redis_type: redis\r\n    connection_string: \"${REDIS_HOST}:${REDIS_PORT},password=${REDIS_PASSWORD}\"\r\n```\r\n\r\nRun the following commands:\r\n```\r\nfeast apply # works\r\nfeast apply # raises the error above\r\n```\r\n\r\n### Specifications\r\n\r\n- Version: 0.22.1\r\n- Platform: macOS\r\n- Subsystem: 12.4\r\n\r\n## Possible Solution\r\n\r\n","author":{"url":"https://github.com/chasleslr","@type":"Person","name":"chasleslr"},"datePublished":"2022-08-02T18:04:14.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":4},"url":"https://github.com/3000/feast/issues/3000"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:79c98bfb-f5cd-0fc0-da72-04a5cce345cf
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idC21E:195C9E:3FBEE2:55A98B:697946E1
html-safe-nonce7a6ef9731166da97c85fd4d18b3008c1beb8e1182321b215076fbd66bef07c7d
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDMjFFOjE5NUM5RTozRkJFRTI6NTVBOThCOjY5Nzk0NkUxIiwidmlzaXRvcl9pZCI6IjY2MjE5MDQ1MTA1NzY1NzYyMjUiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac83405fba01bf77bfa8199864fbf1c4902b75a13d2a9e7d42383d4094cd47b5d2
hovercard-subject-tagissue:1326214173
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/feast-dev/feast/3000/issue_layout
twitter:imagehttps://opengraph.githubassets.com/30730515b626a8b3a8d40c010ab59c16d8763da2cc3a9336baecd0f8603d10fe/feast-dev/feast/issues/3000
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/30730515b626a8b3a8d40c010ab59c16d8763da2cc3a9336baecd0f8603d10fe/feast-dev/feast/issues/3000
og:image:altExpected Behavior Using a SQL registry, we should be able to run feast apply more than once for a given project, so that feast can identify the diff between the existing registry and project. Curre...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamechasleslr
hostnamegithub.com
expected-hostnamegithub.com
Nonef9bf80f4f4d71a2f9361692e65b326c887a4b25c15fe127257a2d331d14031bd
turbo-cache-controlno-preview
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
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release4aabbf3f1d27b754d95d7a9a6e02d14a5aaeb4e6
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/feast-dev/feast/issues/3000#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Ffeast-dev%2Ffeast%2Fissues%2F3000
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub SparkBuild and deploy intelligent appshttps://github.com/features/spark
GitHub ModelsManage and compare promptshttps://github.com/features/models
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
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
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/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%2Fissues%2F3000
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%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=feast-dev%2Ffeast
Reloadhttps://github.com/feast-dev/feast/issues/3000
Reloadhttps://github.com/feast-dev/feast/issues/3000
Reloadhttps://github.com/feast-dev/feast/issues/3000
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.2k https://github.com/login?return_to=%2Ffeast-dev%2Ffeast
Star 6.7k https://github.com/login?return_to=%2Ffeast-dev%2Ffeast
Code https://github.com/feast-dev/feast
Issues 181 https://github.com/feast-dev/feast/issues
Pull requests 68 https://github.com/feast-dev/feast/pulls
Discussions https://github.com/feast-dev/feast/discussions
Actions https://github.com/feast-dev/feast/actions
Security 0 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 https://github.com/feast-dev/feast/security
Insights https://github.com/feast-dev/feast/pulse
New issuehttps://github.com/login?return_to=https://github.com/feast-dev/feast/issues/3000
New issuehttps://github.com/login?return_to=https://github.com/feast-dev/feast/issues/3000
#3022https://github.com/feast-dev/feast/pull/3022
Unable to feast apply when using SQL Registryhttps://github.com/feast-dev/feast/issues/3000#top
#3022https://github.com/feast-dev/feast/pull/3022
https://github.com/achals
criticalhttps://github.com/feast-dev/feast/issues?q=state%3Aopen%20label%3A%22critical%22
kind/bughttps://github.com/feast-dev/feast/issues?q=state%3Aopen%20label%3A%22kind%2Fbug%22
priority/p2https://github.com/feast-dev/feast/issues?q=state%3Aopen%20label%3A%22priority%2Fp2%22
https://github.com/chasleslr
https://github.com/chasleslr
chasleslrhttps://github.com/chasleslr
on Aug 2, 2022https://github.com/feast-dev/feast/issues/3000#issue-1326214173
feast/infra/registry_stores/sql.py https://github.com/feast-dev/feast/blob/31be8e8965444ce52c16542bf3983093514d0abb/sdk/python/feast/infra/registry_stores/sql.py#L562
achalshttps://github.com/achals
criticalhttps://github.com/feast-dev/feast/issues?q=state%3Aopen%20label%3A%22critical%22
kind/bughttps://github.com/feast-dev/feast/issues?q=state%3Aopen%20label%3A%22kind%2Fbug%22
priority/p2https://github.com/feast-dev/feast/issues?q=state%3Aopen%20label%3A%22priority%2Fp2%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

Viewport: width=device-width


URLs of crawlers that visited me.