Skip to content

Commit

Permalink
Merge branch 'master' into soloseng/set-PNP-default-as-optional-env-var
Browse files Browse the repository at this point in the history
  • Loading branch information
soloseng committed Jul 25, 2023
2 parents 5d32a07 + 4aa65cd commit f4366bd
Show file tree
Hide file tree
Showing 175 changed files with 391 additions and 12,764 deletions.
37 changes: 18 additions & 19 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,18 @@
# and https://github.com/facebook/react-native/blob/master/.circleci/config.yml

version: 2.1

setup: true

parameters:
run-workflow-general:
type: boolean
default: false
run-workflow-npm-install:
type: boolean
default: false
run-workflow-protocol-coverage:
type: boolean
default: false
# When you need to force a rebuild of the node modules cache then bump this version
node-modules-cache-version:
type: integer
Expand Down Expand Up @@ -891,6 +900,9 @@ jobs:
workflows:
version: 2
celo-monorepo-build:
# Contitionally triggered
when:
or: [<< pipeline.parameters.run-workflow-general >>]
jobs:
- install_dependencies
- certora-test:
Expand Down Expand Up @@ -1011,30 +1023,17 @@ workflows:
- end-to-end-cip35-eth-compatibility-test
- odis-test
npm-install-testing-cron-workflow:
triggers:
- schedule:
# 7 PM in UTC = noon in PDT.
# Best for test to fail during SF afternoon, so that, someone can fix it during the day time.
cron: '0 19 * * *'
filters:
branches:
only:
- master
# Contitionally triggered
when:
or: [<< pipeline.parameters.run-workflow-npm-install >>]
jobs:
- test-typescript-npm-package-install
- test-utils-npm-package-install
- test-contractkit-npm-package-install
- test-celocli-npm-package-install
protocol-testing-with-code-coverage-cron-workflow:
triggers:
- schedule:
# 1 PM in UTC = 6 AM in PDT.
# Best for this slow test (~3 hours) to run during SF early morning.
cron: '0 13 * * *'
filters:
branches:
only:
- master
when:
or: [<< pipeline.parameters.run-workflow-protocol-coverage >>]
jobs:
- install_dependencies
- lint-checks:
Expand Down
2 changes: 0 additions & 2 deletions .env
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ GETH_VMODULE="consensus/*=2"
GETH_ENABLE_METRICS=false
GETH_USE_MYCELO=false

VM_BASED=false

KUBERNETES_CLUSTER_NAME="celo-networks-dev"
KUBERNETES_CLUSTER_ZONE="us-west1-a"
CLUSTER_DOMAIN_NAME="celo-networks-dev"
Expand Down
2 changes: 0 additions & 2 deletions .env.alfajores
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ ENV_TYPE="production"

GETH_VERBOSITY=2

VM_BASED=false

KUBERNETES_CLUSTER_NAME="alfajores"
KUBERNETES_CLUSTER_ZONE="us-west1-a"
CLUSTER_DOMAIN_NAME="celo-testnet"
Expand Down
1 change: 0 additions & 1 deletion .env.baklava
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ ENV_TYPE="production"
GETH_VERBOSITY=2
GETH_ENABLE_METRICS=true

VM_BASED=false

KUBERNETES_CLUSTER_NAME="baklavastaging"
KUBERNETES_CLUSTER_ZONE="us-west1-a"
Expand Down
1 change: 0 additions & 1 deletion .env.oracledev
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ CLUSTER_CREATION_FLAGS="--enable-autoscaling --min-nodes 3 --max-nodes 8 --machi

# ---- VM ----

VM_BASED=false

# ---- Blockscout ----

Expand Down
3 changes: 0 additions & 3 deletions .env.rc1staging
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@ ENV_TYPE="staging"
GETH_VERBOSITY=2
GETH_ENABLE_METRICS=true

# TODO: deprecated
VM_BASED=false

KUBERNETES_CLUSTER_NAME="rc1staging"
KUBERNETES_CLUSTER_ZONE="us-west1-a"
CLUSTER_DOMAIN_NAME="celo-testnet"
Expand Down
1 change: 0 additions & 1 deletion .env.staging
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ GETH_NODE_DOCKER_IMAGE_TAG="8a44c2cd92200bdffce595c7558e84a39ea2bc15"

GETH_VERBOSITY=2

VM_BASED=false

KUBERNETES_CLUSTER_NAME=celo-networks-dev
KUBERNETES_CLUSTER_ZONE="us-west1-a"
Expand Down
52 changes: 47 additions & 5 deletions .github/workflows/circleci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,10 @@ jobs:
# needs: [install-dependencies, lint-checks]
needs: [install-dependencies]
if: |
github.base_ref == 'master' || contains(github.base_ref, 'staging') || contains(github.base_ref, 'production') ||
contains(needs.install-dependencies.outputs.all_modified_files, 'packages/protocol') ||
contains(needs.install-dependencies.outputs.all_modified_files, 'packages/sdk') ||
contains(needs.install-dependencies.outputs.all_modified_files, 'packages/typescript') ||
contains(needs.install-dependencies.outputs.all_modified_files, ',package.json') ||
contains(needs.install-dependencies.outputs.all_modified_files, ',yarn.lock') ||
false
Expand Down Expand Up @@ -256,7 +259,10 @@ jobs:
timeout-minutes: 30
needs: [install-dependencies, lint-checks, pre-protocol-test-release]
if: |
github.base_ref == 'master' || contains(github.base_ref, 'staging') || contains(github.base_ref, 'production') ||
contains(needs.install-dependencies.outputs.all_modified_files, 'packages/protocol') ||
contains(needs.install-dependencies.outputs.all_modified_files, 'packages/sdk') ||
contains(needs.install-dependencies.outputs.all_modified_files, 'packages/typescript') ||
contains(needs.install-dependencies.outputs.all_modified_files, ',package.json') ||
contains(needs.install-dependencies.outputs.all_modified_files, ',yarn.lock') ||
false
Expand Down Expand Up @@ -287,7 +293,10 @@ jobs:
timeout-minutes: 60
needs: [install-dependencies, lint-checks]
if: |
github.base_ref == 'master' || contains(github.base_ref, 'staging') || contains(github.base_ref, 'production') ||
contains(needs.install-dependencies.outputs.all_modified_files, 'packages/protocol') ||
contains(needs.install-dependencies.outputs.all_modified_files, 'packages/sdk') ||
contains(needs.install-dependencies.outputs.all_modified_files, 'packages/typescript') ||
contains(needs.install-dependencies.outputs.all_modified_files, ',package.json') ||
contains(needs.install-dependencies.outputs.all_modified_files, ',yarn.lock') ||
false
Expand Down Expand Up @@ -361,7 +370,11 @@ jobs:
timeout-minutes: 30
needs: [install-dependencies]
if: |
contains(needs.install-dependencies.outputs.all_modified_files, 'packages/contractkit') ||
github.base_ref == 'master' || contains(github.base_ref, 'staging') || contains(github.base_ref, 'production') ||
contains(needs.install-dependencies.outputs.all_modified_files, 'packages/protocol') ||
contains(needs.install-dependencies.outputs.all_modified_files, 'packages/dev-utils') ||
contains(needs.install-dependencies.outputs.all_modified_files, 'packages/sdk') ||
contains(needs.install-dependencies.outputs.all_modified_files, 'packages/typescript') ||
contains(needs.install-dependencies.outputs.all_modified_files, ',package.json') ||
contains(needs.install-dependencies.outputs.all_modified_files, ',yarn.lock') ||
false
Expand Down Expand Up @@ -389,7 +402,12 @@ jobs:
timeout-minutes: 30
needs: [install-dependencies, contractkit-tests]
if: |
contains(needs.install-dependencies.outputs.all_modified_files, 'packages/identity') ||
github.base_ref == 'master' || contains(github.base_ref, 'staging') || contains(github.base_ref, 'production') ||
contains(needs.install-dependencies.outputs.all_modified_files, 'packages/phone-number-privacy/common') ||
contains(needs.install-dependencies.outputs.all_modified_files, 'packages/protocol') ||
contains(needs.install-dependencies.outputs.all_modified_files, 'packages/dev-utils') ||
contains(needs.install-dependencies.outputs.all_modified_files, 'packages/sdk') ||
contains(needs.install-dependencies.outputs.all_modified_files, 'packages/typescript') ||
contains(needs.install-dependencies.outputs.all_modified_files, ',package.json') ||
contains(needs.install-dependencies.outputs.all_modified_files, ',yarn.lock') ||
false
Expand Down Expand Up @@ -417,7 +435,11 @@ jobs:
timeout-minutes: 30
needs: [install-dependencies, contractkit-tests]
if: |
contains(needs.install-dependencies.outputs.all_modified_files, 'packages/sdk/transactions-uri') ||
github.base_ref == 'master' || contains(github.base_ref, 'staging') || contains(github.base_ref, 'production') ||
contains(needs.install-dependencies.outputs.all_modified_files, 'packages/protocol') ||
contains(needs.install-dependencies.outputs.all_modified_files, 'packages/dev-utils') ||
contains(needs.install-dependencies.outputs.all_modified_files, 'packages/sdk') ||
contains(needs.install-dependencies.outputs.all_modified_files, 'packages/typescript') ||
contains(needs.install-dependencies.outputs.all_modified_files, ',package.json') ||
contains(needs.install-dependencies.outputs.all_modified_files, ',yarn.lock') ||
false
Expand Down Expand Up @@ -450,7 +472,13 @@ jobs:
timeout-minutes: 30
needs: [install-dependencies]
if: |
github.base_ref == 'master' || contains(github.base_ref, 'staging') || contains(github.base_ref, 'production') ||
contains(needs.install-dependencies.outputs.all_modified_files, 'packages/cli') ||
contains(needs.install-dependencies.outputs.all_modified_files, 'packages/phone-number-privacy/common') ||
contains(needs.install-dependencies.outputs.all_modified_files, 'packages/protocol') ||
contains(needs.install-dependencies.outputs.all_modified_files, 'packages/dev-utils') ||
contains(needs.install-dependencies.outputs.all_modified_files, 'packages/sdk') ||
contains(needs.install-dependencies.outputs.all_modified_files, 'packages/typescript') ||
contains(needs.install-dependencies.outputs.all_modified_files, ',package.json') ||
contains(needs.install-dependencies.outputs.all_modified_files, ',yarn.lock') ||
false
Expand Down Expand Up @@ -489,6 +517,7 @@ jobs:
timeout-minutes: 30
needs: [install-dependencies]
if: |
github.base_ref == 'master' || contains(github.base_ref, 'staging') || contains(github.base_ref, 'production') ||
contains(needs.install-dependencies.outputs.all_modified_files, 'packages/typescript') ||
contains(needs.install-dependencies.outputs.all_modified_files, ',package.json') ||
contains(needs.install-dependencies.outputs.all_modified_files, ',yarn.lock') ||
Expand Down Expand Up @@ -517,7 +546,9 @@ jobs:
timeout-minutes: 30
needs: [install-dependencies]
if: |
github.base_ref == 'master' || contains(github.base_ref, 'staging') || contains(github.base_ref, 'production') ||
contains(needs.install-dependencies.outputs.all_modified_files, 'packages/sdk') ||
contains(needs.install-dependencies.outputs.all_modified_files, 'packages/typescript') ||
contains(needs.install-dependencies.outputs.all_modified_files, ',package.json') ||
contains(needs.install-dependencies.outputs.all_modified_files, ',yarn.lock') ||
false
Expand Down Expand Up @@ -551,7 +582,9 @@ jobs:
timeout-minutes: 30
needs: [install-dependencies]
if: |
github.base_ref == 'master' || contains(github.base_ref, 'staging') || contains(github.base_ref, 'production') ||
contains(needs.install-dependencies.outputs.all_modified_files, 'packages/sdk') ||
contains(needs.install-dependencies.outputs.all_modified_files, 'packages/typescript') ||
contains(needs.install-dependencies.outputs.all_modified_files, ',package.json') ||
contains(needs.install-dependencies.outputs.all_modified_files, ',yarn.lock') ||
false
Expand Down Expand Up @@ -584,9 +617,13 @@ jobs:
timeout-minutes: 60
needs: [install-dependencies, lint-checks, contractkit-tests]
if: |
contains(needs.install-dependencies.outputs.all_modified_files, 'packages/protocol') ||
github.base_ref == 'master' || contains(github.base_ref, 'staging') || contains(github.base_ref, 'production') ||
contains(needs.install-dependencies.outputs.all_modified_files, 'packages/celotool') ||
contains(needs.install-dependencies.outputs.all_modified_files, 'packages/sdk/contractkit') ||
contains(needs.install-dependencies.outputs.all_modified_files, 'packages/phone-number-privacy/common') ||
contains(needs.install-dependencies.outputs.all_modified_files, 'packages/protocol') ||
contains(needs.install-dependencies.outputs.all_modified_files, 'packages/dev-utils') ||
contains(needs.install-dependencies.outputs.all_modified_files, 'packages/sdk') ||
contains(needs.install-dependencies.outputs.all_modified_files, 'packages/typescript') ||
contains(needs.install-dependencies.outputs.all_modified_files, ',package.json') ||
contains(needs.install-dependencies.outputs.all_modified_files, ',yarn.lock') ||
false
Expand Down Expand Up @@ -674,7 +711,10 @@ jobs:
timeout-minutes: 30
needs: [install-dependencies, lint-checks]
if: |
github.base_ref == 'master' || contains(github.base_ref, 'staging') || contains(github.base_ref, 'production') ||
contains(needs.install-dependencies.outputs.all_modified_files, 'packages/phone-number-privacy') ||
contains(needs.install-dependencies.outputs.all_modified_files, 'packages/protocol') ||
contains(needs.install-dependencies.outputs.all_modified_files, 'packages/sdk') ||
contains(needs.install-dependencies.outputs.all_modified_files, ',package.json') ||
contains(needs.install-dependencies.outputs.all_modified_files, ',yarn.lock') ||
false
Expand Down Expand Up @@ -708,7 +748,9 @@ jobs:
# Disable as certora license is not active
if: |
false && (
github.base_ref == 'master' || contains(github.base_ref, 'staging') || contains(github.base_ref, 'production') ||
contains(needs.install-dependencies.outputs.all_modified_files, 'packages/protocol') ||
contains(needs.install-dependencies.outputs.all_modified_files, 'packages/sdk') ||
contains(needs.install-dependencies.outputs.all_modified_files, ',package.json') ||
contains(needs.install-dependencies.outputs.all_modified_files, ',yarn.lock')
)
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/stale.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
pull-requests: write

steps:
- uses: actions/stale@v3
- uses: actions/stale@v8
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
stale-issue-message: 'This issue is stale and will be closed in 30 days without activity'
Expand Down
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,11 +110,10 @@ The repository has the following packages (sub projects):
- [cli](packages/cli) - tool that uses ContractKit to interact with the Celo protocol ([docs](https://docs.celo.org/command-line-interface/introduction))
- [dev-utils](packages/dev-utils) - a utils package for use as a dev dependency
- [docs](packages/docs) - technical documentation for the Celo project ([live](https://docs.celo.org/))
- [helm-charts](packages/helm-charts) - templatized deployments of entire environments to Kubernetes clusters
- [helm-charts](packages/helm-charts) - (DEPRECATED) templatized deployments of entire environments to Kubernetes clusters. Check [celo-org/charts](https://github.com/celo-org/charts) instead.
- [protocol](packages/protocol) - identity, stability and other smart contracts for the Celo protocol ([docs](https://docs.celo.org/celo-codebase/protocol))
- [sdk](packages/sdk) - Typescript packages for interacting with Celo, including Contracts, Wallets, Crypto++
- [contractkit](packages/sdk/contractkit) - library to help developers and validators interact with the protocol and its smart contracts ([docs](https://docs.celo.org/developer-guide/contractkit))
- [terraform-modules](packages/terraform-modules) - templatized deployments of entire VM-based testnets for Google Cloud Platform
- [typescript](packages/typescript) - no README available (improve?)

Code owners for each package can be found in [.github/CODEOWNERS](.github/CODEOWNERS).
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@
"minimist": "^1.2.5",
"mixin-deep": "^2.0.1",
"node-forge": "^0.10.0",
"node-gyp": "5.0.1",
"node-gyp": "^6.0.0",
"node-libs-react-native": "^1.2.0",
"node-notifier": "^8.0.2",
"normalize-url": "4.5.1",
Expand Down
4 changes: 2 additions & 2 deletions packages/celotool/src/cmds/deploy/destroy/cluster.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { printReleases } from 'src/cmds/deploy/list'
import { deleteCluster, getNonSystemHelmReleases, switchToClusterFromEnv } from 'src/lib/cluster'
import { EnvTypes, envVar, fetchEnv } from 'src/lib/env-utils'
import { envTypes, envVar, fetchEnv } from 'src/lib/env-utils'
import { exitIfCelotoolHelmDryRun } from 'src/lib/helm_deploy'
import { DestroyArgv } from '../../deploy/destroy'

Expand All @@ -13,7 +13,7 @@ export const builder = {}
export const handler = async (argv: DestroyArgv) => {
exitIfCelotoolHelmDryRun()
const envType = fetchEnv(envVar.ENV_TYPE)
if (envType !== EnvTypes.DEVELOPMENT) {
if (envType !== envTypes.DEVELOPMENT) {
console.error('You can only delete dev clusters')
process.exit(1)
}
Expand Down
14 changes: 0 additions & 14 deletions packages/celotool/src/cmds/deploy/destroy/forno.ts

This file was deleted.

2 changes: 0 additions & 2 deletions packages/celotool/src/cmds/deploy/destroy/testnet.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { switchToClusterFromEnv } from 'src/lib/cluster'
import { failIfVmBased } from 'src/lib/env-utils'
import { deleteFromCluster, deleteStaticIPs, exitIfCelotoolHelmDryRun } from 'src/lib/helm_deploy'
import { DestroyArgv } from '../../deploy/destroy'

Expand All @@ -10,7 +9,6 @@ export const builder = {}

export const handler = async (argv: DestroyArgv) => {
exitIfCelotoolHelmDryRun()
failIfVmBased()

await switchToClusterFromEnv(argv.celoEnv)

Expand Down
16 changes: 0 additions & 16 deletions packages/celotool/src/cmds/deploy/destroy/vm-testnet.ts

This file was deleted.

14 changes: 0 additions & 14 deletions packages/celotool/src/cmds/deploy/initial/forno.ts

This file was deleted.

3 changes: 0 additions & 3 deletions packages/celotool/src/cmds/deploy/initial/testnet.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { createClusterIfNotExists, setupCluster, switchToClusterFromEnv } from 'src/lib/cluster'
import { failIfVmBased } from 'src/lib/env-utils'
import {
createStaticIPs,
installHelmChart,
Expand Down Expand Up @@ -34,8 +33,6 @@ export const builder = (argv: yargs.Argv) => {
}

export const handler = async (argv: TestnetInitialArgv) => {
failIfVmBased()

const createdCluster = await createClusterIfNotExists()
await switchToClusterFromEnv(argv.celoEnv)

Expand Down
Loading

0 comments on commit f4366bd

Please sign in to comment.