Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DBZ-8367: fix error message: show the correct config-path & format #134

Merged
merged 2 commits into from
Oct 31, 2024

Conversation

paumr
Copy link
Contributor

@paumr paumr commented Oct 28, 2024

When launching debezium-server via:

java -jar ./debezium-server-dist/target/debezium-server-dist-3.0.0-SNAPSHOT-runner.jar io.debezium.server.Main

it errors out with the log-line:

Failed to load mandatory config value 'debezium.sink.type'. Please check you have a correct Debezium server config in /<redacted>/debezium/debezium-server/conf/application.properties or required properties are defined via system or environment variables.

This is broken in two ways:

  • the printed path is wrong. quarkus loads application.properties from the config directory: https://quarkus.io/guides/config-reference
  • the error message is logged via println. LOGGER should be used instead (otherwise depending on the logging-setup the message might be dropped - due to not being json)

This PR fixes both of these issues.

@paumr paumr changed the title fix error message to show the correct config-path & format fix error message: show the correct config-path & format Oct 28, 2024
@Naros
Copy link
Member

Naros commented Oct 28, 2024

Hi @paumr, can you please raise a Jira issue to track this change and update the PR commit messages to be prepended with the Jira issue key?

@jpechane
Copy link
Contributor

Hi, IIRC the System.err was used intentionally to make sure the error is printed even in case of logging misconfiguration.

@paumr
Copy link
Contributor Author

paumr commented Oct 30, 2024

Hi, IIRC the System.err was used intentionally to make sure the error is printed even in case of logging misconfiguration.

Hi, thanks for the information!
Maybe it would make sense to print the error both ways? That way we the message will never be dropped.

@jpechane
Copy link
Contributor

@paumr Makes sense

@paumr paumr force-pushed the fix_config-error-msg branch 2 times, most recently from 9bf03a0 to d872ed3 Compare October 31, 2024 00:17
@paumr paumr force-pushed the fix_config-error-msg branch from d872ed3 to b9a34cc Compare October 31, 2024 11:32
@paumr paumr changed the title fix error message: show the correct config-path & format DBZ-8367: fix error message: show the correct config-path & format Oct 31, 2024
@paumr
Copy link
Contributor Author

paumr commented Oct 31, 2024

As requested I:

  • created a jira issue
  • prepended all commits with the jira ID (and the PR)
  • modified the error message to print to stderr and LOGGER

@jpechane jpechane merged commit e946ae0 into debezium:main Oct 31, 2024
2 checks passed
@jpechane
Copy link
Contributor

@paumr Applied, thanks

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.

3 participants