Skip to content

Extract code owner-required changes for workflow files #807

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

Merged
merged 11 commits into from
Mar 7, 2025
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 20 additions & 20 deletions .github/workflows/dashboard-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,13 +87,13 @@ jobs:
env:
PUBLIC_URL: /${{ github.head_ref }}
CHAIN_ID: 11155111
ETH_HOSTNAME_HTTP: ${{ secrets.SEPOLIA_ETH_HOSTNAME_HTTP }}
ETH_HOSTNAME_WS: ${{ secrets.SEPOLIA_ETH_HOSTNAME_WS }}
ALCHEMY_API: ${{ secrets.ALCHEMY_API }}
NODE_OPTIONS: --max_old_space_size=4096
ELECTRUM_PROTOCOL: ${{ secrets.TESTNET_ELECTRUMX_PROTOCOL }}
ELECTRUM_HOST: ${{ secrets.TESTNET_ELECTRUMX_HOST }}
ELECTRUM_PORT: ${{ secrets.TESTNET_ELECTRUMX_PORT }}
TESTNET_ELECTRUM_PROTOCOL: ${{ secrets.TESTNET_ELECTRUMX_PROTOCOL }}
TESTNET_ELECTRUM_HOST: ${{ secrets.TESTNET_ELECTRUMX_HOST }}
TESTNET_ELECTRUM_PORT: ${{ secrets.TESTNET_ELECTRUMX_PORT }}
WALLET_CONNECT_PROJECT_ID: ${{ secrets.WALLET_CONNECT_PROJECT_ID }}
TBTC_SUBGRAPH_API: ${{ secrets.TBTC_SUBGRAPH_API }}

# FIXME: Tests are missing, will this step be needed?
# - name: Test
Expand Down Expand Up @@ -121,14 +121,14 @@ jobs:
gcpBucketPath: ${{ github.head_ref }}
preview: true
secrets:
ethUrlHttp: ${{ secrets.SEPOLIA_ETH_HOSTNAME_HTTP }}
ethUrlWS: ${{ secrets.SEPOLIA_ETH_HOSTNAME_WS }}
alchemyApi: ${{ secrets.ALCHEMY_API }}
gcpServiceKey: ${{ secrets.KEEP_TEST_CI_UPLOAD_DAPP_JSON_KEY_BASE64 }}
electrumProtocol: ${{ secrets.TESTNET_ELECTRUMX_PROTOCOL }}
electrumHost: ${{ secrets.TESTNET_ELECTRUMX_HOST }}
electrumPort: ${{ secrets.TESTNET_ELECTRUMX_PORT }}
testnetElectrumProtocol: ${{ secrets.TESTNET_ELECTRUMX_PROTOCOL }}
testnetElectrumHost: ${{ secrets.TESTNET_ELECTRUMX_HOST }}
testnetElectrumPort: ${{ secrets.TESTNET_ELECTRUMX_PORT }}
sentryDsn: ${{ secrets.TESTNET_SENTRY_DSN }}
walletConnectProjectId: ${{ secrets.WALLET_CONNECT_PROJECT_ID }}
tbtcSubgraphApi: ${{ secrets.TBTC_SUBGRAPH_API }}

# This job will be triggered via the `workflow_dispatch` event, as part of the
# CI flow, which gets triggered manually after changes in the contracts,
Expand All @@ -152,14 +152,14 @@ jobs:
gcpBucketName: dashboard.test.threshold.network
preview: false
secrets:
ethUrlHttp: ${{ secrets.SEPOLIA_ETH_HOSTNAME_HTTP }}
ethUrlWS: ${{ secrets.SEPOLIA_ETH_HOSTNAME_WS }}
alchemyApi: ${{ secrets.ALCHEMY_API }}
Copy link
Member

Choose a reason for hiding this comment

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

Is this an HTTP or WS URL or maybe an API key? The previous version was more specific, and it was clear what value should be provided. I would rename it to ALCHEMY_API_KEY or something more specific, depending on what this value should represent.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Agreed. This is being addressed in the following commit: update alchemy api key env variable name
And also reflected in the app in the PR #809

gcpServiceKey: ${{ secrets.KEEP_TEST_CI_UPLOAD_DAPP_JSON_KEY_BASE64 }}
electrumProtocol: ${{ secrets.TESTNET_ELECTRUMX_PROTOCOL }}
electrumHost: ${{ secrets.TESTNET_ELECTRUMX_HOST }}
electrumPort: ${{ secrets.TESTNET_ELECTRUMX_PORT }}
testnetElectrumProtocol: ${{ secrets.TESTNET_ELECTRUMX_PROTOCOL }}
testnetElectrumHost: ${{ secrets.TESTNET_ELECTRUMX_HOST }}
testnetElectrumPort: ${{ secrets.TESTNET_ELECTRUMX_PORT }}
sentryDsn: ${{ secrets.TESTNET_SENTRY_DSN }}
walletConnectProjectId: ${{ secrets.WALLET_CONNECT_PROJECT_ID }}
tbtcSubgraphApi: ${{ secrets.TBTC_SUBGRAPH_API }}

# This job will be triggered after merges of PRs to the `main` branch. As the
# triggering is not related to the changes in the contracts / client code, we
Expand All @@ -178,11 +178,11 @@ jobs:
gcpBucketName: dashboard.test.threshold.network
preview: false
secrets:
ethUrlHttp: ${{ secrets.SEPOLIA_ETH_HOSTNAME_HTTP }}
ethUrlWS: ${{ secrets.SEPOLIA_ETH_HOSTNAME_WS }}
alchemyApi: ${{ secrets.ALCHEMY_API }}
gcpServiceKey: ${{ secrets.KEEP_TEST_CI_UPLOAD_DAPP_JSON_KEY_BASE64 }}
electrumProtocol: ${{ secrets.TESTNET_ELECTRUMX_PROTOCOL }}
electrumHost: ${{ secrets.TESTNET_ELECTRUMX_HOST }}
electrumPort: ${{ secrets.TESTNET_ELECTRUMX_PORT }}
testnetElectrumProtocol: ${{ secrets.TESTNET_ELECTRUMX_PROTOCOL }}
testnetElectrumHost: ${{ secrets.TESTNET_ELECTRUMX_HOST }}
testnetElectrumPort: ${{ secrets.TESTNET_ELECTRUMX_PORT }}
sentryDsn: ${{ secrets.TESTNET_SENTRY_DSN }}
walletConnectProjectId: ${{ secrets.WALLET_CONNECT_PROJECT_ID }}
tbtcSubgraphApi: ${{ secrets.TBTC_SUBGRAPH_API }}
26 changes: 16 additions & 10 deletions .github/workflows/dashboard-mainnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,16 +49,19 @@ jobs:
env:
PUBLIC_URL: /${{ github.ref_name }}
CHAIN_ID: 1
ETH_HOSTNAME_HTTP: ${{ secrets.MAINNET_ETH_HOSTNAME_HTTP }}
ETH_HOSTNAME_WS: ${{ secrets.MAINNET_ETH_HOSTNAME_WS }}
ALCHEMY_API: ${{ secrets.ALCHEMY_API }}
NODE_OPTIONS: --max_old_space_size=4096
ELECTRUM_PROTOCOL: ${{ secrets.MAINNET_ELECTRUMX_PROTOCOL }}
ELECTRUM_HOST: ${{ secrets.MAINNET_ELECTRUMX_HOST }}
ELECTRUM_PORT: ${{ secrets.MAINNET_ELECTRUMX_PORT }}
MAINNET_ELECTRUM_PROTOCOL: ${{ secrets.MAINNET_ELECTRUMX_PROTOCOL }}
MAINNET_ELECTRUM_HOST: ${{ secrets.MAINNET_ELECTRUMX_HOST }}
MAINNET_ELECTRUM_PORT: ${{ secrets.MAINNET_ELECTRUMX_PORT }}
TESTNET_ELECTRUM_PROTOCOL: ${{ secrets.TESTNET_ELECTRUMX_PROTOCOL }}
TESTNET_ELECTRUM_HOST: ${{ secrets.TESTNET_ELECTRUMX_HOST }}
TESTNET_ELECTRUM_PORT: ${{ secrets.TESTNET_ELECTRUMX_PORT }}
Copy link
Member

Choose a reason for hiding this comment

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

Do we need to specify those for the mainnet workflow? Is it because they are used from reusable-build-and-publish.yml? Would be good to have this decision captured in the commit message.

Copy link
Collaborator Author

@evandrosaturnino evandrosaturnino Mar 6, 2025

Choose a reason for hiding this comment

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

Although the multiple networks app accepts both mainnet and testnet chains at the same time, and we initially planned to launch the production app with both, in the last days we've decided to move forward with launching the mainnet dashboard with only mainnet L1 and L2. Therefore, it makes sense to remove these env variables from the dashboard-mainnet.yml, as you pointed out.

This is being addressed in: consolidate mainnet and testnet electrum variables and remove testnet electrum variable in reusable workflow
And also reflected in the app in the PR #809

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Following this same approach I also updated the subgraph variable updating the name with the key suffix: update subgraph api key variable

SENTRY_SUPPORT: true
SENTRY_DSN: ${{ secrets.MAINNET_SENTRY_DSN }}
TRM_SUPPORT: ${{ secrets.TRM_SUPPORT }}
WALLET_CONNECT_PROJECT_ID: ${{ secrets.WALLET_CONNECT_PROJECT_ID }}
TBTC_SUBGRAPH_API: ${{ secrets.TBTC_SUBGRAPH_API }}
GOOGLE_TAG_MANAGER_SUPPORT: false
GOOGLE_TAG_MANAGER_ID: ${{ secrets.GOOGLE_TAG_MANAGER_ID }}

Expand All @@ -68,19 +71,22 @@ jobs:
env:
PUBLIC_URL: /
CHAIN_ID: 1
ETH_HOSTNAME_HTTP: ${{ secrets.MAINNET_ETH_HOSTNAME_HTTP }}
ETH_HOSTNAME_WS: ${{ secrets.MAINNET_ETH_HOSTNAME_WS }}
ALCHEMY_API: ${{ secrets.ALCHEMY_API }}
NODE_OPTIONS: --max_old_space_size=4096
POSTHOG_SUPPORT: true
POSTHOG_API_KEY: ${{ secrets.MAINNET_POSTHOG_API_KEY }}
POSTHOG_HOSTNAME_HTTP: ${{ secrets.MAINNET_POSTHOG_HOSTNAME_HTTP }}
ELECTRUM_PROTOCOL: ${{ secrets.MAINNET_ELECTRUMX_PROTOCOL }}
ELECTRUM_HOST: ${{ secrets.MAINNET_ELECTRUMX_HOST }}
ELECTRUM_PORT: ${{ secrets.MAINNET_ELECTRUMX_PORT }}
MAINNET_ELECTRUM_PROTOCOL: ${{ secrets.MAINNET_ELECTRUMX_PROTOCOL }}
MAINNET_ELECTRUM_HOST: ${{ secrets.MAINNET_ELECTRUMX_HOST }}
MAINNET_ELECTRUM_PORT: ${{ secrets.MAINNET_ELECTRUMX_PORT }}
TESTNET_ELECTRUM_PROTOCOL: ${{ secrets.TESTNET_ELECTRUMX_PROTOCOL }}
TESTNET_ELECTRUM_HOST: ${{ secrets.TESTNET_ELECTRUMX_HOST }}
TESTNET_ELECTRUM_PORT: ${{ secrets.TESTNET_ELECTRUMX_PORT }}
SENTRY_SUPPORT: true
SENTRY_DSN: ${{ secrets.MAINNET_SENTRY_DSN }}
TRM_SUPPORT: ${{ secrets.TRM_SUPPORT }}
WALLET_CONNECT_PROJECT_ID: ${{ secrets.WALLET_CONNECT_PROJECT_ID }}
TBTC_SUBGRAPH_API: ${{ secrets.TBTC_SUBGRAPH_API }}
GOOGLE_TAG_MANAGER_SUPPORT: true
GOOGLE_TAG_MANAGER_ID: ${{ secrets.GOOGLE_TAG_MANAGER_ID }}

Expand Down
42 changes: 21 additions & 21 deletions .github/workflows/reusable-build-and-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,23 +49,20 @@ on:
default: false
type: boolean
secrets:
ethUrlHttp:
description: The HTTP ETH API URL.
required: true
ethUrlWS:
description: The WebSocket ETH API URL.
alchemyApi:
description: The Alchemy API Key.
required: true
gcpServiceKey:
description: JSON key for Google Cloud Platform service account.
required: true
electrumProtocol:
description: Protocol used by the Electrum server.
testnetElectrumProtocol:
description: Protocol used by the Testnet Electrum server.
required: true
electrumHost:
description: Host pointing to the Electrum server.
testnetElectrumHost:
description: Host pointing to the Testnet Electrum server.
required: true
electrumPort:
description: Port the Electrum server listens on.
testnetElectrumPort:
description: Port the Testnet Electrum server listens on.
required: true
sentryDsn:
description: Sentry DSN endpoint
Expand All @@ -75,6 +72,9 @@ on:
Project Id gathered from WalletConnect cloud. Required for
WalletConnect v2.
required: true
tbtcSubgraphApi:
description: The API endpoint for the tBTC subgraph.
required: true

jobs:
build-and-publish:
Expand Down Expand Up @@ -162,15 +162,15 @@ jobs:
env:
PUBLIC_URL: /
CHAIN_ID: ${{ env.NETWORK_ID }}
ETH_HOSTNAME_HTTP: ${{ secrets.ethUrlHttp }}
ETH_HOSTNAME_WS: ${{ secrets.ethUrlWS }}
ALCHEMY_API: ${{ secrets.alchemyApi }}
NODE_OPTIONS: --max_old_space_size=4096
ELECTRUM_PROTOCOL: ${{ secrets.electrumProtocol }}
ELECTRUM_HOST: ${{ secrets.electrumHost }}
ELECTRUM_PORT: ${{ secrets.electrumPort }}
TESTNET_ELECTRUM_PROTOCOL: ${{ secrets.testnetElectrumProtocol }}
TESTNET_ELECTRUM_HOST: ${{ secrets.testnetElectrumHost }}
TESTNET_ELECTRUM_PORT: ${{ secrets.testnetElectrumPort }}
SENTRY_SUPPORT: true
SENTRY_DSN: ${{ secrets.sentryDsn }}
WALLET_CONNECT_PROJECT_ID: ${{ secrets.walletConnectProjectId }}
TBTC_SUBGRAPH_API: ${{ secrets.tbtcSubgraphApi }}
DAPP_DEVELOPMENT_TESTNET_CONTRACTS: ${{ inputs.preview == true }}

- name: Build
Expand All @@ -180,15 +180,15 @@ jobs:
env:
PUBLIC_URL: /${{ inputs.gcpBucketPath }}
CHAIN_ID: ${{ env.NETWORK_ID }}
ETH_HOSTNAME_HTTP: ${{ secrets.ethUrlHttp }}
ETH_HOSTNAME_WS: ${{ secrets.ethUrlWS }}
ALCHEMY_API: ${{ secrets.alchemyApi }}
NODE_OPTIONS: --max_old_space_size=4096
ELECTRUM_PROTOCOL: ${{ secrets.electrumProtocol }}
ELECTRUM_HOST: ${{ secrets.electrumHost }}
ELECTRUM_PORT: ${{ secrets.electrumPort }}
TESTNET_ELECTRUM_PROTOCOL: ${{ secrets.testnetElectrumProtocol }}
TESTNET_ELECTRUM_HOST: ${{ secrets.testnetElectrumHost }}
TESTNET_ELECTRUM_PORT: ${{ secrets.testnetElectrumPort }}
SENTRY_SUPPORT: true
SENTRY_DSN: ${{ secrets.sentryDsn }}
WALLET_CONNECT_PROJECT_ID: ${{ secrets.walletConnectProjectId }}
TBTC_SUBGRAPH_API: ${{ secrets.tbtcSubgraphApi }}
DAPP_DEVELOPMENT_TESTNET_CONTRACTS: ${{ inputs.preview == true }}

- name: Deploy to GCP
Expand Down