Skip to content

Commit

Permalink
Release/develop to testnet 20221117 (#293)
Browse files Browse the repository at this point in the history
* the helm charts for all 3 envs are synced

* commit history reset

* Release/experimental to develop 20221116 (#292)

* changed action name and added schedule

* fixed cron schedule

* fixed statusCheckRollup null bug

* adding support for `SIGKILL` and `SIGTERM` exit events

* fixing RPC url validation bug

* updating to remove `SIGKILL` since no listener can be added for it

* Feature/holo 523 add health check port (#198)

* health check port is implemented for operator

* health check on base-command and using hooks

* added new health check to indexer

* added new health check to propagator and removed old health-check-server file

* bug:fix for NetworkMonitor.getProviderStatus()

* removed unused code lines

* requested changes

* Merge branch 'experimental'

* fixed incorrectly extends

* fixed healthCheck flag bug

* renamed HealthCheck class on 'hooks/healthcheck.ts' to HealthCheckServer

* Improvement/HOLO 594 enforce prettier and lint (#280)

* added actions to prettier and lint

* improved prettier and linter actions

* added main branches

* failure test

* removed changes for failure test

* added rule for push

* bugfix: fixed operatorStatus and getTxStatus (#258)

* updated packages to include easy upgrades (#279)

* improvement/HOLO-600-updated command descriptions (#283)

* updated command descriptions in code and readme

* changed copy for contribution

* prettier fix

* Improvement/holo 594 enforce prettier and lint run on cli (#285)

* added actions to prettier and lint

* improved prettier and linter actions

* added main branches

* failure test

* removed changes for failure test

* added rule for push

* husky prepush check for linting and prettier

* small change to .husky/pre-push

* added husky prepare on package.json

* husky prepare

* fixes

* added unbond command

* added fixes for eslint

* removed unnecessary log

* changed network monitor instantiation

* removed unnecessary this.exit()

* procecBlock fail handler

* bump actions node version to 18.9.0

* testing ssh-agent for GitHub Actions

* copy change and removed --network flag from example output'

* purging yarn.lock file

* re-add exit command so unbond exists after success unbond

* silencing additional gas pricing logs

* test the cicd

* fixing healthCheck issue

* fixed package.json

* Feature/holo 608 change environment selector env variable to flag (#288)

* two solutions for env flags

* two solutions for env flags

* fixed lint erros

* removed 'setEnv' and fixed eslint rules

* removed BaseCommand and changed default env to testnet

* Clean up some additional lint warnings

* Response data must be any type for now

* changes for the new --env argument for the operator cli

* added custom help to address env flag

* eslint changes

* changed readme and fixed custom help example

* updated the operator helm chart for the new env var: HOLOGRAPH_ENVIRONMENT

* fixed healthCheckPort flag default value

Co-authored-by: Alexander <[email protected]>
Co-authored-by: kostas demiris <[email protected]>

Co-authored-by: Natalie Bravo <[email protected]>
Co-authored-by: Vitto <[email protected]>
Co-authored-by: kostas demiris <[email protected]>
Co-authored-by: Alexander <[email protected]>

* Release/experimental to develop 20221117 v2 (#296)

* updated the operator helm chart for the new env var: HOLOGRAPH_ENVIRONMENT

* Release/experimental to develop 20221117 v3 (#299)


* update indexer helm chart

* indexer:0.0.53 -> HOLOGRAPH_ENVIRONMENT env var added (#297)

* Release/experimental to develop 20221118 (#301)

* synced testnet with rest of the envs

Co-authored-by: kostas demiris <[email protected]>

Co-authored-by: kostas demiris <[email protected]>
Co-authored-by: Vitto <[email protected]>
Co-authored-by: Natalie Bravo <[email protected]>
Co-authored-by: Alexander <[email protected]>
Co-authored-by: Kostas Demiris <[email protected]>
  • Loading branch information
6 people authored Nov 18, 2022
1 parent 1e9bf8c commit 4a35855
Show file tree
Hide file tree
Showing 44 changed files with 1,398 additions and 1,119 deletions.
5 changes: 4 additions & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@
"unicorn/prefer-module": "off",

// TODO: This can be removed if we decide to add jsdoc to all functions
"valid-jsdoc": "off"
"valid-jsdoc": "off",

// TODO: This can be removed if we refactor network functions to call async functions outside of loops
"no-await-in-loop": "off"
}
}
16 changes: 0 additions & 16 deletions .github/dependabot.yml

This file was deleted.

12 changes: 6 additions & 6 deletions .github/workflows/cicd_develop_staging.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Deploy holoclis to staging
name: Deploy holoclis to staging[develop]

permissions:
id-token: write
Expand All @@ -11,8 +11,8 @@ env:
#
DEV_IMAGE_TAG: dev-${{ github.sha }}
#######################################
STG_HOLOGRAPH_INDEXER_HELM_CHART_VERSION: 0.0.45
STG_HOLOGRAPH_OPERATOR_HELM_CHART_VERSION: 0.0.40
STG_HOLOGRAPH_INDEXER_HELM_CHART_VERSION: 0.0.53
STG_HOLOGRAPH_OPERATOR_HELM_CHART_VERSION: 0.0.44
#######################################
CLUSTER_NAME: staging
#
Expand All @@ -32,7 +32,7 @@ env:
INDEXER_HOLOGRAPH_CONFIG_FILE_DATA: dev-config-file
OPERATOR_HOLOGRAPH_CONFIG_FILE_DATA: dev-config-file
#
ABI_ENVIRONMENT: develop # same for all apps [indexer,operator]
HOLOGRAPH_ENVIRONMENT: develop
#
STG_DOMAIN: 'cxipchain.xyz'
#
Expand Down Expand Up @@ -138,7 +138,7 @@ jobs:
--set holo_indexer_password=${{ env.STG_HOLOGRAPH_INDEXER_PASSWORD }} \
--set HOLO_INDEXER_HOST=${{ env.STG_HOLOGRAPH_INDEXER_HOST }} \
--set OPERATOR_API_KEY=${{ env.STG_HOLOGRAPH_INDEXER_OPERATOR_API_KEY }} \
--set ABI_ENVIRONMENT=${{ env.ABI_ENVIRONMENT }} \
--set HOLOGRAPH_ENVIRONMENT=${{ env.HOLOGRAPH_ENVIRONMENT }} \
\
--set ENABLE_DEBUG=$ENABLE_DEBUG \
--set HEALTHCHECK=$HEALTHCHECK \
Expand Down Expand Up @@ -194,7 +194,7 @@ jobs:
--set image.image_tag=${{ env.DEV_IMAGE_TAG }} \
--set config_file_data=${{ env.OPERATOR_HOLOGRAPH_CONFIG_FILE_DATA }} \
--set holo_operator_password=${{ env.STG_HOLOGRAPH_OPERATOR_PASSWORD }} \
--set ABI_ENVIRONMENT=${{ env.ABI_ENVIRONMENT }} \
--set HOLOGRAPH_ENVIRONMENT=${{ env.HOLOGRAPH_ENVIRONMENT }} \
\
--set ENABLE_DEBUG=$ENABLE_DEBUG \
--set ENABLE_SYNC=$ENABLE_SYNC \
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/cicd_experimental_staging.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ env:
#
DEV_IMAGE_TAG: dev-${{ github.sha }}
#######################################
STG_HOLO_OPERATOR_HELM_CHART_VERSION: 0.0.40
STG_HOLO_OPERATOR_HELM_CHART_VERSION: 0.0.44
#######################################
CLUSTER_NAME: staging
#
Expand All @@ -24,7 +24,7 @@ env:
# set the RPC endpoints config files
OPERATOR_HOLO_CONFIG_FILE_DATA: exp-config-file
#
ABI_ENVIRONMENT: experimental
HOLOGRAPH_ENVIRONMENT: experimental
#
STG_DOMAIN: 'cxipchain.xyz'
#
Expand Down Expand Up @@ -128,7 +128,7 @@ jobs:
--set image.image_tag=${{ env.DEV_IMAGE_TAG }} \
--set config_file_data=${{ env.OPERATOR_HOLO_CONFIG_FILE_DATA }} \
--set holo_operator_password=${{ env.STG_HOLO_OPERATOR_PASSWORD }} \
--set ABI_ENVIRONMENT=${{ env.ABI_ENVIRONMENT }} \
--set HOLOGRAPH_ENVIRONMENT=${{ env.HOLOGRAPH_ENVIRONMENT }} \
\
--set ENABLE_DEBUG=$ENABLE_DEBUG \
--set ENABLE_SYNC=$ENABLE_SYNC \
Expand Down Expand Up @@ -173,3 +173,4 @@ jobs:
ENDPOINT=$OPERATOR_RELEASE_NAME-health.${{ env.STG_DOMAIN }}
echo "curl -k -H \"Host: $ENDPOINT\" $LB_URL/healthcheck"
curl -k -H "Host: $ENDPOINT" $LB_URL/healthcheck | jq '.status'
10 changes: 5 additions & 5 deletions .github/workflows/cicd_testnet_prod.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ env:
#
TESTNET_IMAGE_TAG: testnet-${{ github.sha }}
#######################################
TESTNET_HOLO_INDEXER_HELM_CHART_VERSION: 0.0.46
TESTNET_HOLO_OPERATOR_HELM_CHART_VERSION: 0.0.41
TESTNET_HOLO_INDEXER_HELM_CHART_VERSION: 0.0.53
TESTNET_HOLO_OPERATOR_HELM_CHART_VERSION: 0.0.44
#######################################
CLUSTER_NAME: prod0
#
Expand All @@ -33,7 +33,7 @@ env:
INDEXER_HOLO_CONFIG_FILE_DATA: testnet-config-file
OPERATOR_HOLO_CONFIG_FILE_DATA: testnet-config-file
#
ABI_ENVIRONMENT: testnet # same for all apps [indexer,operator]
HOLOGRAPH_ENVIRONMENT: testnet
#
TESTNET_DOMAIN: 'holograph.xyz'
#
Expand Down Expand Up @@ -145,7 +145,7 @@ jobs:
--set holo_indexer_password=${{ env.TESTNET_HOLO_INDEXER_PASSWORD }} \
--set HOLO_INDEXER_HOST=${{ env.TESTNET_HOLO_INDEXER_HOST }} \
--set OPERATOR_API_KEY=${{ env.TESTNET_HOLO_INDEXER_OPERATOR_API_KEY }} \
--set ABI_ENVIRONMENT=${{ env.ABI_ENVIRONMENT }} \
--set HOLOGRAPH_ENVIRONMENT=${{ env.HOLOGRAPH_ENVIRONMENT }} \
\
--set ENABLE_DEBUG=$ENABLE_DEBUG \
--set HEALTHCHECK=$HEALTHCHECK \
Expand Down Expand Up @@ -201,7 +201,7 @@ jobs:
--set image.image_tag=${{ env.TESTNET_IMAGE_TAG }} \
--set config_file_data=${{ env.OPERATOR_HOLO_CONFIG_FILE_DATA }} \
--set holo_operator_password=${{ env.TESTNET_HOLO_OPERATOR_PASSWORD }} \
--set ABI_ENVIRONMENT=${{ env.ABI_ENVIRONMENT }} \
--set HOLOGRAPH_ENVIRONMENT=${{ env.HOLOGRAPH_ENVIRONMENT }} \
\
--set ENABLE_DEBUG=$ENABLE_DEBUG \
--set ENABLE_SYNC=$ENABLE_SYNC \
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
name: 'Combine PRs'
name: 'Dependabot combined PR'

# Controls when the action will run - in this case triggered manually
# Controls when the action will run - in this case it run on every midnight on the 1st day of every month AND it also can be triggered manually
on:
schedule:
- cron: '0 0 1 * *'
workflow_dispatch:
inputs:
branchPrefix:
Expand Down Expand Up @@ -54,6 +56,7 @@ jobs:
const stateQuery = `query($owner: String!, $repo: String!, $pull_number: Int!) {
repository(owner: $owner, name: $repo) {
pullRequest(number:$pull_number) {
mergeable
commits(last: 1) {
nodes {
commit {
Expand All @@ -71,14 +74,28 @@ jobs:
repo: context.repo.repo,
pull_number: pull['number']
};
const result = await github.graphql(stateQuery, vars);
const [{ commit }] = result.repository.pullRequest.commits.nodes;
const state = commit.statusCheckRollup.state
console.log('Validating status: ' + state);
if(state != 'SUCCESS') {
console.log('Discarding ' + branch + ' with status ' + state);
statusOK = false;
if(commit.statusCheckRollup != null){
const state = commit.statusCheckRollup.state
console.log('Validating status: ' + state);
if(state != 'SUCCESS') {
console.log('Discarding ' + branch + ' with status ' + state);
statusOK = false;
}
} else {
const mergeable = result.repository.pullRequest.mergeable
console.log('PR does not have statusCheckRollup, but mergeability is: ' + mergeable);
if(mergeable !== 'MERGEABLE'){
console.log('Discarding ' + branch + ' with mergeability: ' + mergeable);
statusOK = false;
}
}
}
console.log('Checking labels: ' + branch);
const labels = pull['labels'];
Expand Down
32 changes: 32 additions & 0 deletions .github/workflows/enforce_eslint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: 'Enforce Linter'

on:
push:
branches:
- main
- testnet
- develop
- experimental
pull_request:
branches:
- main
- testnet
- develop
- experimental

jobs:
run-linter:
name: Run linter
runs-on: ubuntu-latest

steps:
- name: Check out Git repository
uses: actions/checkout@v3
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '18.4.0'
- name: Install dependencies
run: yarn install
- name: Lint Check
run: yarn lint
34 changes: 34 additions & 0 deletions .github/workflows/enforce_prettier.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: 'Enforce prettier'

on:
push:
branches:
- main
- testnet
- develop
- experimental
pull_request:
branches:
- main
- testnet
- develop
- experimental

jobs:
prettier:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
ref: ${{ github.head_ref }}
# Make sure the value of GITHUB_TOKEN will not be persisted in repo's config
persist-credentials: false

- name: Prettify code
uses: creyD/[email protected]
with:
prettier_options: --check src/**/*.+(js|ts)
dry: True
1 change: 1 addition & 0 deletions .husky/pre-push
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
. "$(dirname -- "$0")/_/husky.sh"

yarn lint
yarn prettier:check
2 changes: 2 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ RUN yarn build

RUN npm install -location=global ../holograph-cli

# experimental / develop / testnet / mainnet
ENV HOLOGRAPH_ENVIRONMENT=a-super-fancy-environment
ENV CONFIG_FILE=a-super-config-file.json
ENV PASSWORD=a-super-secret-password
ENV HOLOGRAPH_CLI_CMD=TeRmInAtOr
Expand Down
Loading

0 comments on commit 4a35855

Please sign in to comment.