Skip to content
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

Fixit/main #16

Open
wants to merge 70 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 27 commits
Commits
Show all changes
70 commits
Select commit Hold shift + click to select a range
345eea7
added errortype in the error response to get populated in the response
Aug 17, 2022
b0396c2
added population and addition of headers in request
Aug 17, 2022
bd2db61
added delete and patch methods as well
Aug 18, 2022
c948286
updated the review changes
Aug 23, 2022
3dddb13
added static method to generate requestContext
Aug 26, 2022
15f7e8e
added optional parameter in req context object
Aug 26, 2022
f6b53ac
added uuid
Aug 26, 2022
ef32ba7
added startTime in the request context
Aug 30, 2022
1a8a383
updated the header values
Aug 30, 2022
8d88b80
added changes for version update
Aug 30, 2022
5dd3f87
updated to use axios constructor
Aug 30, 2022
0543e40
reverted hr time
Aug 30, 2022
e14b0e1
added changes for hrtime big int
Aug 30, 2022
cfc34f0
updated the tracing logic
Aug 30, 2022
a8785e9
added req.get for all the headers
Sep 1, 2022
8aa33a8
added span Id and performance api for start time
Sep 7, 2022
9d1c67a
updated the type
Sep 9, 2022
2e03e3d
updated the lenth for span and traceId
Sep 9, 2022
893347e
feat(headers): support headers per request
akshendra Sep 13, 2022
50b28e1
fix(headers): pass headers to makeRequest
akshendra Sep 13, 2022
d0803e0
Add the x-q-debug header, and propagate it b/w requests
Perseus Sep 27, 2022
59c1d07
Add request context token to header
gaurav-chandak Mar 9, 2023
c96cf22
Use class name instead of this while calling static fn
gaurav-chandak Jun 1, 2023
b768d89
Adding path to request context output
Jul 26, 2023
57d23d4
Reverted code change here
Jul 26, 2023
e6272f6
feat: Explicit axios client and custom error handler
shivam-tripathi Nov 28, 2023
478f2f5
feat(fixit): Move to Typescript and merge v0.1.13 and experimental
shivam-tripathi Nov 28, 2023
e717127
feat: Add enum for methods and circuit breaker decorator
shivam-tripathi Nov 29, 2023
9c0a8cf
Adding path in request contexT
Jul 26, 2023
9c0e98b
handle path extraction correctly when routes does not matches
akshendra Sep 26, 2023
4b42f52
Added tests for service communication
abhigupta4 Nov 2, 2023
a47f6e8
Added lint file
abhigupta4 Nov 2, 2023
2bdeaec
revert unused change
abhigupta4 Nov 2, 2023
8d261c9
typo fix
abhigupta4 Nov 2, 2023
2ed1a64
Added test with route field empty
abhigupta4 Nov 6, 2023
e55705b
feat: Explicit axios client and custom error handler
shivam-tripathi Nov 28, 2023
069e284
feat(fixit): Move to Typescript and merge v0.1.13 and experimental
shivam-tripathi Nov 28, 2023
84506f7
Adding circuit breaker
Nov 28, 2023
bea9ca0
Working circuit breaker tests
Nov 29, 2023
04dc207
feat(jest): Config not adapted to current use
shivam-tripathi Nov 30, 2023
df0719d
feat(package.json): Move dev dependencies to it's section
shivam-tripathi Nov 30, 2023
e7bfe49
feat(lock): updated package-lock
shivam-tripathi Nov 30, 2023
7871a46
feat(tsconfig): Formatting
shivam-tripathi Nov 30, 2023
7fffa3a
feat(.vscode): Auto Format
shivam-tripathi Nov 30, 2023
dc38f85
feat: export for commonjs style as well
shivam-tripathi Nov 30, 2023
ea6e3f0
feat(http): Better types and optional circuitbreaker
shivam-tripathi Nov 30, 2023
a9a45d5
feat(tsconfig): Change target to ES6
shivam-tripathi Nov 30, 2023
b7156d6
feat(src): Expose all methods
shivam-tripathi Nov 30, 2023
96260db
feat(error): Export the QError as default
shivam-tripathi Nov 30, 2023
7252d89
feat(http/test): Update HTTP tests
shivam-tripathi Nov 30, 2023
e9ac2fa
feat(circuitbreaker/test): Update import for HTTPCommunication
shivam-tripathi Nov 30, 2023
e767434
feat(junit): Latest
shivam-tripathi Nov 30, 2023
631a04f
feat: tsconfig build json not required
shivam-tripathi Nov 30, 2023
efee2ed
feat(gitignore): Remove dist from ignore
shivam-tripathi Nov 30, 2023
ce20cb3
feat(dist): Package and release distribution
shivam-tripathi Nov 30, 2023
0f56a91
feat(http): Add template
shivam-tripathi Nov 30, 2023
f133963
feat: package release
shivam-tripathi Nov 30, 2023
816b3a4
fixing types
anaskhan96 Nov 30, 2023
c28a387
Working Circuit Breaker
Nov 30, 2023
f0e1a37
feat: Metrics
shivam-tripathi Dec 1, 2023
3f143d8
feat(tests): Fix tests
shivam-tripathi Dec 1, 2023
dcb865b
feat(metrics): Opossum Metrics
shivam-tripathi Dec 1, 2023
6e4fa45
feat(test): remove circuit breaker disable from http test
shivam-tripathi Dec 1, 2023
d4a1882
feat: Circuit Breaker fallback custom error
shivam-tripathi Dec 1, 2023
eaeefe8
test(circuit-breaker): Circuit breaker tests
shivam-tripathi Dec 1, 2023
0f5ae82
feat(circuit-breaker): Allow warmup
shivam-tripathi Dec 1, 2023
e2603fb
chore: Restructure code, add warmup
shivam-tripathi Dec 2, 2023
c386e98
feat: opossum prometheus is not a dev dep
shivam-tripathi Dec 2, 2023
ef0daae
docs(README): Circuit Breaker docs
shivam-tripathi Feb 13, 2024
1f0beac
docs(circuit-breaker): Add docs and video demo
shivam-tripathi Feb 13, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
# A wrapper to provide different functions for communication over different protocols between internal services.
# Communication Wrapper

A wrapper to provide different functions for communication over different protocols between internal services.
5 changes: 0 additions & 5 deletions index.js

This file was deleted.

157 changes: 152 additions & 5 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 6 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
{
"name": "service-communication-wrapper",
"name": "@quizizz/service-communication",
"version": "1.0.0",
shivam-tripathi marked this conversation as resolved.
Show resolved Hide resolved
"description": "A communication wrapper to support any interservice communication",
"main": "index.js",
"types": "types/index.d.ts",
"main": "dist/index.js",
"directories": {
"test": "tests"
},
Expand All @@ -22,5 +21,9 @@
"homepage": "https://github.com/quizizz/service-communication-wrapper#readme",
"dependencies": {
"axios": "^0.27.2"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's also take this opportunity to upgrade axios to the latest version - 1.6.2
but we need to be careful and take care of any breaking type changes
https://github.com/axios/axios/blob/v1.x/CHANGELOG.md

},
"devDependencies": {
"@types/axios": "^0.14.0",
"@types/node": "^20.10.0"
}
}
23 changes: 0 additions & 23 deletions src/helpers/error.js

This file was deleted.

17 changes: 17 additions & 0 deletions src/helpers/error.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
/**
* @class QError
*/
class QError extends Error {
/**
* @param {string} message
* @param {string} [type=error]
* @param {Object} [cause=null] - extra data for debugging
*/
constructor(public message: string, public type: string = 'error', public cause: any = null) {
super(message);
this.name = 'QuizizzError';
this.stack = (new Error(message)).stack;
}
}

export default QError;
121 changes: 0 additions & 121 deletions src/http/index.js

This file was deleted.

Loading