Add task config in the flytectl config file - #6538
Conversation
Signed-off-by: Nelson Chen <asd3431090@gmail.com>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #6538 +/- ##
==========================================
+ Coverage 58.64% 58.69% +0.05%
==========================================
Files 938 938
Lines 71527 71705 +178
==========================================
+ Hits 41948 42090 +142
- Misses 26390 26423 +33
- Partials 3189 3192 +3
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Signed-off-by: Nelson Chen <asd3431090@gmail.com>
|
I think the field name cc @pingsutw WDYT? |
It's intentional, we want to make it consistent with Flyte SDK |
|
I agree the field name is not great, but we have shopped in v2 |
Signed-off-by: Nelson Chen <asd3431090@gmail.com>
| if config.GetConfig().Domain == "" { | ||
| return fmt.Errorf("project and domain are required parameters") | ||
| } | ||
| fmt.Printf("Using Project: %s, Domain: %s\n", config.GetConfig().Project, config.GetConfig().Domain) |
There was a problem hiding this comment.
This print out seems to break json output. I think it should either be reverted or silenced when outputting json.
Tracking issue
Why are the changes needed?
If we specified the
project/domainin the flytectl config, we don't need to add-p flytesnack -d deploymentin every flytectl command.What changes were proposed in this pull request?
Read the flytectl config when there aren't project/domain in the flytectl config.
How was this patch tested?
Run flytectl command without specifying project/domain
Before:
After:
Add task config in flytectl config and Run flytectl command

Setup process
Screenshots
Check all the applicable boxes
Related PRs
Docs link
Summary by Bito
This pull request introduces a new task configuration feature in the flytectl tool, enabling users to set project and domain settings in the configuration file. This enhancement streamlines command usage and minimizes the need for repetitive command-line inputs, improving the overall user experience. It includes the addition of a TaskConfig struct and updates to command handling, as well as modifications to the GetConfig function to read these values from the configuration when not explicitly provided.