feat: abra app logs shows task errors #395
No reviewers
Labels
No Label
bug
build
ci/cd
contributing
design
documentation
duplicate
enhancement
help wanted
invalid
meta
question
security
wontfix
No Milestone
No Assignees
3 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: coop-cloud/abra#395
Loading…
Reference in New Issue
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
e40d99bfe2
to98671a9f92
Amazin' 💯
@ -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 err
and 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
Filters
docstring.I added a docstring and simplified the function by moving the
appendMode
into thetailLogs
function.@ -603,3 +606,3 @@
// GetTimeoutFromLabel reads the timeout value from docker label "coop-cloud.${STACK_NAME}.TIMEOUT" and returns 50 as default value
func GetTimeoutFromLabel(compose *composetypes.Config, stackName string) (int, error) {
var timeout = 50 // Default Timeout
timeout := 50 // Default Timeout
Should we maybe abstract to
pkg/config/env.go
as 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.
98671a9f92
to10e8bf0c7e
LGTM! TYSM! 🤘
Unfortunately this broke the secret handling completely. Most of the secrets can't be found anymore. Its because of the modified
Filters
function, 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.