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

Refactor code that deploys into testnet #1094

Merged
merged 8 commits into from
Jun 2, 2019
Merged

Refactor code that deploys into testnet #1094

merged 8 commits into from
Jun 2, 2019

Conversation

itamararjuan
Copy link
Member

This PR adds code that deals with deploying into the CI testnet in a manner that follows our approach in recent months of having a centralized S3 bucket that holds information about which virtual chains Boyar should deploy.

The code downloads and modifies the CI's testnet S3 bucket central config and updates the version to deploy for all the chains available there and re-uploads that file into S3.

In addition, the code aims to check that the version was indeed deployed on all provided nodes and that the block height is progressing in all chains. then and only then will the step of deployment to testnet completes successfully and e2e tests can run safely against said chains.

The code also fixes a problem with parsing the nightly junit xml stats as well.

@electricmonk
Copy link
Contributor

@netoneko please review

.circleci/check-testnet-deployment.js Show resolved Hide resolved
.circleci/deploy-testnet.sh Show resolved Hide resolved
.circleci/testnet-deploy-tag.js Show resolved Hide resolved
test.flakiness.sh Show resolved Hide resolved
@itamararjuan
Copy link
Member Author

I've addressed the concerns that @netoneko had with this PR.
When you are ready to review let me know so we can proceed with merging this PR to master

Preferrably before Thursday if possible :-)

@@ -0,0 +1,99 @@
#!/usr/bin/env node

const { waitUntilSync, getBlockHeight, getCommit } = require('@orbs-network/orbs-nebula/lib/metrics');
Copy link
Contributor

Choose a reason for hiding this comment

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

We decided to unpublish @orbs-network/orbs-nebula a month ago. Why is it used here?

Copy link
Member Author

Choose a reason for hiding this comment

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

In your previous review you wanted me to use your code from Nebula
This is the official package. We talked about unpublish (and we did) the other package (orbs-nebula)

This scoped package is the official one which we left

Copy link
Contributor

Choose a reason for hiding this comment

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

Official docs still use npm install -g orbs-nebula

Also maybe it would be easier to just install from our github master? We rarely release new nebula version.

return topology;
}

async function eventuallyDeployed({ chainId, nodes }) {
Copy link
Contributor

Choose a reason for hiding this comment

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

waitUnitlCommit from metrics does that already: https://github.com/orbs-network/nebula/blob/master/lib/metrics.js#L112

Copy link
Member Author

Choose a reason for hiding this comment

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

I do not agree. I want to see all nodes have updated to the new version. This is not the same.
Your method is single endpoint centric

Copy link
Contributor

Choose a reason for hiding this comment

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

You can run it multiple times waiting for the same commit. Same effect, less code.

.circleci/check-testnet-deployment.js Outdated Show resolved Hide resolved
.circleci/check-testnet-deployment.js Outdated Show resolved Hide resolved
.circleci/check-testnet-deployment.js Outdated Show resolved Hide resolved
"author": "",
"license": "ISC",
"dependencies": {
"@orbs-network/orbs-nebula": "^1.1.2",
Copy link
Contributor

@netoneko netoneko May 2, 2019

Choose a reason for hiding this comment

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

Should be just orbs-nebula. Also, it's old code, please install from master branch on github.

@itamararjuan itamararjuan removed the request for review from electricmonk May 19, 2019 12:55
@@ -0,0 +1,99 @@
#!/usr/bin/env node

const { waitUntilSync, getBlockHeight, getCommit } = require('@orbs-network/orbs-nebula/lib/metrics');
Copy link
Contributor

Choose a reason for hiding this comment

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

Official docs still use npm install -g orbs-nebula

Also maybe it would be easier to just install from our github master? We rarely release new nebula version.

return topology;
}

async function eventuallyDeployed({ chainId, nodes }) {
Copy link
Contributor

Choose a reason for hiding this comment

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

You can run it multiple times waiting for the same commit. Same effect, less code.

.circleci/deploy-testnet.sh Show resolved Hide resolved
};
}

async function eventuallyClosingBlocks({ chainId, nodes }) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Same can be done with nebula call for status, waiting for all of them to become green.

@netoneko netoneko merged commit 8586b7b into master Jun 2, 2019
@netoneko netoneko deleted the refactor/testnet branch June 2, 2019 11:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants