Skip to content

Conversation

@fpacifici
Copy link

If we have an error in applying one specific topic we serialize the error
in the json output and the parser script manages it properly.

Though, if the whole process fails because the config is invalid,
we do not produce any json and parse_and_notify fails without sending
notifications.

THis prodices a valid json and tries to send a notification when json is invalid

try:
topic = json.loads(line)
except json.JSONDecodeError:
title = f"Topicctl failed to apply in region {SENTRY_REGION}"
Copy link
Member

Choose a reason for hiding this comment

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

can you add the line here? the problem to me is that we don't know the error that comes from topicctl. see #31

Copy link
Author

Choose a reason for hiding this comment

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

Added the whole exception repr in the payload.

Copy link
Author

Choose a reason for hiding this comment

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

By the way. I know the issue. The payload was None because the error was that the config was not consistent

Copy link
Member

Choose a reason for hiding this comment

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

By the way. I know the issue. The payload was None because the error was that the config was not consistent

yeah you do but i still have no idea where to look for topicctl errors, so I think it would be best if the parse_and_notify script just posted all diagnostic info to slack or some other high-vis channel

@fpacifici fpacifici merged commit 9526ae7 into master Sep 9, 2025
10 checks passed
@fpacifici fpacifici deleted the fpacifici/fix_output_parsing branch September 9, 2025 18:33
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