-
Notifications
You must be signed in to change notification settings - Fork 669
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
22 changed files
with
515 additions
and
28 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,26 @@ | ||
# TL;DR | ||
_Please replace this text with a description of what this PR accomplishes._ | ||
|
||
## Type | ||
- [ ] Bug Fix | ||
- [ ] Feature | ||
- [ ] Plugin | ||
|
||
## Are all requirements met? | ||
|
||
- [ ] Code completed | ||
- [ ] Smoke tested | ||
- [ ] Unit tests added | ||
- [ ] Code documentation added | ||
- [ ] Any pending items have an associated Issue | ||
|
||
## Complete description | ||
_How did you fix the bug, make the feature etc. Link to any design docs etc_ | ||
|
||
## Tracking Issue | ||
https://github.com/lyft/flyte/issues/<number> | ||
|
||
## Follow-up issue | ||
_NA_ | ||
OR | ||
_https://github.com/lyft/flyte/issues/<number>_ |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,9 @@ | ||
# flytectl | ||
Flyte CLI | ||
Install Flyte CLI | ||
|
||
```bash | ||
curl -s https://github.com/lyft/flytectl/blob/master/install.sh | bash | ||
``` | ||
|
||
[Contribution guidelines for this project](docs/CONTRIBUTING.md) | ||
|
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
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,61 @@ | ||
package get | ||
|
||
import ( | ||
"context" | ||
"github.com/golang/protobuf/proto" | ||
"github.com/lyft/flytectl/cmd/config" | ||
cmdCore "github.com/lyft/flytectl/cmd/core" | ||
"github.com/lyft/flytectl/pkg/adminutils" | ||
"github.com/lyft/flytectl/pkg/printer" | ||
"github.com/lyft/flyteidl/gen/pb-go/flyteidl/admin" | ||
"github.com/lyft/flytestdlib/logger" | ||
) | ||
|
||
var launchplanColumns = []printer.Column{ | ||
{"Version", "$.id.version"}, | ||
{"Name", "$.id.name"}, | ||
{"Type", "$.closure.compiledTask.template.type"}, | ||
{"State", "$.spec.state"}, | ||
{"Schedule", "$.spec.entityMetadata.schedule"}, | ||
} | ||
|
||
func LaunchplanToProtoMessages(l []*admin.LaunchPlan) []proto.Message { | ||
messages := make([]proto.Message, 0, len(l)) | ||
for _, m := range l { | ||
messages = append(messages, m) | ||
} | ||
return messages | ||
} | ||
|
||
func getLaunchPlanFunc(ctx context.Context, args []string, cmdCtx cmdCore.CommandContext) error { | ||
launchPlanPrinter := printer.Printer{} | ||
|
||
if len(args) == 1 { | ||
name := args[0] | ||
launchPlan, err := cmdCtx.AdminClient().ListLaunchPlans(ctx, &admin.ResourceListRequest{ | ||
Limit: 10, | ||
Id: &admin.NamedEntityIdentifier{ | ||
Project: config.GetConfig().Project, | ||
Domain: config.GetConfig().Domain, | ||
Name: name, | ||
}, | ||
}) | ||
if err != nil { | ||
return err | ||
} | ||
logger.Debugf(ctx, "Retrieved %v excutions", len(launchPlan.LaunchPlans)) | ||
err = launchPlanPrinter.Print(config.GetConfig().MustOutputFormat(), launchplanColumns, LaunchplanToProtoMessages(launchPlan.LaunchPlans)...) | ||
if err != nil { | ||
return err | ||
} | ||
return nil | ||
} | ||
|
||
launchPlans, err := adminutils.GetAllNamedEntities(ctx, cmdCtx.AdminClient().ListLaunchPlanIds, adminutils.ListRequest{Project: config.GetConfig().Project, Domain: config.GetConfig().Domain}) | ||
if err != nil { | ||
return err | ||
} | ||
logger.Debugf(ctx, "Retrieved %v launch plans", len(launchPlans)) | ||
return launchPlanPrinter.Print(config.GetConfig().MustOutputFormat(), entityColumns, adminutils.NamedEntityToProtoMessage(launchPlans)...) | ||
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
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
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,8 +1,8 @@ | ||
admin: | ||
# For GRPC endpoints you might want to use dns:///flyte.myexample.com | ||
# endpoint: http://localhost:30082 | ||
endpoint: dns:///flyte.lyft.net | ||
insecure: false | ||
# endpoint: dns:///flyte.lyft.net | ||
insecure: true | ||
logger: | ||
show-source: true | ||
level: 1 |
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.