thanos
thanos copied to clipboard
port codebase to adapt to new thanos errors pkg replacing github.com/pkg/errors
In continuation of #5239
Related Issue: closes #5176
- [ ] I added CHANGELOG entry for this change.
- [x] Change is not relevant to the end user.
Changes
- Replace old github.com/pkg/errors import
- Update New,Errorf ->
Newfand Wrap ->Wrapf - Pr #5239, depends on
github.com/thanos-io/thanos/pkg/testutilinternal pkg leading to give rise of cyclic dependency - Fixed
Used the following snippet to automate the replacement and then a make format with manual imports ordering
for file in $(git grep -l "github.com/pkg/errors" | grep ".go"); do
sed -i 's/errors\.Wrap(/errors\.Wrapf(/g' $file
sed -i 's/errors\.Errorf(/errors\.Newf(/g' $file
sed -i 's/errors\.New(/errors\.Newf(/g' $file
sed -i 's/github\.com\/pkg\/errors/github\.com\/thanos-io\/thanos\/pkg\/errors/g' $file
echo "$file processing done"
done
Verification
make lint && make build works successfully
Thanks a lot for this effort! I wonder if we should do this port in one go, or split it component-wise somehow. 🙂 Also, test failures seem related!
Would you like to push this forward @bisakhmondal? 🙂
Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward?
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
What's the status of this?
the code has been ported to https://github.com/efficientgo/core I think once @bwplotka finalizes the APIs there (had some double thoughts), I can clean it up with the new imports. That's the plan, right? @bwplotka
Still needed
Hello 👋 Looks like there was no activity on this amazing PR for the last 30 days.
Do you mind updating us on the status? Is there anything we can help with? If you plan to still work on it, just comment on this PR or push a commit. Thanks! 🤗
If there will be no activity in the next week, this issue will be closed (we can always reopen a PR if you get back to this!). Alternatively, use remind command if you wish to be reminded at some point in future.
Closing for now as promised, let us know if you need this to be reopened! 🤗