Skip to content

fix(vega-backend): allow catalog connector config updates#476

Merged
kenlee1988 merged 1 commit into
mainfrom
fix/393-issue
May 20, 2026
Merged

fix(vega-backend): allow catalog connector config updates#476
kenlee1988 merged 1 commit into
mainfrom
fix/393-issue

Conversation

@kenlee1988

@kenlee1988 kenlee1988 commented May 19, 2026

Copy link
Copy Markdown
Contributor

Pull Request

What Changed

Brief description of changes:

  • Remove the connector_config immutable-field check from catalog update.
  • Allow updating catalog connector settings such as database, host, and related connection fields while keeping connector_type and enabled protected.
  • Add a handler test proving connector_config.database can be changed through PUT /catalogs/{id}.
  • Update the Catalog API docs to describe deferred stale marking on the next discover alignment.

Why


How

  • Key implementation points:
    • Removed the immutableFields validation block from updateCatalog.
    • Kept the existing connector_type immutability guard.
    • Kept the existing enabled guard, so enable/disable still uses dedicated endpoints.
    • Documented that stale resource alignment happens later during discover instead of during catalog update.
  • Breaking changes (API, config, database, etc.):
    • Previously rejected connector config changes are now accepted when connector_type and enabled remain unchanged.

Testing

  • Unit tests passed locally
  • Integration tests passed locally
  • Verified in test environment

Test notes:

go test ./driveradapters ./logics/catalog ./logics/resource

Risk & Rollback

  • Potential risks: Clients can now update connector settings that used to be rejected, so follow-up discover runs are responsible for reconciling resources.
  • Rollback plan: Restore the connector config immutable-field validation block and revert the related test/doc updates.

Additional Notes

  • PR diff currently affects catalog_handler.go, catalog_handler_test.go, and catalog.yaml.

@kenlee1988 kenlee1988 changed the title refactor(catalog): remove connector config immutable check, allow par… fix(vega-backend): allow catalog connector config updates May 19, 2026
@kenlee1988 kenlee1988 self-assigned this May 19, 2026
…tial update

移除了 connector_config 的不可变字段校验逻辑,放开对数据库、host等配置字段的修改限制,修改后旧资源会在下次发现对齐时标记为stale,新增对应测试用例验证更新行为
@kenlee1988 kenlee1988 merged commit 94cdfee into main May 20, 2026
2 checks passed
@kenlee1988 kenlee1988 deleted the fix/393-issue branch May 20, 2026 02:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

【vega-backend】【catalog】编辑catalog时,修改database请求报错

2 participants