Skip to content

Commit

Permalink
feat!: remove the ignite relayer and tools commands with all ts-r…
Browse files Browse the repository at this point in the history
…elayer logic (backport #4076) (#4226)

* feat!: remove the ignite `realyer` and `tools` commands with all ts-realyer logic (#4076)

* remove ts relayer

* remove unused commands

* remove ts relayer

* fix hermes relayer cmd for integration tests

* add relayer command ad default

* remove unused function

* Update changelog.md

* bump default hermes plugin version

* bump relayer into the tests

* run go mod tidy

* rollback relayer command into the integration tests

---------

Co-authored-by: Pantani <Pantani>
(cherry picked from commit 77b665f)

# Conflicts:
#	go.mod
#	go.sum
#	ignite/cmd/relayer.go
#	ignite/cmd/relayer_configure.go
#	ignite/cmd/relayer_connect.go
#	ignite/cmd/tools.go
#	ignite/pkg/nodetime/programs/ts-relayer/tsrelayer.go
#	ignite/pkg/relayer/chain.go
#	ignite/pkg/relayer/config/config.go
#	ignite/pkg/relayer/relayer.go

* fix merge conflicts

* fix changelog

* bump hermes version

* bump hermes to future version for don't break the default plugin path

* remove unused commands

* rollback integration/plugin/testdata/example-plugin/go.mod

* rollback ignite/internal/plugin/testdata

* rollback integration/plugin/testdata/example-plugin/go.mod

---------

Co-authored-by: Danilo Pantani <[email protected]>
  • Loading branch information
mergify[bot] and Pantani authored Jul 15, 2024
1 parent 96aed19 commit a7aef3e
Show file tree
Hide file tree
Showing 15 changed files with 66 additions and 1,573 deletions.
1 change: 1 addition & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
### Features

- [#4183](https://github.com/ignite/cli/pull/4183) Set `chain-id` in the client.toml
- [#4076](https://github.com/ignite/cli/pull/4076) Remove the ignite `relayer` and `tools` commands with all ts-relayer logic
- [#4133](https://github.com/ignite/cli/pull/4133) Improve buf rate limit

### Changes
Expand Down
6 changes: 0 additions & 6 deletions ignite/cmd/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,6 @@ To get started, create a blockchain:
NewGenerate(),
NewNode(),
NewAccount(),
NewRelayer(),
NewTools(),
NewDocs(),
NewVersion(),
NewApp(),
Expand Down Expand Up @@ -207,10 +205,6 @@ func checkNewVersion(ctx context.Context) {
fmt.Printf("⬆️ Ignite CLI %s is available! To upgrade: https://docs.ignite.com/welcome/install#upgrade", next)
}

func printSection(session *cliui.Session, title string) error {
return session.Printf("------\n%s\n------\n\n", title)
}

func newCache(cmd *cobra.Command) (cache.Storage, error) {
cacheRootDir, err := config.DirPath()
if err != nil {
Expand Down
24 changes: 17 additions & 7 deletions ignite/cmd/plugin_default.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,21 +18,31 @@ type defaultPlugin struct {
const (
PluginNetworkVersion = "v0.2.2"
PluginNetworkPath = "github.com/ignite/cli-plugin-network@" + PluginNetworkVersion
PluginRelayerVersion = "hermes/v0.2.4"
PluginRelayerPath = "github.com/ignite/apps/hermes@" + PluginRelayerVersion
)

// defaultPlugins holds the plugin that are considered trustable and for which
// a command will added if the plugin is not already installed.
// When the user executes that command, the plugin is automatically installed.
var defaultPlugins = []defaultPlugin{
{
use: "network",
short: "Launch a blockchain in production",
aliases: []string{"n"},
path: PluginNetworkPath,
},
// TODO uncomment after fix SPN. Don't forget to un-skip TestEnsureDefaultPlugins.
// {
// use: "network",
// short: "Launch a blockchain in production",
// aliases: []string{"n"},
// path: PluginNetworkPath,
// },
// TODO uncomment after launch the `hermes/v0.2.4`. Don't forget to un-skip TestEnsureDefaultPlugins.
// {
// use: "relayer",
// short: "Connect blockchains with an IBC relayer",
// aliases: []string{"r"},
// path: PluginRelayerPath,
// },
}

// ensureDefaultPlugins ensures that all defaultPlugins are wether registered
// ensureDefaultPlugins ensures that all defaultPlugins are whether registered
// in cfg OR have an install command added to rootCmd.
func ensureDefaultPlugins(rootCmd *cobra.Command, cfg *pluginsconfig.Config) {
for _, dp := range defaultPlugins {
Expand Down
2 changes: 2 additions & 0 deletions ignite/cmd/plugin_default_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ import (
)

func TestEnsureDefaultPlugins(t *testing.T) {
t.Skip("skip till we have default plugins again")

tests := []struct {
name string
cfg *pluginsconfig.Config
Expand Down
33 changes: 0 additions & 33 deletions ignite/cmd/relayer.go

This file was deleted.

Loading

0 comments on commit a7aef3e

Please sign in to comment.