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

Fix Segfault with MSK new 3.7.x version candidates #7

Merged
merged 2 commits into from
Jul 15, 2024

Conversation

Jumanjii
Copy link
Contributor

Why

AWS changed their version naming convention on
MSK
leading to a new 3.7.x version candidate for upgrade (automatic patch update handled by AWS)

This generates Segfault in this application with the go-version/semver library not parsing it correctly.

We fixed this issue by updating the MSK handler to replace those 'x' version parts with a valid number.

Because AWS is handling all patch versions, replacing it with 0 should produce the expected result we want on the upgrade manager service.

How

  • Update MSK source version connector to handle semver containing 'x'
  • Update the semver Sort function to return a proper error instead of crashing with segfault
  • The codebase already expose a metric with the number of processingError. Alert can be built on this metric to be notified of future version issues without having the application crash and failing to produce reports for all other monitored source

## Why
AWS [changed their version naming convention on
MSK](https://docs.aws.amazon.com/msk/latest/developerguide/supported-kafka-versions.html#3.7.kraft)
leading to a new 3.7.x version candidate for upgrade (automatic patch
update handled by AWS)

This is generating Segfault in this application with the
go-version/semver library not parsing it correctly.

We fixed this issue updating MSK handler to replace those 'x' version
part by a valid number.

Because AWS is handling all patch version, replacing by `0` should
produce the expected result we want on the upgrade manager service.

## How
- Update MSK source version connector to handle semver containing 'x'
- Update the semver Sort function to return proper error instead of
crashing with segfault
- The codebase already [expose a metric with the number of
processingError](https://github.com/qonto/upgrade-manager/blob/main/internal/app/app.go#L281).
Alert can be built on this metric to be notified of future version issue
without having the application crashing and failing to produce report
for all other monitored source

Signed-off-by: Allan Jacquet-Cretides <[email protected]>
@Jumanjii Jumanjii force-pushed the fix-msk-dot-x-version-segfault branch from 9190def to 021b303 Compare July 15, 2024 13:50
Signed-off-by: Allan Jacquet-Cretides <[email protected]>
@Jumanjii Jumanjii force-pushed the fix-msk-dot-x-version-segfault branch from b9f7caa to e1c3aa5 Compare July 15, 2024 14:03
@Jumanjii
Copy link
Contributor Author

#sre

@Jumanjii Jumanjii merged commit 445f1c1 into main Jul 15, 2024
3 checks passed
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.

1 participant