-
Notifications
You must be signed in to change notification settings - Fork 90
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
new cli and api migration url (#4167)
## Example API and CLI usage when on <= 1.3.2 ``` → curl 127.0.0.1:1234/api/v1/requester/nodes "This endpoint is deprecated. See the migration guide at https://docs.bacalhau.org/v/v.1.4.0/references/cli-reference/command-migration for more information" ``` ## Example CLI Usage when on 1.4 ``` Walid-MacBook-5: ~/ProtocolLabs/workspace/bacalhau (main) ✗ [bacalhau]→ bacalhau create job.yaml Command "create" is deprecated, Please use `job run` to create jobs. See the migration guide at https://docs.bacalhau.org/v/v.1.4.0/references/cli-reference/command-migration for more information. Walid-MacBook-5: ~/ProtocolLabs/workspace/bacalhau (main) ✗ [bacalhau]→ echo hi | bacalhau create Command "create" is deprecated, Please use `job run` to create jobs. See the migration guide at https://docs.bacalhau.org/v/v.1.4.0/references/cli-reference/command-migration for more information. Walid-MacBook-5: ~/ProtocolLabs/workspace/bacalhau (main) ✗ [bacalhau]→ bacalhau id Command "id" is deprecated, Please use `agent node` to inspect bacalhau nodes. See the migration guide at https://docs.bacalhau.org/v/v.1.4.0/references/cli-reference/command-migration for more information. Walid-MacBook-5: ~/ProtocolLabs/workspace/bacalhau (main) ✗ [bacalhau]→ bacalhau get Command "get" is deprecated, Please use `job get` to download results of a job. See the migration guide at https://docs.bacalhau.org/v/v.1.4.0/references/cli-reference/command-migration for more information. Walid-MacBook-5: ~/ProtocolLabs/workspace/bacalhau (main) ✗ [bacalhau]→ bacalhau list Command "list" is deprecated, Please use `job list` to list jobs. See the migration guide at https://docs.bacalhau.org/v/v.1.4.0/references/cli-reference/command-migration for more information. Walid-MacBook-5: ~/ProtocolLabs/workspace/bacalhau (main) ✗ [bacalhau]→ bacalhau logs Command "logs" is deprecated, Please use `job logs` to follow job logs. See the migration guide at https://docs.bacalhau.org/v/v.1.4.0/references/cli-reference/command-migration for more information. Walid-MacBook-5: ~/ProtocolLabs/workspace/bacalhau (main) ✗ [bacalhau]→ bacalhau validate Command "validate" is deprecated, Please use `job validate` to validate jobs. See the migration guide at https://docs.bacalhau.org/v/v.1.4.0/references/cli-reference/command-migration for more information. ```
- Loading branch information
Showing
12 changed files
with
57 additions
and
56 deletions.
There are no files selected for viewing
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 3 additions & 3 deletions
6
cmd/cli/describe/describe.go → cmd/cli/deprecated/describe.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,14 @@ | ||
package describe | ||
package deprecated | ||
|
||
import ( | ||
"github.com/spf13/cobra" | ||
) | ||
|
||
func NewCmd() *cobra.Command { | ||
func NewDescribeCmd() *cobra.Command { | ||
return &cobra.Command{ | ||
Use: "describe [id]", | ||
Short: "DEPRECATED: Describe a job on the network", | ||
Deprecated: "This command has moved! Please use `job describe` to describe jobs.", | ||
Deprecated: "Please use `bacalhau job describe` to describe jobs.\n" + migrationMessageSuffix, | ||
RunE: func(cmd *cobra.Command, cmdArgs []string) error { return nil }, | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,14 @@ | ||
package get | ||
package deprecated | ||
|
||
import ( | ||
"github.com/spf13/cobra" | ||
) | ||
|
||
func NewCmd() *cobra.Command { | ||
func NewGetCmd() *cobra.Command { | ||
return &cobra.Command{ | ||
Use: "get [id]", | ||
Short: "DEPRECATED: Get the results of a job", | ||
Deprecated: "This command has moved! Please use `job get` to download results of a job.", | ||
Deprecated: "Please use `bacalhau job get` to download results of a job.\n" + migrationMessageSuffix, | ||
RunE: func(cmd *cobra.Command, cmdArgs []string) error { return nil }, | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
package deprecated | ||
|
||
import ( | ||
"fmt" | ||
|
||
"github.com/bacalhau-project/bacalhau/pkg/publicapi/endpoint/requester" | ||
) | ||
|
||
const migrationURL = requester.MigrationGuideURL | ||
|
||
var migrationMessageSuffix = fmt.Sprintf(`See the migration guide at %s for more information.`, migrationURL) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,14 @@ | ||
package id | ||
package deprecated | ||
|
||
import ( | ||
"github.com/spf13/cobra" | ||
) | ||
|
||
func NewCmd() *cobra.Command { | ||
func NewIDCmd() *cobra.Command { | ||
return &cobra.Command{ | ||
Use: "id", | ||
Short: "DEPRECATED: Show bacalhau node id info", | ||
Deprecated: "This command has moved! Please use `agent node` to inspect bacalhau nodes.", | ||
Deprecated: "Please use `bacalhau agent node` to inspect bacalhau nodes.\n" + migrationMessageSuffix, | ||
RunE: func(cmd *cobra.Command, _ []string) error { return nil }, | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,14 @@ | ||
package list | ||
package deprecated | ||
|
||
import ( | ||
"github.com/spf13/cobra" | ||
) | ||
|
||
func NewCmd() *cobra.Command { | ||
func NewListCmd() *cobra.Command { | ||
return &cobra.Command{ | ||
Use: "list", | ||
Short: "DEPRECATED: List jobs on the network", | ||
Deprecated: "This command has moved! Please use `job list` to list jobs.", | ||
Deprecated: "Please use `bacalhau job list` to list jobs.\n" + migrationMessageSuffix, | ||
RunE: func(cmd *cobra.Command, _ []string) error { return nil }, | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,14 @@ | ||
package logs | ||
package deprecated | ||
|
||
import ( | ||
"github.com/spf13/cobra" | ||
) | ||
|
||
func NewCmd() *cobra.Command { | ||
func NewLogsCmd() *cobra.Command { | ||
return &cobra.Command{ | ||
Use: "logs [id]", | ||
Short: "DEPRECATED: Follow logs from a currently executing job", | ||
Deprecated: "This command has moved! Please use `job logs` to follow job logs.", | ||
Deprecated: "Please use `bacalhau job logs` to follow job logs.\n" + migrationMessageSuffix, | ||
RunE: func(cmd *cobra.Command, _ []string) error { return nil }, | ||
} | ||
} |
6 changes: 3 additions & 3 deletions
6
cmd/cli/validate/validate.go → cmd/cli/deprecated/validate.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,14 @@ | ||
package validate | ||
package deprecated | ||
|
||
import ( | ||
"github.com/spf13/cobra" | ||
) | ||
|
||
func NewCmd() *cobra.Command { | ||
func NewValidateCmd() *cobra.Command { | ||
return &cobra.Command{ | ||
Use: "validate", | ||
Short: "DEPRECATED: validate a job using a json or yaml file.", | ||
Deprecated: "This command has moved! Please use `job validate` to validate jobs.", | ||
Deprecated: "Please use `bacalhau job validate` to validate jobs.\n" + migrationMessageSuffix, | ||
RunE: func(cmd *cobra.Command, cmdArgs []string) error { return nil }, | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters