Skip to content

Conversation

@aleksandarskrbic
Copy link

@aleksandarskrbic aleksandarskrbic commented Nov 19, 2025

What kind of change does this PR introduce?

Fixes #34

What is the new behavior?

Added:

  • Request validation for publication creation and updates. Publications now validate that names and table schemas/names are not empty or whitespace-only.
  • Validation to prevent publications with unsupported PostgreSQL column types (like custom enums).
  • Test suite covering all publication CRUD operations, validation edge cases, and unsupported column type scenarios.

@aleksandarskrbic aleksandarskrbic requested a review from a team as a code owner November 19, 2025 23:53
@iambriccardo
Copy link
Contributor

@codex review

@iambriccardo
Copy link
Contributor

Thanks for the contribution, I will review it as soon as I get to it!

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines 717 to 721
name: "test_publication".to_string(),
tables: vec![],
};
app.create_publication(&tenant_id, source_id, &publication)
.await;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge delete_publication_succeeds never sets up a valid publication

This test now builds a publication request with tables: vec![], but the new validate_publication helper rejects empty table lists (lines 319‑340 in the handler), so the setup call returns 400 and no publication is created. Because delete_publication issues DROP PUBLICATION IF EXISTS, the delete and subsequent 404 read both succeed even when deletion of an existing publication is broken, so the test no longer exercises the real success path. Populate the publication with at least one table before deleting so the scenario is meaningful.

Useful? React with 👍 / 👎.

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.

Do not allow creating a publication which includes tables with unsupported column types

2 participants