hashgraph / hashgraph/solo-weaver
kubelet_installer.go improvements
- Dominant language
- Go
- Stars
- 3
- Forks
- 0
- Avg merge
- 3d 2h
- Merged PRs (30d)
- 46
Description
When we return false, we should return a custom error so we know which validation failed. Otherwise it would be difficult to debug. At the caller side we don't need to check for false, only check and handle error (e.g. check error type and decide). If there is no error, then it is true.
We may need to apply this behaviour wherever we have a function that returns (bool, error). I may have implemented such methods as well.. So we need to address this separately.
_Originally posted by @leninmehedy in https://github.com/hashgraph/solo-provisioner/pull/175#discussion_r2493144915_
----
`IsConfigured` performs various checks. So if it returns `false`, it should return a custom error with a proper message for easier handling and debugging.
For example, here if we receive `false`, we don't know if it is because it failed at the `.latest` check or `symlink` check. So looking at the log, it would be tricky to understand.
_Originally posted by @leninmehedy in https://github.com/hashgraph/solo-provisioner/pull/175#discussion_r2493141728_
----
`isBinaryConfigured` is a bit confusing since we have binary and configuration and looking at this name I thought it would check both binary symlinks and configuration.
Since it is only checking if binary is located correctly or not, it could have a name like `isBinaryInstalled` (where installed means symlinked and checksum match), or something similar
_Originally posted by @leninmehedy in https://github.com/hashgraph/solo-provisioner/pull/175#discussion_r2493132797_
Contributor guide
Assessment
This issue has not been assessed yet.