knative / test-infra

Test infrastructure for the Knative project
Apache License 2.0
82 stars 161 forks source link

Add logs before executing command in the *.sh scripts #686

Closed chizhg closed 5 years ago

chizhg commented 5 years ago

Right now when there is test failure, it is sometimes hard for us to find the reason through logs, since we cannot clearly know each commands executed on the cluster.

It would be helpful if we log the executed commands during environment setup, like what Prow is doing now. We can see Prow is printing out logs for each key command execution, which is quite clear:

Call:  gcloud auth activate-service-account --key-file=/etc/test-account/service-account.json
Call:  gcloud config get-value account
Call:  git init github.com/knative/test-infra
...

/assign @Fredy-Z

jessiezcc commented 5 years ago

@Fredy-Z, pls review your ideas first with @adrcunha before implementation.

adrcunha commented 5 years ago

Synced with Chi. The idea is basically being more verbose when performing actions in the shell scripts. For example: when installing Knative Serving, ultimately there's a kubectl apply command; that should be printed to the logs.

That would be a nice to have, and wouldn't inflate the logs much. However, the implementation requires going through all scripts and adding relevant echo commands. Plus, during regular script update/maintenance, these logs must be kept up-to-date.

Again, it's a nice to have but I don't think it's a high priority feature.

adrcunha commented 5 years ago

We don't have the manpower for this task now, please reopen if things change.