From ea9e9e3620bafba16fbd224cd12876bbb437d4cd Mon Sep 17 00:00:00 2001 From: Natalie Bravo Date: Fri, 7 Jun 2024 18:46:23 -0300 Subject: [PATCH 1/6] remove layer zero events from tx classification --- src/utils/protocol-events-map.ts | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/src/utils/protocol-events-map.ts b/src/utils/protocol-events-map.ts index 45480bcb..6a41ad0f 100644 --- a/src/utils/protocol-events-map.ts +++ b/src/utils/protocol-events-map.ts @@ -70,10 +70,10 @@ export const protocolEventsMap: {readonly [key in ProtocolEvent]: ProtocolEventI events: [ eventMap[EventType.SecondarySaleFees], eventMap[EventType.BridgeableContractDeployed], - eventMap[EventType.AssignJob], - eventMap[EventType.RelayerParams], + // eventMap[EventType.AssignJob], // NOTE: LZ V1 events differ from LZ V2 events, so they will be ignored. + // eventMap[EventType.RelayerParams], // NOTE: LZ V1 events differ from LZ V2 events, so they will be ignored. // UNKNOWN EVENT: 0x4e41ee13e03cd5e0446487b524fdc48af6acf26c074dacdbdfb6b574b42c8146 - eventMap[EventType.PacketLZ], + // eventMap[EventType.PacketLZ], // NOTE: LZ V1 events differ from LZ V2 events, so they will be ignored. eventMap[EventType.CrossChainMessageSent], ], sqsEventNames: [SqsEventName.ContractDeployed, SqsEventName.BridgePreProcess], @@ -111,10 +111,10 @@ export const protocolEventsMap: {readonly [key in ProtocolEvent]: ProtocolEventI events: [ // eventMap[EventType.TransferERC721], // NOTE: transfer checks are skipped for efficiency. Filtering transfer logs is costly, and all relevant data is already available in the HolographableContractEvent. eventMap[EventType.HolographableContractEvent], - eventMap[EventType.AssignJob], - eventMap[EventType.RelayerParams], + // eventMap[EventType.AssignJob], // NOTE: LZ V1 events differ from LZ V2 events, so they will be ignored. + // eventMap[EventType.RelayerParams], // UNKNOWN EVENT: 0x4e41ee13e03cd5e0446487b524fdc48af6acf26c074dacdbdfb6b574b42c8146 - eventMap[EventType.PacketLZ], + // eventMap[EventType.PacketLZ], eventMap[EventType.CrossChainMessageSent], ], sqsEventNames: [SqsEventName.BridgePreProcess], @@ -124,7 +124,10 @@ export const protocolEventsMap: {readonly [key in ProtocolEvent]: ProtocolEventI [ProtocolEvent.AvailableOperatorJob]: { name: ProtocolEvent.AvailableOperatorJob, contractMethodName: ContractMethodId.validateTransactionProofV1, - events: [eventMap[EventType.AvailableOperatorJob], eventMap[EventType.PacketReceived]], + events: [ + eventMap[EventType.AvailableOperatorJob], + // eventMap[EventType.PacketReceived] // NOTE: LZ V1 events differ from LZ V2 events, so they will be ignored. + ], sqsEventNames: [SqsEventName.AvailableOperatorJob], validateAndGetSqsEvents: (interestingTransaction: InterestingTransaction) => getSqsEventsFromTx(ProtocolEvent.AvailableOperatorJob, interestingTransaction), From 590848634b8ddebf2be45edb16037b2f58bafc74 Mon Sep 17 00:00:00 2001 From: Kostas Demiris Date: Tue, 11 Jun 2024 16:07:22 +0300 Subject: [PATCH 2/6] deploy clis in staging2 --- .../develop/deploy-indexer/action.yaml | 18 ++--- .../develop/deploy-operator/action.yaml | 18 ++--- .../actions/develop/initial-setup/action.yaml | 70 +++++++++---------- .github/workflows/cicd_clis_develop.yaml | 11 ++- 4 files changed, 58 insertions(+), 59 deletions(-) diff --git a/.github/actions/develop/deploy-indexer/action.yaml b/.github/actions/develop/deploy-indexer/action.yaml index fc9396f1..91cc2d09 100644 --- a/.github/actions/develop/deploy-indexer/action.yaml +++ b/.github/actions/develop/deploy-indexer/action.yaml @@ -2,7 +2,7 @@ name: 'deploy-indexer' runs: using: 'composite' steps: - - name: -> V2 -- Deploy INDEXER cli in staging [namespace -> ${{ env.STG_COMMON_NAMESPACE_V2 }}] + - name: -> V2 -- Deploy INDEXER cli in staging2 uses: tensor-hq/eksctl-helm-action@main env: RELEASE_NAME: ${{ env.INDEXER_RELEASE_NAME_V2 }} # notice @@ -110,16 +110,16 @@ runs: --set datadog_tags.version=$RELEASE_NAME-${{ env.STG_HOLOGRAPH_INDEXER_HELM_CHART_VERSION }} \ \ --set autoscaling.enabled=false \ - --set replicaCountAvalanche=1 \ + --set replicaCountAvalanche=0 \ --set replicaCountPolygon=0 \ - --set replicaCountBinance=1 \ + --set replicaCountBinance=0 \ --set replicaCountMantle=0 \ - --set replicaCountEthereum=1 \ - --set replicaCountArbitrum=1 \ - --set replicaCountOptimism=1 \ - --set replicaCountBase=1 \ - --set replicaCountLinea=1 \ - --set replicaCountZora=1 \ + --set replicaCountEthereum=0 \ + --set replicaCountArbitrum=0 \ + --set replicaCountOptimism=0 \ + --set replicaCountBase=0 \ + --set replicaCountLinea=0 \ + --set replicaCountZora=0 \ \ --set sqs.SQS_USER_AWS_ACCESS_KEY_ID=$COMMON_AWS_ACCESS_KEY_ID_SQS \ --set sqs.SQS_USER_AWS_SECRET_ACCESS_KEY=$COMMON_AWS_SECRET_ACCESS_KEY_SQS \ diff --git a/.github/actions/develop/deploy-operator/action.yaml b/.github/actions/develop/deploy-operator/action.yaml index c8d562b3..c1086c6d 100644 --- a/.github/actions/develop/deploy-operator/action.yaml +++ b/.github/actions/develop/deploy-operator/action.yaml @@ -2,7 +2,7 @@ name: 'deploy-operator' runs: using: 'composite' steps: - - name: -> V2 -- Deploy OPERATOR cli in staging [namespace -> ${{ env.STG_COMMON_NAMESPACE_V2 }}] + - name: -> V2 -- Deploy OPERATOR cli in staging2 uses: tensor-hq/eksctl-helm-action@main env: RELEASE_NAME: ${{ env.OPERATOR_RELEASE_NAME_V2 }} # notice @@ -103,16 +103,16 @@ runs: --set dev_rpc_config_values.address=$DEV_OPERATOR_V2_DEV_WALLET_ADDRESS \ \ --set autoscaling.enabled=false \ - --set replicaCountAvalanche=1 \ + --set replicaCountAvalanche=0 \ --set replicaCountPolygon=0 \ - --set replicaCountBinance=1 \ + --set replicaCountBinance=0 \ --set replicaCountMantle=0 \ - --set replicaCountEthereum=1 \ - --set replicaCountArbitrum=1 \ - --set replicaCountOptimism=1 \ - --set replicaCountBase=1 \ - --set replicaCountLinea=1 \ - --set replicaCountZora=1 \ + --set replicaCountEthereum=0 \ + --set replicaCountArbitrum=0 \ + --set replicaCountOptimism=0 \ + --set replicaCountBase=0 \ + --set replicaCountLinea=0 \ + --set replicaCountZora=0 \ \ --set datadog_tags.env=${{ env.CLUSTER_NAME }} \ --set datadog_tags.service=$RELEASE_NAME \ diff --git a/.github/actions/develop/initial-setup/action.yaml b/.github/actions/develop/initial-setup/action.yaml index d48f87d4..30be33ca 100644 --- a/.github/actions/develop/initial-setup/action.yaml +++ b/.github/actions/develop/initial-setup/action.yaml @@ -25,41 +25,41 @@ runs: - name: Checkout the code uses: actions/checkout@v4 - # This is a separate action that sets up buildx runner - - name: Set up Docker Buildx - id: buildx - uses: docker/setup-buildx-action@v2 - - # So now you can use Actions' own caching! - - name: Cache Docker layers - uses: actions/cache@v2 - with: - path: /tmp/.buildx-cache - key: ${{ runner.os }}-single-buildx-${{ github.sha }} - restore-keys: | - ${{ runner.os }}-single-buildx - - # And make it available for builds - - name: Build image - uses: docker/build-push-action@v2 - with: - context: . - builder: ${{ steps.buildx.outputs.name }} - file: Dockerfile - build-args: AWS_ECR_URL=${{ steps.login-ecr.outputs.registry }} - platforms: linux/amd64 - tags: ${{ steps.login-ecr.outputs.registry }}/${{ env.ECR_REPOSITORY }}:${{ env.IMAGE_TAG }} - cache-from: type=local,src=/tmp/.buildx-cache - cache-to: type=local,dest=/tmp/.buildx-cache-new - push: true # set false to deactivate the push to ECR - - # This ugly bit is necessary if you don't want your cache to grow forever until it hits GitHub's limit of 5GB. - # https://github.com/docker/build-push-action/issues/252 & https://github.com/moby/buildkit/issues/1896 - - name: Move cache - shell: bash - run: | - rm -rf /tmp/.buildx-cache - mv /tmp/.buildx-cache-new /tmp/.buildx-cache +# # This is a separate action that sets up buildx runner +# - name: Set up Docker Buildx +# id: buildx +# uses: docker/setup-buildx-action@v2 +# +# # So now you can use Actions' own caching! +# - name: Cache Docker layers +# uses: actions/cache@v2 +# with: +# path: /tmp/.buildx-cache +# key: ${{ runner.os }}-single-buildx-${{ github.sha }} +# restore-keys: | +# ${{ runner.os }}-single-buildx +# +# # And make it available for builds +# - name: Build image +# uses: docker/build-push-action@v2 +# with: +# context: . +# builder: ${{ steps.buildx.outputs.name }} +# file: Dockerfile +# build-args: AWS_ECR_URL=${{ steps.login-ecr.outputs.registry }} +# platforms: linux/amd64 +# tags: ${{ steps.login-ecr.outputs.registry }}/${{ env.ECR_REPOSITORY }}:${{ env.IMAGE_TAG }} +# cache-from: type=local,src=/tmp/.buildx-cache +# cache-to: type=local,dest=/tmp/.buildx-cache-new +# push: true # set false to deactivate the push to ECR +# +# # This ugly bit is necessary if you don't want your cache to grow forever until it hits GitHub's limit of 5GB. +# # https://github.com/docker/build-push-action/issues/252 & https://github.com/moby/buildkit/issues/1896 +# - name: Move cache +# shell: bash +# run: | +# rm -rf /tmp/.buildx-cache +# mv /tmp/.buildx-cache-new /tmp/.buildx-cache - name: Configure AWS creds to access EKS # TIP: the deployment user must be in the masters group in the aws-auth config map in the cluster diff --git a/.github/workflows/cicd_clis_develop.yaml b/.github/workflows/cicd_clis_develop.yaml index bb6909c0..76eeff6e 100644 --- a/.github/workflows/cicd_clis_develop.yaml +++ b/.github/workflows/cicd_clis_develop.yaml @@ -1,4 +1,4 @@ -name: Deploy V2 holoclis to staging[develop-v2] +name: Deploy V2 clis to staging2[develop-v2] permissions: id-token: write @@ -9,9 +9,9 @@ env: IAM_ROLE: arn:aws:iam::177635894328:role/Github_role_to_access_ECR ECR_REPOSITORY: holo-cli-dev # notice: the same for all cli apps # - IMAGE_TAG: dev-${{ github.sha }} + IMAGE_TAG: dev-761cf971c70a0397eab22a4049d8d01c1acf982f #dev-${{ github.sha }} # - CLUSTER_NAME: staging + CLUSTER_NAME: 'staging2' # AWS_KEY_ID: ${{ secrets.NEWSTAGE_USER_AWS_ACCESS_KEY_ID }} AWS_ACCESS_KEY: ${{ secrets.NEWSTAGE_USER_AWS_SECRET_ACCESS_KEY }} @@ -26,8 +26,6 @@ env: HOLOGRAPH_ENVIRONMENT: develop BLOCK_PROCESSING_VERSION: 'V2' # - STG_DOMAIN: 'holograph.xyz' # needed only for the health checks - # # SQS User [indexer_processor_sqs_user] # STG_COMMON_NAMESPACE_V2: 'develop-v2' @@ -42,7 +40,8 @@ env: on: push: branches: - - 'develop' +# - 'develop' + - 'feat/staging2-cli-deployment' # Excluded branches - '!testnet' - '!main' From 03d6fead217ead83b3d244e48ea5e60afa331fd6 Mon Sep 17 00:00:00 2001 From: Kostas Demiris Date: Wed, 12 Jun 2024 13:53:49 +0300 Subject: [PATCH 3/6] ready for PR in develop --- .../develop/deploy-indexer/action.yaml | 16 ++--- .../develop/deploy-operator/action.yaml | 16 ++--- .../actions/develop/initial-setup/action.yaml | 70 +++++++++---------- .github/workflows/cicd_clis_develop.yaml | 5 +- 4 files changed, 53 insertions(+), 54 deletions(-) diff --git a/.github/actions/develop/deploy-indexer/action.yaml b/.github/actions/develop/deploy-indexer/action.yaml index 91cc2d09..4159b25a 100644 --- a/.github/actions/develop/deploy-indexer/action.yaml +++ b/.github/actions/develop/deploy-indexer/action.yaml @@ -110,16 +110,16 @@ runs: --set datadog_tags.version=$RELEASE_NAME-${{ env.STG_HOLOGRAPH_INDEXER_HELM_CHART_VERSION }} \ \ --set autoscaling.enabled=false \ - --set replicaCountAvalanche=0 \ + --set replicaCountAvalanche=1 \ --set replicaCountPolygon=0 \ - --set replicaCountBinance=0 \ + --set replicaCountBinance=1 \ --set replicaCountMantle=0 \ - --set replicaCountEthereum=0 \ - --set replicaCountArbitrum=0 \ - --set replicaCountOptimism=0 \ - --set replicaCountBase=0 \ - --set replicaCountLinea=0 \ - --set replicaCountZora=0 \ + --set replicaCountEthereum=1 \ + --set replicaCountArbitrum=1 \ + --set replicaCountOptimism=1 \ + --set replicaCountBase=1 \ + --set replicaCountLinea=1 \ + --set replicaCountZora=1 \ \ --set sqs.SQS_USER_AWS_ACCESS_KEY_ID=$COMMON_AWS_ACCESS_KEY_ID_SQS \ --set sqs.SQS_USER_AWS_SECRET_ACCESS_KEY=$COMMON_AWS_SECRET_ACCESS_KEY_SQS \ diff --git a/.github/actions/develop/deploy-operator/action.yaml b/.github/actions/develop/deploy-operator/action.yaml index c1086c6d..8f4f970d 100644 --- a/.github/actions/develop/deploy-operator/action.yaml +++ b/.github/actions/develop/deploy-operator/action.yaml @@ -103,16 +103,16 @@ runs: --set dev_rpc_config_values.address=$DEV_OPERATOR_V2_DEV_WALLET_ADDRESS \ \ --set autoscaling.enabled=false \ - --set replicaCountAvalanche=0 \ + --set replicaCountAvalanche=1 \ --set replicaCountPolygon=0 \ - --set replicaCountBinance=0 \ + --set replicaCountBinance=1 \ --set replicaCountMantle=0 \ - --set replicaCountEthereum=0 \ - --set replicaCountArbitrum=0 \ - --set replicaCountOptimism=0 \ - --set replicaCountBase=0 \ - --set replicaCountLinea=0 \ - --set replicaCountZora=0 \ + --set replicaCountEthereum=1 \ + --set replicaCountArbitrum=1 \ + --set replicaCountOptimism=1 \ + --set replicaCountBase=1 \ + --set replicaCountLinea=1 \ + --set replicaCountZora=1 \ \ --set datadog_tags.env=${{ env.CLUSTER_NAME }} \ --set datadog_tags.service=$RELEASE_NAME \ diff --git a/.github/actions/develop/initial-setup/action.yaml b/.github/actions/develop/initial-setup/action.yaml index 30be33ca..d48f87d4 100644 --- a/.github/actions/develop/initial-setup/action.yaml +++ b/.github/actions/develop/initial-setup/action.yaml @@ -25,41 +25,41 @@ runs: - name: Checkout the code uses: actions/checkout@v4 -# # This is a separate action that sets up buildx runner -# - name: Set up Docker Buildx -# id: buildx -# uses: docker/setup-buildx-action@v2 -# -# # So now you can use Actions' own caching! -# - name: Cache Docker layers -# uses: actions/cache@v2 -# with: -# path: /tmp/.buildx-cache -# key: ${{ runner.os }}-single-buildx-${{ github.sha }} -# restore-keys: | -# ${{ runner.os }}-single-buildx -# -# # And make it available for builds -# - name: Build image -# uses: docker/build-push-action@v2 -# with: -# context: . -# builder: ${{ steps.buildx.outputs.name }} -# file: Dockerfile -# build-args: AWS_ECR_URL=${{ steps.login-ecr.outputs.registry }} -# platforms: linux/amd64 -# tags: ${{ steps.login-ecr.outputs.registry }}/${{ env.ECR_REPOSITORY }}:${{ env.IMAGE_TAG }} -# cache-from: type=local,src=/tmp/.buildx-cache -# cache-to: type=local,dest=/tmp/.buildx-cache-new -# push: true # set false to deactivate the push to ECR -# -# # This ugly bit is necessary if you don't want your cache to grow forever until it hits GitHub's limit of 5GB. -# # https://github.com/docker/build-push-action/issues/252 & https://github.com/moby/buildkit/issues/1896 -# - name: Move cache -# shell: bash -# run: | -# rm -rf /tmp/.buildx-cache -# mv /tmp/.buildx-cache-new /tmp/.buildx-cache + # This is a separate action that sets up buildx runner + - name: Set up Docker Buildx + id: buildx + uses: docker/setup-buildx-action@v2 + + # So now you can use Actions' own caching! + - name: Cache Docker layers + uses: actions/cache@v2 + with: + path: /tmp/.buildx-cache + key: ${{ runner.os }}-single-buildx-${{ github.sha }} + restore-keys: | + ${{ runner.os }}-single-buildx + + # And make it available for builds + - name: Build image + uses: docker/build-push-action@v2 + with: + context: . + builder: ${{ steps.buildx.outputs.name }} + file: Dockerfile + build-args: AWS_ECR_URL=${{ steps.login-ecr.outputs.registry }} + platforms: linux/amd64 + tags: ${{ steps.login-ecr.outputs.registry }}/${{ env.ECR_REPOSITORY }}:${{ env.IMAGE_TAG }} + cache-from: type=local,src=/tmp/.buildx-cache + cache-to: type=local,dest=/tmp/.buildx-cache-new + push: true # set false to deactivate the push to ECR + + # This ugly bit is necessary if you don't want your cache to grow forever until it hits GitHub's limit of 5GB. + # https://github.com/docker/build-push-action/issues/252 & https://github.com/moby/buildkit/issues/1896 + - name: Move cache + shell: bash + run: | + rm -rf /tmp/.buildx-cache + mv /tmp/.buildx-cache-new /tmp/.buildx-cache - name: Configure AWS creds to access EKS # TIP: the deployment user must be in the masters group in the aws-auth config map in the cluster diff --git a/.github/workflows/cicd_clis_develop.yaml b/.github/workflows/cicd_clis_develop.yaml index 76eeff6e..6f0587d5 100644 --- a/.github/workflows/cicd_clis_develop.yaml +++ b/.github/workflows/cicd_clis_develop.yaml @@ -9,7 +9,7 @@ env: IAM_ROLE: arn:aws:iam::177635894328:role/Github_role_to_access_ECR ECR_REPOSITORY: holo-cli-dev # notice: the same for all cli apps # - IMAGE_TAG: dev-761cf971c70a0397eab22a4049d8d01c1acf982f #dev-${{ github.sha }} + IMAGE_TAG: dev-${{ github.sha }} # CLUSTER_NAME: 'staging2' # @@ -40,8 +40,7 @@ env: on: push: branches: -# - 'develop' - - 'feat/staging2-cli-deployment' + - 'develop' # Excluded branches - '!testnet' - '!main' From 031a04aee1818374fcf093656d943cfc2df4e9ec Mon Sep 17 00:00:00 2001 From: Kostas Demiris Date: Thu, 20 Jun 2024 14:39:19 +0300 Subject: [PATCH 4/6] deploy testnet clis in prod2 --- .../testnet/deploy-indexer/action.yaml | 18 ++--- .../testnet/deploy-operator/action.yaml | 18 ++--- .../actions/testnet/initial-setup/action.yaml | 74 +++++++++---------- .github/workflows/cicd_clis_develop.yaml | 4 +- .github/workflows/cicd_clis_testnet.yaml | 40 +++++----- 5 files changed, 75 insertions(+), 79 deletions(-) diff --git a/.github/actions/testnet/deploy-indexer/action.yaml b/.github/actions/testnet/deploy-indexer/action.yaml index 4c378614..d7730f66 100644 --- a/.github/actions/testnet/deploy-indexer/action.yaml +++ b/.github/actions/testnet/deploy-indexer/action.yaml @@ -2,7 +2,7 @@ name: 'deploy-indexer' runs: using: 'composite' steps: - - name: -> V2 -- Deploy INDEXER cli in TESTNET [namespace -> ${{ env.TESTNET_COMMON_NAMESPACE_V2 }}] + - name: -> V2 -- Deploy INDEXER cli in TESTNET uses: tensor-hq/eksctl-helm-action@main env: RELEASE_NAME: ${{ env.INDEXER_RELEASE_NAME_V2 }} # notice @@ -110,16 +110,16 @@ runs: --set datadog_tags.version=$RELEASE_NAME-${{ env.TESTNET_HOLO_INDEXER_HELM_CHART_VERSION }} \ \ --set autoscaling.enabled=false \ - --set replicaCountAvalanche=1 \ + --set replicaCountAvalanche=0 \ --set replicaCountPolygon=0 \ - --set replicaCountBinance=1 \ + --set replicaCountBinance=0 \ --set replicaCountMantle=0 \ - --set replicaCountEthereum=1 \ - --set replicaCountArbitrum=1 \ - --set replicaCountOptimism=1 \ - --set replicaCountBase=1 \ - --set replicaCountLinea=1 \ - --set replicaCountZora=1 \ + --set replicaCountEthereum=0 \ + --set replicaCountArbitrum=0 \ + --set replicaCountOptimism=0 \ + --set replicaCountBase=0 \ + --set replicaCountLinea=0 \ + --set replicaCountZora=0 \ \ --set sqs.SQS_USER_AWS_ACCESS_KEY_ID=$COMMON_AWS_ACCESS_KEY_ID_SQS \ --set sqs.SQS_USER_AWS_SECRET_ACCESS_KEY=$COMMON_AWS_SECRET_ACCESS_KEY_SQS \ diff --git a/.github/actions/testnet/deploy-operator/action.yaml b/.github/actions/testnet/deploy-operator/action.yaml index e9136c58..577cf456 100644 --- a/.github/actions/testnet/deploy-operator/action.yaml +++ b/.github/actions/testnet/deploy-operator/action.yaml @@ -2,7 +2,7 @@ name: 'deploy-operator' runs: using: 'composite' steps: - - name: -> V2 -- Deploy OPERATOR cli in TESTNET [namespace -> ${{ env.TESTNET_COMMON_NAMESPACE_V2 }}] + - name: -> V2 -- Deploy OPERATOR cli in TESTNET uses: tensor-hq/eksctl-helm-action@main env: RELEASE_NAME: ${{ env.OPERATOR_RELEASE_NAME_V2 }} # notice @@ -103,16 +103,16 @@ runs: --set testnet_rpc_config_values.address=$TESTNET_OPERATOR_V2_TESTNET_WALLET_ADDRESS \ \ --set autoscaling.enabled=false \ - --set replicaCountAvalanche=1 \ + --set replicaCountAvalanche=0 \ --set replicaCountPolygon=0 \ - --set replicaCountBinance=1 \ + --set replicaCountBinance=0 \ --set replicaCountMantle=0 \ - --set replicaCountEthereum=1 \ - --set replicaCountArbitrum=1 \ - --set replicaCountOptimism=1 \ - --set replicaCountBase=1 \ - --set replicaCountLinea=1 \ - --set replicaCountZora=1 \ + --set replicaCountEthereum=0 \ + --set replicaCountArbitrum=0 \ + --set replicaCountOptimism=0 \ + --set replicaCountBase=0 \ + --set replicaCountLinea=0 \ + --set replicaCountZora=0 \ \ --set datadog_tags.env=${{ env.CLUSTER_NAME }} \ --set datadog_tags.service=$RELEASE_NAME \ diff --git a/.github/actions/testnet/initial-setup/action.yaml b/.github/actions/testnet/initial-setup/action.yaml index 3e5a1498..b3b59a7c 100644 --- a/.github/actions/testnet/initial-setup/action.yaml +++ b/.github/actions/testnet/initial-setup/action.yaml @@ -25,41 +25,41 @@ runs: - name: Checkout the code uses: actions/checkout@v2 - # This is a separate action that sets up buildx runner - - name: Set up Docker Buildx - id: buildx - uses: docker/setup-buildx-action@v2 - - # So now you can use Actions' own caching! - - name: Cache Docker layers - uses: actions/cache@v2 - with: - path: /tmp/.buildx-cache - key: ${{ runner.os }}-single-buildx-${{ github.sha }} - restore-keys: | - ${{ runner.os }}-single-buildx - - # And make it available for builds - - name: Build image - uses: docker/build-push-action@v2 - with: - context: . - builder: ${{ steps.buildx.outputs.name }} - file: Dockerfile - build-args: AWS_ECR_URL=${{ steps.login-ecr.outputs.registry }} - platforms: linux/amd64 - tags: ${{ steps.login-ecr.outputs.registry }}/${{ env.ECR_REPOSITORY }}:${{ env.IMAGE_TAG }} - cache-from: type=local,src=/tmp/.buildx-cache - cache-to: type=local,dest=/tmp/.buildx-cache-new - push: true # set false to deactivate the push to ECR - - # This ugly bit is necessary if you don't want your cache to grow forever until it hits GitHub's limit of 5GB. - # https://github.com/docker/build-push-action/issues/252 & https://github.com/moby/buildkit/issues/1896 - - name: Move cache - shell: bash - run: | - rm -rf /tmp/.buildx-cache - mv /tmp/.buildx-cache-new /tmp/.buildx-cache +# # This is a separate action that sets up buildx runner +# - name: Set up Docker Buildx +# id: buildx +# uses: docker/setup-buildx-action@v2 +# +# # So now you can use Actions' own caching! +# - name: Cache Docker layers +# uses: actions/cache@v2 +# with: +# path: /tmp/.buildx-cache +# key: ${{ runner.os }}-single-buildx-${{ github.sha }} +# restore-keys: | +# ${{ runner.os }}-single-buildx +# +# # And make it available for builds +# - name: Build image +# uses: docker/build-push-action@v2 +# with: +# context: . +# builder: ${{ steps.buildx.outputs.name }} +# file: Dockerfile +# build-args: AWS_ECR_URL=${{ steps.login-ecr.outputs.registry }} +# platforms: linux/amd64 +# tags: ${{ steps.login-ecr.outputs.registry }}/${{ env.ECR_REPOSITORY }}:${{ env.IMAGE_TAG }} +# cache-from: type=local,src=/tmp/.buildx-cache +# cache-to: type=local,dest=/tmp/.buildx-cache-new +# push: true # set false to deactivate the push to ECR +# +# # This ugly bit is necessary if you don't want your cache to grow forever until it hits GitHub's limit of 5GB. +# # https://github.com/docker/build-push-action/issues/252 & https://github.com/moby/buildkit/issues/1896 +# - name: Move cache +# shell: bash +# run: | +# rm -rf /tmp/.buildx-cache +# mv /tmp/.buildx-cache-new /tmp/.buildx-cache - name: Configure AWS creds to access EKS # TIP: the deployment user must be in the masters group in the aws-auth config map in the cluster @@ -80,10 +80,8 @@ runs: - name: Pull the holograph-indexer helm chart version x.x.x from ECR shell: bash env: - # CHART_REPO: holo-indexer CHART_VERSION: ${{ env.TESTNET_HOLO_INDEXER_HELM_CHART_VERSION }} - # ECR_REGISTRY: ${{ steps.login-ecr.outputs.registry }} run: | helm pull oci://$ECR_REGISTRY/$CHART_REPO --version $CHART_VERSION @@ -93,10 +91,8 @@ runs: - name: Pull the holograph-operator helm chart version x.x.x from ECR shell: bash env: - # CHART_REPO: holo-operator CHART_VERSION: ${{ env.TESTNET_HOLO_OPERATOR_HELM_CHART_VERSION }} - # ECR_REGISTRY: ${{ steps.login-ecr.outputs.registry }} run: | helm pull oci://$ECR_REGISTRY/$CHART_REPO --version $CHART_VERSION diff --git a/.github/workflows/cicd_clis_develop.yaml b/.github/workflows/cicd_clis_develop.yaml index 6f0587d5..f0b45725 100644 --- a/.github/workflows/cicd_clis_develop.yaml +++ b/.github/workflows/cicd_clis_develop.yaml @@ -30,10 +30,10 @@ env: # STG_COMMON_NAMESPACE_V2: 'develop-v2' ####################################### - STG_HOLOGRAPH_INDEXER_HELM_CHART_VERSION: 0.1.88 + STG_HOLOGRAPH_INDEXER_HELM_CHART_VERSION: 0.1.89 INDEXER_RELEASE_NAME_V2: 'indexer-dev-v2' # format -> [release_name]-indexer-[env] # - STG_HOLOGRAPH_OPERATOR_HELM_CHART_VERSION: 0.1.20 + STG_HOLOGRAPH_OPERATOR_HELM_CHART_VERSION: 0.1.21 OPERATOR_RELEASE_NAME_V2: 'operator-dev-v2' # format -> [release_name]-indexer-[env] ####################################### diff --git a/.github/workflows/cicd_clis_testnet.yaml b/.github/workflows/cicd_clis_testnet.yaml index c9fca30c..bf904d80 100644 --- a/.github/workflows/cicd_clis_testnet.yaml +++ b/.github/workflows/cicd_clis_testnet.yaml @@ -1,4 +1,4 @@ -name: Deploy V2 holoclis to prod[testnet-v2] +name: Deploy V2 holoclis to prod2[testnet-v2] permissions: id-token: write @@ -7,11 +7,11 @@ permissions: env: AWS_REGION: us-west-2 IAM_ROLE: arn:aws:iam::177635894328:role/Github_role_to_access_ECR - ECR_REPOSITORY: holo-cli # notice: the same for all cli apps + ECR_REPOSITORY: holo-cli # - IMAGE_TAG: testnet-${{ github.sha }} + IMAGE_TAG: testnet-c95c0112f803289fe110e42fbb13a5694c6fbf01 #testnet-${{ github.sha }} # - CLUSTER_NAME: prod0 + CLUSTER_NAME: 'prod2' # AWS_KEY_ID: ${{ secrets.PROD0_CICD_USER_AWS_ACCESS_KEY_ID }} AWS_ACCESS_KEY: ${{ secrets.PROD0_CICD_USER_AWS_SECRET_ACCESS_KEY }} @@ -30,33 +30,33 @@ env: # TESTNET_COMMON_NAMESPACE_V2: 'testnet-v2' ####################################### - TESTNET_HOLO_INDEXER_HELM_CHART_VERSION: 0.1.88 + TESTNET_HOLO_INDEXER_HELM_CHART_VERSION: 0.1.89 INDEXER_RELEASE_NAME_V2: 'blondie-indexer-testnet-v2' # format -> [release_name]-indexer-[env] # - TESTNET_HOLO_OPERATOR_HELM_CHART_VERSION: 0.1.20 + TESTNET_HOLO_OPERATOR_HELM_CHART_VERSION: 0.1.21 OPERATOR_RELEASE_NAME_V2: 'blondie-operator-testnet-v2' # format -> [release_name]-indexer-[env] ####################################### -# notice: the trigger -#on: -# push: -# branches: -# - 'something' -# # Excluded branches -# - '!develop' -# - '!main' -# - '!master' # notice: the trigger on: - pull_request: + push: branches: - - 'testnet' - # - 'deactivated' - types: [closed] + - 'feat/deploy-testnet-clis-into-staging2' + # Excluded branches + - '!develop' + - '!main' + - '!master' +# notice: the trigger +#on: +# pull_request: +# branches: +# - 'testnet' +# # - 'deactivated' +# types: [closed] jobs: deploy-clis-testnet: - if: github.event.pull_request.merged == true # so no workflow runs when some PR is just closed without being merged +# if: github.event.pull_request.merged == true # so no workflow runs when some PR is just closed without being merged name: Deploy-on-testnet runs-on: ubuntu-latest From 44473d71018c37fdacf80837c81d35289c529920 Mon Sep 17 00:00:00 2001 From: Kostas Demiris Date: Thu, 20 Jun 2024 14:45:54 +0300 Subject: [PATCH 5/6] ready for PR into testnet --- .../testnet/deploy-indexer/action.yaml | 16 ++--- .../testnet/deploy-operator/action.yaml | 16 ++--- .../actions/testnet/initial-setup/action.yaml | 70 +++++++++---------- .github/workflows/cicd_clis_testnet.yaml | 28 ++++---- 4 files changed, 65 insertions(+), 65 deletions(-) diff --git a/.github/actions/testnet/deploy-indexer/action.yaml b/.github/actions/testnet/deploy-indexer/action.yaml index d7730f66..04417c44 100644 --- a/.github/actions/testnet/deploy-indexer/action.yaml +++ b/.github/actions/testnet/deploy-indexer/action.yaml @@ -110,16 +110,16 @@ runs: --set datadog_tags.version=$RELEASE_NAME-${{ env.TESTNET_HOLO_INDEXER_HELM_CHART_VERSION }} \ \ --set autoscaling.enabled=false \ - --set replicaCountAvalanche=0 \ + --set replicaCountAvalanche=1 \ --set replicaCountPolygon=0 \ - --set replicaCountBinance=0 \ + --set replicaCountBinance=1 \ --set replicaCountMantle=0 \ - --set replicaCountEthereum=0 \ - --set replicaCountArbitrum=0 \ - --set replicaCountOptimism=0 \ - --set replicaCountBase=0 \ - --set replicaCountLinea=0 \ - --set replicaCountZora=0 \ + --set replicaCountEthereum=1 \ + --set replicaCountArbitrum=1 \ + --set replicaCountOptimism=1 \ + --set replicaCountBase=1 \ + --set replicaCountLinea=1 \ + --set replicaCountZora=1 \ \ --set sqs.SQS_USER_AWS_ACCESS_KEY_ID=$COMMON_AWS_ACCESS_KEY_ID_SQS \ --set sqs.SQS_USER_AWS_SECRET_ACCESS_KEY=$COMMON_AWS_SECRET_ACCESS_KEY_SQS \ diff --git a/.github/actions/testnet/deploy-operator/action.yaml b/.github/actions/testnet/deploy-operator/action.yaml index 577cf456..fa135073 100644 --- a/.github/actions/testnet/deploy-operator/action.yaml +++ b/.github/actions/testnet/deploy-operator/action.yaml @@ -103,16 +103,16 @@ runs: --set testnet_rpc_config_values.address=$TESTNET_OPERATOR_V2_TESTNET_WALLET_ADDRESS \ \ --set autoscaling.enabled=false \ - --set replicaCountAvalanche=0 \ + --set replicaCountAvalanche=1 \ --set replicaCountPolygon=0 \ - --set replicaCountBinance=0 \ + --set replicaCountBinance=1 \ --set replicaCountMantle=0 \ - --set replicaCountEthereum=0 \ - --set replicaCountArbitrum=0 \ - --set replicaCountOptimism=0 \ - --set replicaCountBase=0 \ - --set replicaCountLinea=0 \ - --set replicaCountZora=0 \ + --set replicaCountEthereum=1 \ + --set replicaCountArbitrum=1 \ + --set replicaCountOptimism=1 \ + --set replicaCountBase=1 \ + --set replicaCountLinea=1 \ + --set replicaCountZora=1 \ \ --set datadog_tags.env=${{ env.CLUSTER_NAME }} \ --set datadog_tags.service=$RELEASE_NAME \ diff --git a/.github/actions/testnet/initial-setup/action.yaml b/.github/actions/testnet/initial-setup/action.yaml index b3b59a7c..cd795a58 100644 --- a/.github/actions/testnet/initial-setup/action.yaml +++ b/.github/actions/testnet/initial-setup/action.yaml @@ -25,41 +25,41 @@ runs: - name: Checkout the code uses: actions/checkout@v2 -# # This is a separate action that sets up buildx runner -# - name: Set up Docker Buildx -# id: buildx -# uses: docker/setup-buildx-action@v2 -# -# # So now you can use Actions' own caching! -# - name: Cache Docker layers -# uses: actions/cache@v2 -# with: -# path: /tmp/.buildx-cache -# key: ${{ runner.os }}-single-buildx-${{ github.sha }} -# restore-keys: | -# ${{ runner.os }}-single-buildx -# -# # And make it available for builds -# - name: Build image -# uses: docker/build-push-action@v2 -# with: -# context: . -# builder: ${{ steps.buildx.outputs.name }} -# file: Dockerfile -# build-args: AWS_ECR_URL=${{ steps.login-ecr.outputs.registry }} -# platforms: linux/amd64 -# tags: ${{ steps.login-ecr.outputs.registry }}/${{ env.ECR_REPOSITORY }}:${{ env.IMAGE_TAG }} -# cache-from: type=local,src=/tmp/.buildx-cache -# cache-to: type=local,dest=/tmp/.buildx-cache-new -# push: true # set false to deactivate the push to ECR -# -# # This ugly bit is necessary if you don't want your cache to grow forever until it hits GitHub's limit of 5GB. -# # https://github.com/docker/build-push-action/issues/252 & https://github.com/moby/buildkit/issues/1896 -# - name: Move cache -# shell: bash -# run: | -# rm -rf /tmp/.buildx-cache -# mv /tmp/.buildx-cache-new /tmp/.buildx-cache + # This is a separate action that sets up buildx runner + - name: Set up Docker Buildx + id: buildx + uses: docker/setup-buildx-action@v2 + + # So now you can use Actions' own caching! + - name: Cache Docker layers + uses: actions/cache@v2 + with: + path: /tmp/.buildx-cache + key: ${{ runner.os }}-single-buildx-${{ github.sha }} + restore-keys: | + ${{ runner.os }}-single-buildx + + # And make it available for builds + - name: Build image + uses: docker/build-push-action@v2 + with: + context: . + builder: ${{ steps.buildx.outputs.name }} + file: Dockerfile + build-args: AWS_ECR_URL=${{ steps.login-ecr.outputs.registry }} + platforms: linux/amd64 + tags: ${{ steps.login-ecr.outputs.registry }}/${{ env.ECR_REPOSITORY }}:${{ env.IMAGE_TAG }} + cache-from: type=local,src=/tmp/.buildx-cache + cache-to: type=local,dest=/tmp/.buildx-cache-new + push: true # set false to deactivate the push to ECR + + # This ugly bit is necessary if you don't want your cache to grow forever until it hits GitHub's limit of 5GB. + # https://github.com/docker/build-push-action/issues/252 & https://github.com/moby/buildkit/issues/1896 + - name: Move cache + shell: bash + run: | + rm -rf /tmp/.buildx-cache + mv /tmp/.buildx-cache-new /tmp/.buildx-cache - name: Configure AWS creds to access EKS # TIP: the deployment user must be in the masters group in the aws-auth config map in the cluster diff --git a/.github/workflows/cicd_clis_testnet.yaml b/.github/workflows/cicd_clis_testnet.yaml index bf904d80..1c5247b6 100644 --- a/.github/workflows/cicd_clis_testnet.yaml +++ b/.github/workflows/cicd_clis_testnet.yaml @@ -9,7 +9,7 @@ env: IAM_ROLE: arn:aws:iam::177635894328:role/Github_role_to_access_ECR ECR_REPOSITORY: holo-cli # - IMAGE_TAG: testnet-c95c0112f803289fe110e42fbb13a5694c6fbf01 #testnet-${{ github.sha }} + IMAGE_TAG: testnet-${{ github.sha }} # CLUSTER_NAME: 'prod2' # @@ -38,21 +38,21 @@ env: ####################################### # notice: the trigger -on: - push: - branches: - - 'feat/deploy-testnet-clis-into-staging2' - # Excluded branches - - '!develop' - - '!main' - - '!master' -# notice: the trigger #on: -# pull_request: +# push: # branches: -# - 'testnet' -# # - 'deactivated' -# types: [closed] +# - 'feat/deploy-testnet-clis-into-staging2' +# # Excluded branches +# - '!develop' +# - '!main' +# - '!master' +# notice: the trigger +on: + pull_request: + branches: + - 'testnet' + # - 'deactivated' + types: [closed] jobs: deploy-clis-testnet: From 1dde14102c2063d4eb7ffbc6650d1321b726c854 Mon Sep 17 00:00:00 2001 From: Kostas Demiris Date: Tue, 25 Jun 2024 14:43:22 +0300 Subject: [PATCH 6/6] minor change --- .github/workflows/cicd_clis_testnet.yaml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/cicd_clis_testnet.yaml b/.github/workflows/cicd_clis_testnet.yaml index 1c5247b6..f424c9c3 100644 --- a/.github/workflows/cicd_clis_testnet.yaml +++ b/.github/workflows/cicd_clis_testnet.yaml @@ -41,7 +41,7 @@ env: #on: # push: # branches: -# - 'feat/deploy-testnet-clis-into-staging2' +# - 'deactivated' # # Excluded branches # - '!develop' # - '!main' @@ -51,12 +51,11 @@ on: pull_request: branches: - 'testnet' - # - 'deactivated' types: [closed] jobs: deploy-clis-testnet: -# if: github.event.pull_request.merged == true # so no workflow runs when some PR is just closed without being merged + if: github.event.pull_request.merged == true # so no workflow runs when some PR is just closed without being merged name: Deploy-on-testnet runs-on: ubuntu-latest