-
Notifications
You must be signed in to change notification settings - Fork 135
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
Clean up tink worker; remove os.Exit; ensure valid container names: #655
Conversation
Codecov Report
@@ Coverage Diff @@
## main #655 +/- ##
==========================================
+ Coverage 48.86% 50.45% +1.58%
==========================================
Files 20 20
Lines 1017 995 -22
==========================================
+ Hits 497 502 +5
+ Misses 514 487 -27
Partials 6 6
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
@@ -130,7 +130,6 @@ func initViper(logger log.Logger, cmd *cobra.Command) error { | |||
logger.With("configFile", viper.ConfigFileUsed()).Error(err, "could not load config file") | |||
return err | |||
} | |||
logger.Info("no config file found") |
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.
🙏🏻
@@ -76,13 +77,22 @@ func (m *containerManager) CreateContainer(ctx context.Context, cmd []string, wf | |||
|
|||
hostConfig.Binds = append(hostConfig.Binds, action.GetVolumes()...) | |||
l.With("command", cmd).Info("creating container") | |||
resp, err := m.cli.ContainerCreate(ctx, config, hostConfig, nil, nil, action.GetName()) | |||
name := makeValidContainerName(action.GetName()) |
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.
I forgot about this, well remembered!
Removing numerous `os.Exit` calls means that tink worker wont require a restart for action execution failures. This commit also allows action names to contain spaces without the action failing to run. Signed-off-by: Jacob Weinstock <[email protected]>
With the worker now not erroring out this e2e test needed updated. Signed-off-by: Jacob Weinstock <[email protected]>
It appears the template library reports a different error in Go > 1.18 with respect to a missing `}` in a template. (`{{.device_1}`, for example). Signed-off-by: Jacob Weinstock <[email protected]>
This removes more unneeded code and drops the use of `goto` statements. Signed-off-by: Jacob Weinstock <[email protected]>
8561647
to
f820d1d
Compare
@mergify queue |
✅ The pull request has been merged automaticallyThe pull request has been merged automatically at fdfecb9 |
Description
Removing numerous
os.Exit
calls means that tinkworker wont require a restart for action execution failures. This commit also allows action names to contain spaces without the action failing to run.
Why is this needed
Fixes: #463
How Has This Been Tested?
How are existing users impacted? What migration steps/scripts do we need?
Checklist:
I have: