-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1248 from isomerpages/release_v0.73.0
* chore(package): use npm (#1237) * fix: upgrade dotenv from 16.4.1 to 16.4.5 (#1233) Snyk has created this PR to upgrade dotenv from 16.4.1 to 16.4.5. See this package in npm: https://www.npmjs.com/package/dotenv See this project in Snyk: https://app.snyk.io/org/isomer/project/676b9e26-cebf-4964-b7b3-d9843e3339ff?utm_source=github&utm_medium=referral&page=upgrade-pr Co-authored-by: snyk-bot <[email protected]> * build(deps): bump express from 4.17.3 to 4.19.2 (#1242) Bumps [express](https://github.com/expressjs/express) from 4.17.3 to 4.19.2. - [Release notes](https://github.com/expressjs/express/releases) - [Changelog](https://github.com/expressjs/express/blob/master/History.md) - [Commits](expressjs/express@4.17.3...4.19.2) --- updated-dependencies: - dependency-name: express dependency-type: direct:production ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * fix: package.json & package-lock.json to reduce vulnerabilities (#1241) The following vulnerabilities are fixed with an upgrade: - https://snyk.io/vuln/SNYK-JS-EXPRESS-6474509 Co-authored-by: snyk-bot <[email protected]> * fix: upgrade @growthbook/growthbook from 0.27.0 to 0.34.0 (#1232) Snyk has created this PR to upgrade @growthbook/growthbook from 0.27.0 to 0.34.0. See this package in npm: https://www.npmjs.com/package/@growthbook/growthbook See this project in Snyk: https://app.snyk.io/org/isomer/project/676b9e26-cebf-4964-b7b3-d9843e3339ff?utm_source=github&utm_medium=referral&page=upgrade-pr Co-authored-by: snyk-bot <[email protected]> * fix: upgrade @aws-sdk/client-dynamodb from 3.501.0 to 3.521.0 (#1229) Snyk has created this PR to upgrade @aws-sdk/client-dynamodb from 3.501.0 to 3.521.0. See this package in npm: https://www.npmjs.com/package/@aws-sdk/client-dynamodb See this project in Snyk: https://app.snyk.io/org/isomer/project/676b9e26-cebf-4964-b7b3-d9843e3339ff?utm_source=github&utm_medium=referral&page=upgrade-pr Co-authored-by: snyk-bot <[email protected]> * fix: upgrade @aws-sdk/client-amplify from 3.501.0 to 3.521.0 (#1230) Snyk has created this PR to upgrade @aws-sdk/client-amplify from 3.501.0 to 3.521.0. See this package in npm: https://www.npmjs.com/package/@aws-sdk/client-amplify See this project in Snyk: https://app.snyk.io/org/isomer/project/676b9e26-cebf-4964-b7b3-d9843e3339ff?utm_source=github&utm_medium=referral&page=upgrade-pr Co-authored-by: snyk-bot <[email protected]> * fix: upgrade @aws-sdk/client-cloudwatch-logs from 3.501.0 to 3.521.0 (#1231) Snyk has created this PR to upgrade @aws-sdk/client-cloudwatch-logs from 3.501.0 to 3.521.0. See this package in npm: https://www.npmjs.com/package/@aws-sdk/client-cloudwatch-logs See this project in Snyk: https://app.snyk.io/org/isomer/project/676b9e26-cebf-4964-b7b3-d9843e3339ff?utm_source=github&utm_medium=referral&page=upgrade-pr Co-authored-by: snyk-bot <[email protected]> * fix(dockerfile): add dig to image (#1244) * feat(dd): add traces to gitfilesysteM (#1240) * feat(dd): adding in metrics to gitfilesystem * feat: instrument with wrap-tracers * feat: patch dd-trace to understand neverthrow * fix: missing tracer import * fix: use the clear tracer.wrap() method * fix(dd): fix patch type * chore: add tests for tracer compatibility with neverthrow * chore: upgrade dd-trace to v5 and patch for neverthrow * chore: remove unecessary change from patch * feat: implement a blacklist for methods that should not be instrumented * chore: remove obsolete patch * chore: lock dd-trace to 5.9.0 strictly so patch is always applied --------- Co-authored-by: Timothee Groleau <[email protected]> * fix: reduce log size to just last commit (#1243) * fix: reduce log size to just last commit * feat: defaults maxCount in getGitLog to 1 * chore(GitFileSystemService): add validation tests for getGitLog * chore(dep): add flag (#1247) * chore: bump version to v0.73.0 --------- Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: seaerchin <[email protected]> Co-authored-by: Isomer Admin <[email protected]> Co-authored-by: snyk-bot <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Timothee Groleau <[email protected]> Co-authored-by: Timothee Groleau <[email protected]>
- Loading branch information
Showing
8 changed files
with
1,108 additions
and
768 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
diff --git a/node_modules/dd-trace/packages/dd-trace/src/tracer.js b/node_modules/dd-trace/packages/dd-trace/src/tracer.js | ||
index 63c60e8..49b5b7e 100644 | ||
--- a/node_modules/dd-trace/packages/dd-trace/src/tracer.js | ||
+++ b/node_modules/dd-trace/packages/dd-trace/src/tracer.js | ||
@@ -73,7 +73,19 @@ class DatadogTracer extends Tracer { | ||
|
||
const result = this.scope().activate(span, () => fn(span)) | ||
|
||
- if (result && typeof result.then === 'function') { | ||
+ if (result && typeof result.andThen === 'function') { | ||
+ return result | ||
+ .map(value => { | ||
+ span.finish() | ||
+ return value | ||
+ }) | ||
+ .mapErr(error => { | ||
+ addError(span, error) | ||
+ span.finish() | ||
+ return error | ||
+ }); | ||
+ } | ||
+ else if (result && typeof result.then === 'function') { | ||
return result.then( | ||
value => { | ||
span.finish() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
// @ts-nocheck | ||
|
||
/* | ||
this test file is not testing our own code. | ||
Because dd-trace is not compatible with neverthrow, we introduced a patch to fix dd-trace itself. | ||
This test file verifies that the patch we apply does what it intends to, which is to retain the neverthrow | ||
interface when code that is traced or wrapped return a neverthrow ResultAsync result. | ||
*/ | ||
|
||
import tracer from "dd-trace" | ||
import { errAsync, okAsync } from "neverthrow" | ||
|
||
describe("NeverThrow compatibility", () => { | ||
describe("tracer.trace()", () => { | ||
it("should maintain the neverthrow interface for ok results", async () => { | ||
const resultAsync = tracer.trace("foo", () => okAsync(1)) | ||
|
||
expect(resultAsync.then).toBeDefined() // promise interface | ||
expect(resultAsync.andThen).toBeDefined() // neverthrow interface | ||
expect(resultAsync.orElse).toBeDefined() | ||
|
||
const res = await resultAsync | ||
|
||
expect(res.isOk()).toStrictEqual(true) | ||
expect(res.unwrapOr(0)).toStrictEqual(1) | ||
}) | ||
|
||
it("should maintain the neverthrow interface for error results", async () => { | ||
const resultAsync = tracer.trace("foo", () => | ||
errAsync(new Error("foo error")) | ||
) | ||
|
||
expect(resultAsync.then).toBeDefined() // promise interface | ||
expect(resultAsync.andThen).toBeDefined() // neverthrow interface | ||
expect(resultAsync.orElse).toBeDefined() | ||
|
||
const res = await resultAsync | ||
|
||
expect(res.isOk()).toStrictEqual(false) | ||
expect(res.isErr()).toStrictEqual(true) | ||
|
||
expect(res.error.message).toStrictEqual("foo error") | ||
}) | ||
}) | ||
|
||
describe("tracer.wrap()", () => { | ||
it("should maintain the neverthrow interface for ok results", async () => { | ||
const foo = () => okAsync(1) | ||
const wrappedFoo = tracer.wrap("foo", foo) | ||
|
||
const resultAsync = wrappedFoo() | ||
|
||
expect(resultAsync.then).toBeDefined() // promise interface | ||
expect(resultAsync.andThen).toBeDefined() // neverthrow interface | ||
expect(resultAsync.orElse).toBeDefined() | ||
|
||
const res = await resultAsync | ||
|
||
expect(res.isOk()).toStrictEqual(true) | ||
expect(res.unwrapOr(0)).toStrictEqual(1) | ||
}) | ||
|
||
it("should maintain the neverthrow interface for error results", async () => { | ||
const foo = () => errAsync(new Error("foo error")) | ||
const wrappedFoo = tracer.wrap("foo", foo) | ||
|
||
const resultAsync = wrappedFoo() | ||
|
||
expect(resultAsync.then).toBeDefined() // promise interface | ||
expect(resultAsync.andThen).toBeDefined() // neverthrow interface | ||
expect(resultAsync.orElse).toBeDefined() | ||
|
||
const res = await resultAsync | ||
|
||
expect(res.isOk()).toStrictEqual(false) | ||
expect(res.isErr()).toStrictEqual(true) | ||
|
||
expect(res.error.message).toStrictEqual("foo error") | ||
}) | ||
}) | ||
}) |