metal3-io / cluster-api-provider-metal3

Metal³ integration with https://github.com/kubernetes-sigs/cluster-api
Apache License 2.0
194 stars 87 forks source link

:seedling: Rewrite fetch_target_logs.sh in Golang #1763

Open peppi-lotta opened 3 weeks ago

peppi-lotta commented 3 weeks ago

What this PR does / why we need it: Running an sh file from go file will gives warning: G204: Audit use of command execution. In this PR I've rewritten the fetch_target_logs.sh in Go to avoid getting this warning.

Compared to the original: I've added kubect get pods -A and removed the split between stdout and stderr in the logs. Some of the logs had warning

W0613 11:04:05.645729       1 options.go:215] 
==== Removed Flag Warning ======================

logtostderr is removed in the k8s upstream and has no effect any more.

and based on further investigation it seems Kubernetes only has one API endpoint for logs and everything is logged into stdout.

metal3-io-bot commented 3 weeks ago

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: Once this PR has been reviewed and has the lgtm label, please assign mboukhalfa for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files: - **[OWNERS](https://github.com/metal3-io/cluster-api-provider-metal3/blob/main/OWNERS)** Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment
peppi-lotta commented 3 weeks ago

/test metal3-centos-e2e-integration-test-main /test metal3-ubuntu-e2e-integration-test-main

peppi-lotta commented 3 weeks ago

/test ?

metal3-io-bot commented 3 weeks ago

@peppi-lotta: The following commands are available to trigger required jobs:

The following commands are available to trigger optional jobs:

Use /test all to run the following jobs that were automatically triggered:

In response to [this](https://github.com/metal3-io/cluster-api-provider-metal3/pull/1763#issuecomment-2168227506): >/test ? > Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository.
metal3-io-bot commented 3 weeks ago

@peppi-lotta: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
metal3-centos-e2e-integration-test-main bb6e1ab01478141a6d34750f60e20ded029c827f link true /test metal3-centos-e2e-integration-test-main
metal3-ubuntu-e2e-integration-test-main bb6e1ab01478141a6d34750f60e20ded029c827f link true /test metal3-ubuntu-e2e-integration-test-main
Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository. I understand the commands that are listed [here](https://go.k8s.io/bot-commands).
metal3-io-bot commented 3 weeks ago

@peppi-lotta: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
metal3-centos-e2e-integration-test-main bb6e1ab01478141a6d34750f60e20ded029c827f link true /test metal3-centos-e2e-integration-test-main
metal3-ubuntu-e2e-integration-test-main bb6e1ab01478141a6d34750f60e20ded029c827f link true /test metal3-ubuntu-e2e-integration-test-main

Full PR test history. Your PR dashboard.

Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository. I understand the commands that are listed [here](https://go.k8s.io/bot-commands).
metal3-io-bot commented 2 weeks ago

PR needs rebase.

Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository.