Skip to content

Add validation that table name and all configured fields are valid#9879

Merged
nielsm5 merged 3 commits intomasterfrom
issue/4184_InvalidConfigUsesAllJdbcConnections
Nov 13, 2025
Merged

Add validation that table name and all configured fields are valid#9879
nielsm5 merged 3 commits intomasterfrom
issue/4184_InvalidConfigUsesAllJdbcConnections

Conversation

@tnleeuw
Copy link
Contributor

@tnleeuw tnleeuw commented Nov 11, 2025

Changes

Add validation that table name and all configured fields are valid.

Pull Request Checklist

Issues

Backports

  • N/A

Tests

  • Unit tests added/updated
  • E2E/Integration tests added/updated (N/A)

@tnleeuw tnleeuw self-assigned this Nov 11, 2025
@tnleeuw tnleeuw added the JDBC label Nov 11, 2025
@sonarqubecloud
Copy link

@Override
public void start() {
super.start();
// Validate this in start not configure, because a broken configuration could otherwise prevent the startup of the entire application.
Copy link
Contributor

Choose a reason for hiding this comment

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

Is dat niet juist de bedoeling van configure()?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

To prevent starting an adapter, yes.

But adding this validation to configure() now means the whole application becomes non-functional if the validation fails, and not just the adapter in which the misconfigured listener is placed.

That is probably a bug but something that should be addressed outside this PR so for now I've put this validation here.

Copy link
Member

@nielsm5 nielsm5 Nov 13, 2025

Choose a reason for hiding this comment

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

I think that might be because this is a listener, is that correct?
If so could you add this to ticket #9824 ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think if the configure() of a pipe throws an exception that would also have the same effect, but this is what triggered me to investigate why startup appears to break when a configure() fails.

I'll add this to #9824 .

@nielsm5 nielsm5 merged commit 56a9ccd into master Nov 13, 2025
32 checks passed
@nielsm5 nielsm5 deleted the issue/4184_InvalidConfigUsesAllJdbcConnections branch November 13, 2025 12:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

All available database connections are used when commentField attribute on JdbcTableListener is configured with a non-existing column

3 participants