0.9.11-beta: SchemaIntegrityVerifier false positives on Schema/AllTablesInSchema grants + text column ::text default
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 48/100
Hướng nghiên cứu
Start at SchemaIntegrityVerifier and its InspectSchemaGrants entry point, using the documented dotnet DataProviderMigrate command and PostgreSQL queries to reproduce both false positives. Review scripts/migrate_schema.py for the current workaround. Done means Schema and AllTablesInSchema grants are recognised, text defaults compare consistently, and repeated migrations converge without integrity failures.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Repro
YAML schema with:
grants:
- schema: public
target: Schema
privileges: [USAGE]
roles: [app_user, app_admin]
- schema: public
target: AllTablesInSchema
privileges: [SELECT, INSERT, UPDATE, DELETE]
roles: [app_user, app_admin]
Run dotnet DataProviderMigrate --schema schema.yaml --output "<postgres-dsn>" --provider postgres.
Expected
Migration converges. SchemaIntegrityVerifier reports clean.
Actual
Migration completed successfully
SCHEMA INTEGRITY CHECK FAILED
grant Schema public: missing grant
grant AllTablesInSchema public: missing grant
Exit code 1. Re-running is non-converging — the verifier reports the same missing grants on every run.
Verification that the grants are actually applied
-- Schema USAGE: explicit grant present in nspacl
SELECT nspname, nspacl FROM pg_namespace WHERE nspname='public';
-- public | {... app_user=U/pg_database_owner, app_admin=U/pg_database_owner}
-- has_schema_privilege() returns true
SELECT has_schema_privilege('app_user', 'public', 'USAGE'); -- t
SELECT has_schema_privilege('app_admin', 'public', 'USAGE'); -- t
-- Table grants: every public table shows arwd in relacl for both roles
SELECT relname, relacl
FROM pg_class
WHERE relnamespace='public'::regnamespace AND relkind='r' LIMIT 1;
-- users | {... app_user=arwd/postgres, app_admin=arwd/postgres}
So the migrate step applies the grants correctly. The verifier's InspectSchemaGrants simply doesn't recognise the applied state.
Side issue (also new in 0.9.11): text column defaults
defaultValue: "'generating'" in YAML round-trips to 'generating'::text in information_schema.columns.column_default (Postgres normalises text literals). The verifier reports:
public.sites.status: default expected 'generating' but found 'generating'::text
Workaround: spell the YAML as defaultValue: "'generating'::text". The verifier should ideally strip the ::text cast (or apply the same normalisation to both sides) before comparing.
Environment
- DataProviderMigrate 0.9.11-beta
- Postgres 16 (Supabase docker stack)
- Same YAML migrates cleanly under 0.9.10-beta (the verifier step appears to be new in 0.9.11).
Workaround we're shipping
Until this lands we invoke dotnet DataProviderMigrate via a Python wrapper that swallows exactly the two known false-positive lines after asserting Migration completed successfully is in stdout — see scripts/migrate_schema.py. Happy to delete the wrapper once the verifier is fixed.
- Ngôn ngữ chính
- C#
- Star
- 68
- Fork
- 4
- Merge trung bình
- 50 phút
- Pull request đã merge (30 ngày)
- 2
Chuẩn bị môi trường
Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của Nimblesite/DataProvider
-
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 92/100
Nimblesite/DataProvider#137 · 3 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
Nimblesite/DataProvider#72 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
Nimblesite/DataProvider#121 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 55/100
Nimblesite/DataProvider#108 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
A check constraint the schema cannot name can never be retired, and keeps enforcing the old ruleĐang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
Nimblesite/DataProvider#107 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của Nimblesite/DataProvider
Issue tương tự
-
kronos:develop:queued priority:P0
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
nopSolutions/nopCommerce#8512 ·
Maintainer thường phản hồi trong vòng 4 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
modelcontextprotocol/csharp-sdk#2061 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
Maintainer thường phản hồi trong vòng 1 ngày