feat: abra app logs shows task errors #395
Reference in New Issue
Block a user
No description provided.
Delete Branch "p4u1/abra:logs-task-error"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The log command now checks for the ready state in the task list. If it is not ready. It shows the task errors. This might look like this:
Feel free to suggest a better error ouptput.
Closes coop-cloud/organising#518
e40d99bfe2to98671a9f92Amazin' 💯
@ -147,0 +99,4 @@filters.Add("name", service.Spec.Name)tasks, err := cl.TaskList(context.Background(), types.TaskListOptions{Filters: f})if err != nil {logrus.Fatal(err)Slightly confusing that this function does
return errand alsologrus.Fatal(err). Maybe this is handier?Good catch! Changed it to
return err. I did not change thelogrus.Fatal(err)in the goroutine below because otherwise I would need to create an error channel.@ -120,3 +110,4 @@return filters, nil}func fmtFilter(appendMode bool, exact bool, stack string, service string) string {Missing a docstring? Pretty cryptic function otherwise. Can be taken from the
Filtersdocstring.I added a docstring and simplified the function by moving the
appendModeinto thetailLogsfunction.@ -603,3 +606,3 @@// GetTimeoutFromLabel reads the timeout value from docker label "coop-cloud.${STACK_NAME}.TIMEOUT" and returns 50 as default valuefunc GetTimeoutFromLabel(compose *composetypes.Config, stackName string) (int, error) {var timeout = 50 // Default Timeouttimeout := 50 // Default TimeoutShould we maybe abstract to
pkg/config/env.goas a constant?This was only changed because I formatted the whole file. I would prefer to make a change like this in a separate pr.
98671a9f92to10e8bf0c7eLGTM! TYSM! 🤘
Unfortunately this broke the secret handling completely. Most of the secrets can't be found anymore. Its because of the modified
Filtersfunction, that is used by the secrets.Very sorry about that! Can you be a bit more specific on how to reproduce the problem? Because for me it still works and also the integration tests for secrets still pass.