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: Azure provider error parsing #312

Merged
merged 1 commit into from
Nov 22, 2024

Conversation

mikenairn
Copy link
Member

@mikenairn mikenairn commented Nov 22, 2024

Fixes an issue in the cleanup of azure error messages that could cause a panic.

fixes #311

Fixes an issue in the cleanup of azure error messages that could cause a
panic.

Signed-off-by: Michael Nairn <[email protected]>
if msgBits = strings.Split(msgBits[1], `"`); len(msgBits) > 1 {
msg = msgBits[1]
}
}
Copy link
Member Author

@mikenairn mikenairn Nov 22, 2024

Choose a reason for hiding this comment

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

This whole thing could probably be better done with regular expressions and groupings, but i want to avoid a bigger change here.

Copy link
Collaborator

Choose a reason for hiding this comment

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

bit gross I agree.

Expect(err).ToNot(BeNil())
Expect(err.Error()).To(Equal(""))
},
},
Copy link
Member Author

@mikenairn mikenairn Nov 22, 2024

Choose a reason for hiding this comment

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

Currently it will just return an empty error if it fails the cleanup of the error. It does feel like it should probably just return the unmodified error "some other error" but the point of the cleanup is to avoid request specific data included in the error getting added into the status of the DNSRecord and causing constant updates.

@mikenairn
Copy link
Member Author

The Azure tests don't run automatically on PRs, triggered a separate job for it here to verify

@mikenairn mikenairn requested a review from maleck13 November 22, 2024 10:13
@maleck13 maleck13 added this pull request to the merge queue Nov 22, 2024
Merged via the queue into Kuadrant:main with commit 53115e6 Nov 22, 2024
16 checks passed
@mikenairn mikenairn deleted the fix_azure_err_parser branch November 22, 2024 10:31
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.

bug: Azure provider panic
2 participants