Skip to content

Commit

Permalink
close #284 and prepare 2.2.5
Browse files Browse the repository at this point in the history
  • Loading branch information
branciard committed Oct 27, 2021
1 parent f2a179a commit 97f36bf
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 15 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@

<!--New features/improvements/fixes go here-->

## [v2.2.5](https://github.com/luguslabs/archipel/releases/tag/v2.2.5)

[#284](https://github.com/luguslabs/archipel/issues/284) : isServiceReadyToStart function ko. migrate curl to axios missing

## [v2.2.4](https://github.com/luguslabs/archipel/releases/tag/v2.2.4)

[#282](https://github.com/luguslabs/archipel/issues/282) : Curl removed in polkadot 0.9.11 fix
Expand Down
2 changes: 1 addition & 1 deletion cli/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "archipel-cli",
"version": "2.2.4",
"version": "2.2.5",
"description": "Archipel CLI is a component that generates configuration and bootstraps an Archipel federation. ",
"main": "src/app.js",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion cli/src/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const runCli = async args => {
try {
// Set cli version
program
.version('2.2.4');
.version('2.2.5');

// Init command
program
Expand Down
2 changes: 1 addition & 1 deletion orchestrator/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "archipel-orchestrator",
"version": "2.2.4",
"version": "2.2.5",
"description": "Archipel Orchestrator is the decision making component in Archipel federation.",
"main": "src/app.js",
"scripts": {
Expand Down
30 changes: 19 additions & 11 deletions orchestrator/src/polkadot.js
Original file line number Diff line number Diff line change
Expand Up @@ -365,17 +365,25 @@ class Polkadot {
return true;
}

// Construct command to check system_health
const commandSystemHealth = ['curl', 'http://localhost:' + config.polkadotRpcPort, '-H', 'Content-Type:application/json;charset=utf-8', '-d',
`{
"jsonrpc":"2.0",
"id":1,
"method":"system_health"
}`];

// Call system_health command in docker container
const resultSystemHealth = await this.docker.dockerExecute(containerName, commandSystemHealth);
debug('isServiceReadyToStart', `Command system_health result: "${resultSystemHealth}"`);
const parameters = `{
"jsonrpc":"2.0",
"id":1,
"method":"system_health"
}`;

const instanceAxios = axios.create({
headers: {'Content-Type': 'application/json;charset=utf-8'}
});
const resultPost = await instanceAxios.post('http://127.0.0.1:'+config.polkadotRpcPort, parameters);

let resultSystemHealth = '';
if(resultPost && resultPost.data){
resultSystemHealth = JSON.stringify(resultPost.data);
debug('isServiceReadyToStart', `Command system_health result: "${resultSystemHealth}"`);
}
else{
debug('isServiceReadyToStart', `Command system_health ko: "${resultPost}"`);
}

// Checking if system_health gives a result
if (!resultSystemHealth.includes('"result":')) {
Expand Down
2 changes: 1 addition & 1 deletion ui/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "archipel-ui",
"version": "2.2.4",
"version": "2.2.5",
"private": true,
"author": "Lugus Labs",
"license": "apache 2",
Expand Down

0 comments on commit 97f36bf

Please sign in to comment.