-
Notifications
You must be signed in to change notification settings - Fork 98
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
feat: support restify v9-v11 #1489
feat: support restify v9-v11 #1489
Conversation
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
Warning: This pull request is touching the following templated files:
|
@6utt3rfly, thanks for the contribution. Please take a look at the test failures. For example,
Could you confirm whether you've tested this change locally, and with what versions? |
Restify 9 added async/await support, but it requires that middleware either be `async (req, res)` or `(req, res, next)`, but not both: `async (req, res, next)`. The restify test now avoids async/await and directly uses Promises to maintain backward compatibility with earlier versions of restify
@punya - I had trouble running local unit tests until I saw this PR's build log and realized I needed docker images running (or TRACE_TEST_EXCLUDE_INTEGRATION set). It might be worth adding something to the CONTRIBUTING.md file? The existing restify plugin works if I manually patch the SUPPORTED_VERSIONS. I've pushed a commit to fix the failing unit test by avoiding |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for looking into it @6utt3rfly! I have a couple of small suggestions, but otherwise this looks good to me.
Co-authored-by: Punya Biswal <punya@google.com>
Co-authored-by: Punya Biswal <punya@google.com>
I actually hadn't noticed |
I see some lint failures that should be easy to fix:
But there are also several failing tests (starting at https://github.com/googleapis/cloud-trace-nodejs/actions/runs/4694210640/jobs/8322181339?pr=1489#step:7:2986) that I don't understand. Reading the Restify docs in some more detail, I'm not sure that we're supposed to use 3-argument handlers with Promises (regardless of whether we use I wonder if it might be necessary to have totally different code paths for Restify <= v8 and Restify >= v9. |
Unit tests with restify 9-11 on node 12 reports, "Cannot find node module 'node:process'", which indicates a node compatibility issue
@punya - I'm not sure why the release action hanged (5h 58m!), because it looks like everything passed, but then it didn't get the coverage ... maybe worth just retrying that job? |
🤖 I have created a release *beep* *boop* --- ## [8.0.0](https://github.com/googleapis/cloud-trace-nodejs/compare/v7.1.2...v8.0.0) (2024-02-07) ### ⚠ BREAKING CHANGES * upgrade to Node 14 ([#1517](https://github.com/googleapis/cloud-trace-nodejs/issues/1517)) ### Features * Support restify v9-v11 ([#1489](https://github.com/googleapis/cloud-trace-nodejs/issues/1489)) ([746f30c](https://github.com/googleapis/cloud-trace-nodejs/commit/746f30c084f8e2c9eb9dbaebb017ed3cc30304ca)) ### Bug Fixes * Assert oldMethod existence, and pin typescript version ([#1549](https://github.com/googleapis/cloud-trace-nodejs/issues/1549)) ([66a39fa](https://github.com/googleapis/cloud-trace-nodejs/commit/66a39fac603dbd0ab40afa5266236850124cd21b)) * **deps:** Update dependency require-in-the-middle to v6 ([#1483](https://github.com/googleapis/cloud-trace-nodejs/issues/1483)) ([ddd4bbb](https://github.com/googleapis/cloud-trace-nodejs/commit/ddd4bbb765aaa698ace8ec35ae79331f930a6709)) * **deps:** Update dependency require-in-the-middle to v7 ([#1494](https://github.com/googleapis/cloud-trace-nodejs/issues/1494)) ([58e7821](https://github.com/googleapis/cloud-trace-nodejs/commit/58e7821ce4abcba934431b9623bfef28c17da959)) * Skip flaky test ([#1495](https://github.com/googleapis/cloud-trace-nodejs/issues/1495)) ([bb03060](https://github.com/googleapis/cloud-trace-nodejs/commit/bb03060c6cf6e9d80982dda9dbb62aa3704daedf)), closes [#1334](https://github.com/googleapis/cloud-trace-nodejs/issues/1334) ### Miscellaneous Chores * Upgrade to Node 14 ([#1517](https://github.com/googleapis/cloud-trace-nodejs/issues/1517)) ([8b6c967](https://github.com/googleapis/cloud-trace-nodejs/commit/8b6c967a73eb3ce16b1a4471249f4266db32e478)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
Fixes #1488
(see also #1250 for reference)