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

Trivial minor issue | A confirmation log of having written successfully the dns cache ttl setting in JVM setting file must get printed only after it has successfully done so and not before. #418

Open
hkiiita opened this issue Aug 30, 2024 · 0 comments

Comments

@hkiiita
Copy link

hkiiita commented Aug 30, 2024

Issue: Confirmation Log Order

https://github.com/paketo-buildpacks/libjvm/blob/main/helper/link_local_dns.go#L54
In the Execute function of the LinkLocalDNS type, the log message indicating that JVM DNS caching has been disabled is printed before the function has successfully written the changes to the JVM settings file. The confirmation log should only be printed after successfully writing to the file.

Expected Behavior

The confirmation log message should only be printed after the DNS settings have been successfully written to the file. If an error occurs while opening or writing to the file, the function should not log the confirmation message and should instead return an appropriate error.

Current Behavior

The function logs l.Logger.Info("JVM DNS caching disabled in favor of link-local DNS caching") before ensuring that the DNS settings have been correctly written to the specified file. This log message may appear even if the file write operation fails.

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

No branches or pull requests

1 participant