haraka / haraka-net-utils

haraka network utilities
https://www.npmjs.com/package/haraka-net-utils
MIT License
2 stars 13 forks source link

is_local_host refactoring to return a promise #65

Closed DoobleD closed 2 years ago

DoobleD commented 2 years ago

Refactors is_local_host to use promises.

This makes its use easier in Haraka/outbound/mx_lookup.js, though I'm not sure this complies with the project code guidelines as I haven't seen use of promises elsewhere in it so far.

msimerson commented 2 years ago

Looks fine, please also bump the version number and update Changes.md.

DoobleD commented 2 years ago

Looks fine, please also bump the version number and update Changes.md.

Thanks for the feedback @msimerson. It's done. I've also updated the required version of haraka-net-utils in https://github.com/haraka/Haraka/pull/3010 but that seems to break the CI on that PR. Should I remove the last commit there?

msimerson commented 2 years ago

Should I remove the last commit there?

Nah, after publishing this version that test will pass.

msimerson commented 2 years ago

Your test addition is sometimes failing:

Screen Shot 2022-01-04 at 12 29 57 PM

Unfortunately, DNS within GHA (and Travis before) is sometimes less than speedy. We've learned by trial and error to not introduce too many DNS tests.

DoobleD commented 2 years ago

Your test addition is sometimes failing:

Screen Shot 2022-01-04 at 12 29 57 PM

Unfortunately, DNS within GHA (and Travis before) is sometimes less than speedy. We've learned by trial and error to not introduce too many DNS tests.

Thanks @msimerson, makes sense, I've just removed the faulty test.