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

Build previews using dapp-development tagged packages #147

Closed
wants to merge 1 commit into from

Conversation

michalinacienciala
Copy link
Contributor

BACKGROUND:
There are situations when team developing T Token Dashboard needs to
locally test some functionalities using modified contracts, for example
ones with shorter authorization decrease delay. We decided to create a
dapp-development branch in each of the expected upstream modules of
the threshold-network/token-dashboard CI module, which would store
the code of these modified contracts. (Although currently there's no
@keep-network/random-beacon, @keep-network/ecdsa and
@keep-network/tbtc-v2 dependencies in the T dashboard yet, they're
expected to be added soon and we are already preparing for that).
Repositories with dapp-development branch containing modified
contracts:
threshold-network/solidity-contracts
keep-network/keep-core
keep-network/tbtc-v2
Using the code from the dapp-development branch we will build
packages that will be published to the NPM registry under
dapp-development-<environment> tag and with dappdev<environment>
suffix (<environment> currently being goerli).
Generally, the goal of the changes is to have the full set of
dapp-development-friendly contracts deployed to the NPM registry, so
that they could be used to create dApp previews that will be easily
testable. The dApp developers could also use the contracts to build
dashboard on their local envirionment by upgrading the
token-dashboard dependencies using
yarn upgrade <package-name>@dapp-development-goerli.

THIS CHANGE:
In this commit/PR we modify the GH Actions job which is used for
publishing of the testnet dashboard to the main and preview testnet
buckets. We're splitting this job into two separate jobs:

  • build-and-deploy-testnet:
    Executed after merges to main or when dispatched manually.
    Uses unmodified contracts (tagged goerli).
    Publishes testnet dApp to dashboard.test.threshold.network
    bucket.
  • build-and-deploy-testnet-preview:
    Executed after PR creation/update.
    Uses modified contracts when availible
    (tagged dappdevgoerli).
    Publishes testnet dApp to
    preview.dashboard.test.threshold.network bucket.
    Provides link to the preview in PR comment.

TODO:

  • Add resolving of @keep-network/random-beacon, @keep-network/ecdsa and @keep-network/tbtc-v2 contracts if they'll be added as dashboard's dependencies before merge of this PR.
  • Test the workflow. For that we need dappdevgoerli-tagged packages published in the NPM registry.

Refs:
#136
threshold-network/solidity-contracts#119
keep-network/keep-core#3121
keep-network/tbtc-v2#392

BACKGROUND:
There are situations when team developing T Token Dashboard needs to
locally test some functionalities using modified contracts, for example
ones with shorter authorization decrease delay. We decided to create a
`dapp-development` branch in each of the expected upstream modules of
the `threshold-network/token-dashboard` CI module, which would store
the code of these modified contracts. (Although currently there's no
`@keep-network/random-beacon`, `@keep-network/ecdsa` and
`@keep-network/tbtc-v2` dependencies in the T dashboard yet, they're
expected to be added soon and we are already preparing for that).
Repositories with `dapp-development` branch containing modified
contracts:
`threshold-network/solidity-contracts`
`keep-network/keep-core`
`keep-network/tbtc-v2`
Using the code from the `dapp-development` branch we will build
packages that will be published to the NPM registry under
`dapp-development-<environment>` tag and with `dappdev<environment>`
suffix (`<environment>` currently being `goerli`).
Generally, the goal of the changes is to have the full set of
dapp-development-friendly contracts deployed to the NPM registry, so
that they could be used to create dApp previews that will be easily
testable. The dApp developers could also use the contracts to build
dashboard on their local envirionment by upgrading the
`token-dashboard` dependencies using
`yarn upgrade <package-name>@dapp-development-goerli`.

THIS CHANGE:
In this commit/PR we modify the GH Actions job which is used for
publishing of the testnet dashboard to the main and preview testnet
buckets. We're splitting this job into two separate jobs:
- `build-and-deploy-testnet`:
      Executed after merges to `main` or when dispatched manually.
      Uses unmodified contracts (tagged `goerli`).
      Publishes testnet dApp to `dashboard.test.threshold.network`
      bucket.
- `build-and-deploy-testnet-preview`:
      Executed after PR creation/update.
      Uses modified contracts when availible
      (tagged `dappdevgoerli`).
      Publishes testnet dApp to
      `preview.dashboard.test.threshold.network` bucket.
      Provides link to the preview in PR comment.
@nkuba
Copy link
Member

nkuba commented Aug 17, 2022

Isn't this PR duplicating #157?

@michalinacienciala
Copy link
Contributor Author

Isn't this PR duplicating #157?

Not fully, but in some part, yes. I'm creating a different PR that builds on the #157 work, that will replace the #147.

@michalinacienciala
Copy link
Contributor Author

Closed in favor of #161.

@r-czajkowski r-czajkowski added this to the v1.3.0 milestone Oct 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
☁️ infrastructure CI, Infrastructure, Workflows
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants