-
Notifications
You must be signed in to change notification settings - Fork 117
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Refactor `splits` to `partitions` * Rename files * Pretty prettier * Backwards compatibility
- Loading branch information
1 parent
e7b1b3a
commit 56e210b
Showing
71 changed files
with
1,914 additions
and
1,698 deletions.
There are no files selected for viewing
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,77 @@ | ||
package project | ||
|
||
import ( | ||
"fmt" | ||
|
||
"github.com/rilldata/rill/cli/pkg/cmdutil" | ||
runtimev1 "github.com/rilldata/rill/proto/gen/rill/runtime/v1" | ||
"github.com/spf13/cobra" | ||
) | ||
|
||
func PartitionsCmd(ch *cmdutil.Helper) *cobra.Command { | ||
var project, path, model string | ||
var pending, errored, local bool | ||
var pageSize uint32 | ||
var pageToken string | ||
|
||
partitionsCmd := &cobra.Command{ | ||
Use: "partitions [<project>] <model>", | ||
Args: cobra.RangeArgs(1, 2), | ||
Short: "List partitions for a model", | ||
RunE: func(cmd *cobra.Command, args []string) error { | ||
if len(args) == 1 { | ||
model = args[0] | ||
} else if len(args) == 2 { | ||
project = args[0] | ||
model = args[1] | ||
} | ||
|
||
if !local && !cmd.Flags().Changed("project") && len(args) <= 1 && ch.Interactive { | ||
var err error | ||
project, err = ch.InferProjectName(cmd.Context(), ch.Org, path) | ||
if err != nil { | ||
return err | ||
} | ||
} | ||
|
||
rt, instanceID, err := ch.OpenRuntimeClient(cmd.Context(), ch.Org, project, local) | ||
if err != nil { | ||
return err | ||
} | ||
|
||
res, err := rt.GetModelPartitions(cmd.Context(), &runtimev1.GetModelPartitionsRequest{ | ||
InstanceId: instanceID, | ||
Model: model, | ||
Pending: pending, | ||
Errored: errored, | ||
PageSize: pageSize, | ||
PageToken: pageToken, | ||
}) | ||
if err != nil { | ||
return fmt.Errorf("failed to get model partitions: %w", err) | ||
} | ||
|
||
ch.PrintModelPartitions(res.Partitions) | ||
|
||
if res.NextPageToken != "" { | ||
cmd.Println() | ||
cmd.Printf("Next page token: %s\n", res.NextPageToken) | ||
} | ||
|
||
return nil | ||
}, | ||
} | ||
|
||
partitionsCmd.Flags().SortFlags = false | ||
partitionsCmd.Flags().StringVar(&project, "project", "", "Project Name") | ||
partitionsCmd.Flags().StringVar(&path, "path", ".", "Project directory") | ||
partitionsCmd.Flags().StringVar(&model, "model", "", "Model Name") | ||
partitionsCmd.Flags().BoolVar(&pending, "pending", false, "Only fetch pending partitions") | ||
partitionsCmd.Flags().BoolVar(&errored, "errored", false, "Only fetch errored partitions") | ||
partitionsCmd.MarkFlagsMutuallyExclusive("pending", "errored") | ||
partitionsCmd.Flags().BoolVar(&local, "local", false, "Target locally running Rill") | ||
partitionsCmd.Flags().Uint32Var(&pageSize, "page-size", 50, "Number of partitions to return per page") | ||
partitionsCmd.Flags().StringVar(&pageToken, "page-token", "", "Pagination token") | ||
|
||
return partitionsCmd | ||
} |
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
This file was deleted.
Oops, something went wrong.
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
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,31 @@ | ||
--- | ||
note: GENERATED. DO NOT EDIT. | ||
title: rill billing list-issues | ||
--- | ||
## rill billing list-issues | ||
|
||
List billing issues for an organization | ||
|
||
``` | ||
rill billing list-issues [flags] | ||
``` | ||
|
||
### Flags | ||
|
||
``` | ||
--org string Organization Name | ||
``` | ||
|
||
### Global flags | ||
|
||
``` | ||
--api-token string Token for authenticating with the cloud API | ||
--format string Output format (options: "human", "json", "csv") (default "human") | ||
-h, --help Print usage | ||
--interactive Prompt for missing required parameters (default true) | ||
``` | ||
|
||
### SEE ALSO | ||
|
||
* [rill billing](billing.md) - Billing related commands for org | ||
|
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,26 @@ | ||
--- | ||
note: GENERATED. DO NOT EDIT. | ||
title: rill billing subscription cancel | ||
--- | ||
## rill billing subscription cancel | ||
|
||
Cancel subscription for an organization | ||
|
||
``` | ||
rill billing subscription cancel [flags] | ||
``` | ||
|
||
### Global flags | ||
|
||
``` | ||
--api-token string Token for authenticating with the cloud API | ||
--format string Output format (options: "human", "json", "csv") (default "human") | ||
-h, --help Print usage | ||
--interactive Prompt for missing required parameters (default true) | ||
--org string Organization Name | ||
``` | ||
|
||
### SEE ALSO | ||
|
||
* [rill billing subscription](subscription.md) - Manage organisation subscription | ||
|
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
Oops, something went wrong.
56e210b
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎉 Published on https://ui.rilldata.in as production
🚀 Deployed on https://672cc2dbde4ba88903eb29e0--rill-ui-dev.netlify.app