Skip to content

Commit

Permalink
pflags does not support uint32 (flyteorg#88)
Browse files Browse the repository at this point in the history
  • Loading branch information
honnix authored Mar 16, 2020
1 parent 12dca2b commit c9b020f
Show file tree
Hide file tree
Showing 5 changed files with 44 additions and 17 deletions.
4 changes: 4 additions & 0 deletions flytepropeller/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,7 @@ golden:
.PHONY: test_unit_codecov
test_unit_codecov:
go test ./... -race -coverprofile=coverage.txt -covermode=atomic; curl -s https://codecov.io/bash > codecov_bash.sh; bash codecov_bash.sh

.PHONY: generate
generate: download_tooling
@go generate ./...
2 changes: 1 addition & 1 deletion flytepropeller/pkg/controller/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ type WorkqueueConfig struct {
// configuration for a node
type NodeConfig struct {
DefaultDeadlines DefaultDeadlines `json:"default-deadlines,omitempty" pflag:",Default value for timeouts"`
MaxNodeRetriesForSystemFailures uint32 `json:"max-node-retries-system-failures" pflag:"2,Maximum number of retries per node for node failure due to infra issues"`
MaxNodeRetriesForSystemFailures int64 `json:"max-node-retries-system-failures" pflag:"2,Maximum number of retries per node for node failure due to infra issues"`
}

// Contains default values for timeouts
Expand Down
7 changes: 4 additions & 3 deletions flytepropeller/pkg/controller/config/config_flags.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

46 changes: 34 additions & 12 deletions flytepropeller/pkg/controller/config/config_flags_test.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion flytepropeller/pkg/controller/nodes/executor.go
Original file line number Diff line number Diff line change
Expand Up @@ -734,7 +734,7 @@ func NewExecutor(ctx context.Context, nodeConfig config.NodeConfig, store *stora
outputResolver: NewRemoteFileOutputResolver(store),
defaultExecutionDeadline: nodeConfig.DefaultDeadlines.DefaultNodeExecutionDeadline.Duration,
defaultActiveDeadline: nodeConfig.DefaultDeadlines.DefaultNodeActiveDeadline.Duration,
maxNodeRetriesForSystemFailures: nodeConfig.MaxNodeRetriesForSystemFailures,
maxNodeRetriesForSystemFailures: uint32(nodeConfig.MaxNodeRetriesForSystemFailures),
}
nodeHandlerFactory, err := NewHandlerFactory(ctx, exec, workflowLauncher, kubeClient, catalogClient, nodeScope)
exec.nodeHandlerFactory = nodeHandlerFactory
Expand Down

0 comments on commit c9b020f

Please sign in to comment.