Skip to content

Commit

Permalink
Remove TODOs
Browse files Browse the repository at this point in the history
Signed-off-by: Eduardo Apolinario <[email protected]>
  • Loading branch information
eapolinario committed Dec 19, 2023
1 parent eb5c81d commit 4021387
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 5 deletions.
1 change: 0 additions & 1 deletion flyteplugins/go/tasks/logs/logging_utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,6 @@ func InitializeLogPlugins(cfg *LogConfig) (tasklog.Plugin, error) {
if len(cfg.FlyinTemplateURI) > 0 {
plugins = append(plugins, tasklog.TemplateLogPlugin{DisplayName: "Flyin Logs", Scheme: tasklog.TemplateSchemeFlyin, TemplateURIs: []tasklog.TemplateURI{cfg.FlyinTemplateURI}, MessageFormat: core.TaskLog_JSON})
} else {
// TODO: Figure out what to use a default here.
plugins = append(plugins, tasklog.TemplateLogPlugin{DisplayName: "Flyin Logs", Scheme: tasklog.TemplateSchemeFlyin, TemplateURIs: []tasklog.TemplateURI{fmt.Sprintf("https://flyin.%s/logs/{{ .namespace }}/{{ .podName }}/{{ .containerName }}/{{ .containerId }}", cfg.GCPProjectName)}, MessageFormat: core.TaskLog_JSON})
}

Check warning on line 117 in flyteplugins/go/tasks/logs/logging_utils.go

View check run for this annotation

Codecov / codecov/patch

flyteplugins/go/tasks/logs/logging_utils.go#L116-L117

Added lines #L116 - L117 were not covered by tests
}
Expand Down
4 changes: 1 addition & 3 deletions flyteplugins/go/tasks/pluginmachinery/tasklog/template.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,14 +88,12 @@ func (input Input) templateVarsForScheme(scheme TemplateScheme) TemplateVars {

switch scheme {
case TemplateSchemeFlyin:
// TODO: Confirm that having a default port is okay.
port := input.TaskTemplate.GetConfig()["port"]
if port == "" {
port = "8081"
port = "8080"
}
vars = append(
vars,
// Replace the port with the port from the task template.
TemplateVar{defaultRegexes.Port, port},
)
fallthrough
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -583,7 +583,7 @@ func TestTemplateLogPlugin(t *testing.T) {
Output{
TaskLogs: []*core.TaskLog{
{
Uri: "vscode://flyin:8081/my-pod-name",
Uri: "vscode://flyin:8080/my-pod-name",
MessageFormat: core.TaskLog_JSON,
},
},
Expand Down

0 comments on commit 4021387

Please sign in to comment.