Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(api,ui,cdsctl): bulk apply request for workflow template #3831

Merged
merged 35 commits into from
Jan 16, 2019

Conversation

richardlt
Copy link
Member

  1. Description
  2. Related issues
  3. About tests
  4. Mentions

@ovh/cds

@richardlt richardlt changed the title feat(api,ui,cdsctl): bulk apply request for workflow template WIP feat(api,ui,cdsctl): bulk apply request for workflow template Jan 7, 2019
@ovh-cds
Copy link
Collaborator

ovh-cds commented Jan 8, 2019

CDS Report build-ui#7930.0 ✘

  • Compile
    • Build UI ✘
    • TU All -
    • TU model ✔
    • TU service ✔
    • TU shared ✔
    • TU views ✔

@richardlt richardlt changed the title WIP feat(api,ui,cdsctl): bulk apply request for workflow template feat(api,ui,cdsctl): bulk apply request for workflow template Jan 8, 2019
Copy link
Member

@fsamin fsamin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think you forgot to git add the tests for the modified and new API handlers :)

cli/display.go Show resolved Hide resolved
cli/ask_confirm.go Outdated Show resolved Hide resolved
cli/cdsctl/template_bulk.go Outdated Show resolved Hide resolved
cli/cdsctl/template_bulk.go Outdated Show resolved Hide resolved
engine/api/templates.go Outdated Show resolved Hide resolved
ui/src/app/shared/history/history.component.ts Outdated Show resolved Hide resolved
func templateInitOperationFromParams(mwtis map[string]sdk.WorkflowTemplateInstance, minstances map[string]templateBulkInstancePath,
params, fileParams []templateBulkParameter) map[string]sdk.WorkflowTemplateBulkOperation {
// for all given instances, create an operation and reuse request if instance already exists
moperations := map[string]sdk.WorkflowTemplateBulkOperation{}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

indicate length of minstances


func templateAskForInstances(wt *sdk.WorkflowTemplate, mwtis map[string]sdk.WorkflowTemplateInstance, minstances map[string]templateBulkInstancePath,
moperations map[string]sdk.WorkflowTemplateBulkOperation) error {
opts := []cli.CustomMultiSelectOption{}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use make with length of mwtis

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

info = cli.Green("up to date")
}
// init map of projects and project repositories to prevent multiple api calls
mprojects := map[string]*sdk.Project{}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

indicate length of mwtis

@ovh-cds
Copy link
Collaborator

ovh-cds commented Jan 11, 2019

CDS Report it#7989.0 ✘

  • w-it
    • w-it ✘

@ovh-cds
Copy link
Collaborator

ovh-cds commented Jan 11, 2019

CDS Report it#7990.1 ■

  • w-it
    • w-it ■

"github.com/ovh/cds/sdk/slug"
)

func initTemplateTestCase() {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

initTemplateTestCase is unused (from deadcode)

@ovh-cds
Copy link
Collaborator

ovh-cds commented Jan 15, 2019

CDS Report it#8039.0 ✘

  • w-it
    • w-it ✘

cli/display.go Outdated
go func(d *Display) {
for {
time.Sleep(100 * time.Millisecond)
if *d == "" || ctx.Err() != nil {
continue
}

for i := 0; i < count-1; i++ {
fmt.Printf(clear)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

printf-style function with dynamic first argument and no further arguments should use print-style function instead (from megacheck)

@richardlt richardlt merged commit 554f327 into master Jan 16, 2019
@richardlt richardlt deleted the feat-workflow-template-bulk branch January 16, 2019 10:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants