Skip to content

Commit

Permalink
2.12.2 hotfix for long dry-run startup (#2129)
Browse files Browse the repository at this point in the history
* fix mongodb dep

Signed-off-by: simvalery <[email protected]>

* update miroorm version

Signed-off-by: simvalery <[email protected]>

* bump version

Signed-off-by: simvalery <[email protected]>

* fix timeout

Signed-off-by: simvalery <[email protected]>

* fix timeout

Signed-off-by: simvalery <[email protected]>

* fix long policy start

Signed-off-by: simvalery <[email protected]>

* bump version

Signed-off-by: simvalery <[email protected]>

---------

Signed-off-by: simvalery <[email protected]>
  • Loading branch information
simvalery authored May 11, 2023
1 parent d5025e8 commit fa297fe
Show file tree
Hide file tree
Showing 18 changed files with 52 additions and 49 deletions.
2 changes: 1 addition & 1 deletion api-docs/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "api-docs",
"version": "2.12.1",
"version": "2.12.2",
"description": "Swagger Documentation",
"main": "dist/index.js",
"scripts": {
Expand Down
6 changes: 3 additions & 3 deletions api-gateway/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
},
"author": "Envision Blockchain Solutions <[email protected]>",
"dependencies": {
"@guardian/common": "^2.12.1",
"@guardian/interfaces": "^2.12.1",
"@guardian/common": "^2.12.2",
"@guardian/interfaces": "^2.12.2",
"@types/express-fileupload": "^1.4.1",
"dotenv": "^16.0.0",
"express": "^4.17.1",
Expand Down Expand Up @@ -55,5 +55,5 @@
"start": "node dist/index.js",
"test": "mocha tests/**/*.test.js --reporter mocha-junit-reporter --reporter-options mochaFile=../test_results/ui-service.xml"
},
"version": "2.12.1"
"version": "2.12.2"
}
2 changes: 1 addition & 1 deletion api-tests/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "api-tests",
"version": "2.12.1",
"version": "2.12.2",
"description": "API Tests",
"main": "index.js",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion application-events/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "application-events",
"version": "2.12.1",
"version": "2.12.2",
"description": "",
"main": "index.js",
"scripts": {
Expand Down
6 changes: 3 additions & 3 deletions auth-service/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
},
"author": "Envision Blockchain Solutions <[email protected]>",
"dependencies": {
"@guardian/common": "^2.12.1",
"@guardian/interfaces": "^2.12.1",
"@guardian/common": "^2.12.2",
"@guardian/interfaces": "^2.12.2",
"@mikro-orm/core": "~5.7.5",
"@mikro-orm/mongodb": "~5.7.5",
"dotenv": "^16.0.0",
Expand Down Expand Up @@ -47,5 +47,5 @@
"start": "node dist/index.js",
"test": "mocha tests/**/*.test.js --reporter mocha-junit-reporter --reporter-options mochaFile=../test_results/ui-service.xml"
},
"version": "2.12.1"
"version": "2.12.2"
}
4 changes: 2 additions & 2 deletions common/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"author": "Envision Blockchain Solutions <[email protected]>",
"dependencies": {
"@aws-sdk/client-secrets-manager": "^3.319.0",
"@guardian/interfaces": "^2.12.1",
"@guardian/interfaces": "^2.12.2",
"@hashgraph/sdk": "^2.22.0",
"@mattrglobal/jsonld-signatures-bbs": "^1.1.2",
"@meeco/cryppo": "^2.0.2",
Expand Down Expand Up @@ -59,5 +59,5 @@
"test:local": "mocha tests/**/*.test.js --exit",
"test:stability": "mocha tests/stability.test.js"
},
"version": "2.12.1"
"version": "2.12.2"
}
2 changes: 1 addition & 1 deletion frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,5 +65,5 @@
"test": "ng test",
"watch": "ng build --watch --configuration development --output-path ../www-data"
},
"version": "2.12.1"
"version": "2.12.2"
}
6 changes: 3 additions & 3 deletions guardian-service/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
},
"author": "Envision Blockchain Solutions <[email protected]>",
"dependencies": {
"@guardian/common": "^2.12.1",
"@guardian/interfaces": "^2.12.1",
"@guardian/common": "^2.12.2",
"@guardian/interfaces": "^2.12.2",
"@hashgraph/sdk": "^2.22.0",
"@mattrglobal/jsonld-signatures-bbs": "^1.1.2",
"@meeco/cryppo": "^2.0.2",
Expand Down Expand Up @@ -79,5 +79,5 @@
"test:local": "mocha tests/**/*.test.js --exit",
"test:stability": "mocha tests/stability.test.js"
},
"version": "2.12.1"
"version": "2.12.2"
}
9 changes: 6 additions & 3 deletions guardian-service/src/helpers/guardians.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export class GuardiansService extends NatsService {
* @param policyId
*/
public async checkIfPolicyAlive(policyId: string): Promise<boolean> {
const exist = await this.sendPolicyMessage<boolean>(PolicyEvents.CHECK_IF_ALIVE, policyId, {})
const exist = await this.sendPolicyMessage<boolean>(PolicyEvents.CHECK_IF_ALIVE, policyId, {}, 1000);
return !!exist
}

Expand All @@ -41,13 +41,16 @@ export class GuardiansService extends NatsService {
* @param subject
* @param policyId
* @param data
* @param customTimeout
*/
public sendPolicyMessage<T>(subject: string, policyId: string, data?: unknown): Promise<T>{
public sendPolicyMessage<T>(subject: string, policyId: string, data?: unknown, customTimeout?: number): Promise<T>{
const messageId = GenerateUUIDv4();
const head = headers();
head.append('messageId', messageId);
head.append('policyId', policyId);

const timeout = customTimeout ? customTimeout : 60 * 1000;

return Promise.race([
new Promise<T>(async (resolve, reject) => {
this.responseCallbacksMap.set(messageId, (d: T, error?) => {
Expand All @@ -66,7 +69,7 @@ export class GuardiansService extends NatsService {
new Promise<T>((resolve, reject) => {
setTimeout(() => {
resolve(null);
}, 60 * 1000)
}, timeout)
}),
])
}
Expand Down
2 changes: 1 addition & 1 deletion interfaces/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,5 @@
"prepack": "npm run build",
"test": "echo \"Error: no test specified\" && exit 1"
},
"version": "2.12.1"
"version": "2.12.2"
}
6 changes: 3 additions & 3 deletions logger-service/package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"author": "Envision Blockchain Solutions <[email protected]>",
"dependencies": {
"@guardian/common": "^2.12.1",
"@guardian/interfaces": "^2.12.1",
"@guardian/common": "^2.12.2",
"@guardian/interfaces": "^2.12.2",
"@mikro-orm/core": "~5.7.5",
"@mikro-orm/mongodb": "~5.7.5",
"@web-std/fetch": "3.0.0",
Expand Down Expand Up @@ -37,5 +37,5 @@
"start": "node dist/index.js",
"watch": "nodemon src/index.ts"
},
"version": "2.12.1"
"version": "2.12.2"
}
4 changes: 2 additions & 2 deletions mrv-sender/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"author": "Envision Blockchain Solutions <[email protected]>",
"dependencies": {
"@guardian/common": "^2.12.1",
"@guardian/common": "^2.12.2",
"@transmute/credentials-context": "0.7.0-unstable.80",
"@transmute/did-context": "0.7.0-unstable.80",
"@transmute/ed25519-signature-2018": "0.7.0-unstable.80",
Expand Down Expand Up @@ -30,5 +30,5 @@
"dev:docker": "nodemon .",
"start": "node dist/index.js"
},
"version": "2.12.1"
"version": "2.12.2"
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@
"policy-service",
"api-tests"
],
"version": "2.12.1"
"version": "2.12.2"
}
6 changes: 3 additions & 3 deletions policy-service/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
},
"author": "Envision Blockchain Solutions <[email protected]>",
"dependencies": {
"@guardian/common": "^2.12.1",
"@guardian/interfaces": "^2.12.1",
"@guardian/common": "^2.12.2",
"@guardian/interfaces": "^2.12.2",
"@hashgraph/sdk": "^2.22.0",
"@mattrglobal/jsonld-signatures-bbs": "^1.1.2",
"@meeco/cryppo": "^2.0.2",
Expand Down Expand Up @@ -79,5 +79,5 @@
"test:local": "mocha tests/**/*.test.js",
"test:stability": "mocha tests/stability.test.js"
},
"version": "2.12.1"
"version": "2.12.2"
}
2 changes: 1 addition & 1 deletion topic-viewer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,5 @@
"dev": "tsc -w",
"start": "node dist/index.js"
},
"version": "2.12.1"
"version": "2.12.2"
}
2 changes: 1 addition & 1 deletion tree-viewer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,5 @@
"dev": "tsc -w",
"start": "node dist/index.js"
},
"version": "2.12.1"
"version": "2.12.2"
}
6 changes: 3 additions & 3 deletions worker-service/package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"author": "Envision Blockchain Solutions <[email protected]>",
"dependencies": {
"@guardian/common": "^2.12.1",
"@guardian/interfaces": "^2.12.1",
"@guardian/common": "^2.12.2",
"@guardian/interfaces": "^2.12.2",
"@hashgraph/sdk": "^2.22.0",
"@transmute/credentials-context": "^0.7.0-unstable.80",
"@transmute/did-context": "^0.7.0-unstable.80",
Expand Down Expand Up @@ -49,5 +49,5 @@
"start": "node dist/index.js",
"test": "mocha tests/**/*.test.js --reporter mocha-junit-reporter --reporter-options mochaFile=../test_results/worker-service.xml --exit"
},
"version": "2.12.1"
"version": "2.12.2"
}
32 changes: 16 additions & 16 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1051,12 +1051,12 @@ __metadata:
languageName: node
linkType: hard

"@guardian/common@^2.12.1, @guardian/common@workspace:common":
"@guardian/common@^2.12.2, @guardian/common@workspace:common":
version: 0.0.0-use.local
resolution: "@guardian/common@workspace:common"
dependencies:
"@aws-sdk/client-secrets-manager": ^3.319.0
"@guardian/interfaces": ^2.12.1
"@guardian/interfaces": ^2.12.2
"@hashgraph/sdk": ^2.22.0
"@mattrglobal/jsonld-signatures-bbs": ^1.1.2
"@meeco/cryppo": ^2.0.2
Expand Down Expand Up @@ -1095,7 +1095,7 @@ __metadata:
languageName: unknown
linkType: soft

"@guardian/interfaces@^2.12.1, @guardian/interfaces@workspace:interfaces":
"@guardian/interfaces@^2.12.2, @guardian/interfaces@workspace:interfaces":
version: 0.0.0-use.local
resolution: "@guardian/interfaces@workspace:interfaces"
dependencies:
Expand Down Expand Up @@ -2809,8 +2809,8 @@ __metadata:
version: 0.0.0-use.local
resolution: "api-gateway@workspace:api-gateway"
dependencies:
"@guardian/common": ^2.12.1
"@guardian/interfaces": ^2.12.1
"@guardian/common": ^2.12.2
"@guardian/interfaces": ^2.12.2
"@types/express": ^4.17.13
"@types/express-fileupload": ^1.4.1
"@types/jszip": ^3.4.1
Expand Down Expand Up @@ -3005,8 +3005,8 @@ __metadata:
version: 0.0.0-use.local
resolution: "auth-service@workspace:auth-service"
dependencies:
"@guardian/common": ^2.12.1
"@guardian/interfaces": ^2.12.1
"@guardian/common": ^2.12.2
"@guardian/interfaces": ^2.12.2
"@mikro-orm/core": ~5.7.5
"@mikro-orm/mongodb": ~5.7.5
"@types/jsonwebtoken": ^8.5.4
Expand Down Expand Up @@ -5608,8 +5608,8 @@ __metadata:
version: 0.0.0-use.local
resolution: "guardian-service@workspace:guardian-service"
dependencies:
"@guardian/common": ^2.12.1
"@guardian/interfaces": ^2.12.1
"@guardian/common": ^2.12.2
"@guardian/interfaces": ^2.12.2
"@hashgraph/sdk": ^2.22.0
"@mattrglobal/jsonld-signatures-bbs": ^1.1.2
"@meeco/cryppo": ^2.0.2
Expand Down Expand Up @@ -7661,8 +7661,8 @@ __metadata:
version: 0.0.0-use.local
resolution: "logger-service@workspace:logger-service"
dependencies:
"@guardian/common": ^2.12.1
"@guardian/interfaces": ^2.12.1
"@guardian/common": ^2.12.2
"@guardian/interfaces": ^2.12.2
"@mikro-orm/core": ~5.7.5
"@mikro-orm/mongodb": ~5.7.5
"@types/fs-extra": ^9.0.12
Expand Down Expand Up @@ -8300,7 +8300,7 @@ __metadata:
version: 0.0.0-use.local
resolution: "mrv-sender@workspace:mrv-sender"
dependencies:
"@guardian/common": ^2.12.1
"@guardian/common": ^2.12.2
"@transmute/credentials-context": 0.7.0-unstable.80
"@transmute/did-context": 0.7.0-unstable.80
"@transmute/ed25519-signature-2018": 0.7.0-unstable.80
Expand Down Expand Up @@ -9264,8 +9264,8 @@ __metadata:
version: 0.0.0-use.local
resolution: "policy-service@workspace:policy-service"
dependencies:
"@guardian/common": ^2.12.1
"@guardian/interfaces": ^2.12.1
"@guardian/common": ^2.12.2
"@guardian/interfaces": ^2.12.2
"@hashgraph/sdk": ^2.22.0
"@mattrglobal/jsonld-signatures-bbs": ^1.1.2
"@meeco/cryppo": ^2.0.2
Expand Down Expand Up @@ -11751,8 +11751,8 @@ __metadata:
version: 0.0.0-use.local
resolution: "worker-service@workspace:worker-service"
dependencies:
"@guardian/common": ^2.12.1
"@guardian/interfaces": ^2.12.1
"@guardian/common": ^2.12.2
"@guardian/interfaces": ^2.12.2
"@hashgraph/sdk": ^2.22.0
"@transmute/credentials-context": ^0.7.0-unstable.80
"@transmute/did-context": ^0.7.0-unstable.80
Expand Down

0 comments on commit fa297fe

Please sign in to comment.