Skip to content

fix: support multiple containers per pod when dumping logs #11878

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 16, 2025

Conversation

domdom82
Copy link
Contributor

How to categorize this PR?

/area testing
/kind bug

What this PR does / why we need it:

             <*errors.StatusError | 0xc00045d220>{
                  ErrStatus: {
                      TypeMeta: {Kind: "", APIVersion: ""},
                      ListMeta: {
                          SelfLink: "",
                          ResourceVersion: "",
                          Continue: "",
                          RemainingItemCount: nil,
                      },
                      Status: "Failure",
                      Message: "a container name must be specified for pod <test pod>, choose one of: [container-a container-b]",
                      Reason: "BadRequest",
                      Details: nil,
                      Code: 400,
                  },
  • This PR changes the function such that on the set of pods selected by the given label, all init-containers and regular containers are iterated and their logs are dumped.

Release note:

The `DumpLogsForPodsWithLabelsInNamespace` function in the test framework now supports dumping pods with multiple containers.

@gardener-prow gardener-prow bot added area/testing Testing related kind/bug Bug cla: yes Indicates the PR's author has signed the cla-assistant.io CLA. labels Apr 15, 2025
@gardener-prow gardener-prow bot requested review from Kostov6 and marc1404 April 15, 2025 14:33
@gardener-prow gardener-prow bot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Apr 15, 2025
@domdom82
Copy link
Contributor Author

/test pull-gardener-e2e-kind-migration

@domdom82 domdom82 force-pushed the dump-logs-for-all-containers branch 2 times, most recently from f7c3b55 to b341a09 Compare April 16, 2025 08:45
@domdom82 domdom82 requested a review from timuthy April 16, 2025 08:46
@ScheererJ
Copy link
Member

/assign

@domdom82 domdom82 force-pushed the dump-logs-for-all-containers branch from b341a09 to 122a228 Compare April 16, 2025 12:38
@domdom82 domdom82 requested a review from ScheererJ April 16, 2025 12:39
Co-authored-by: Tim Usner <tim.usner@sap.com>
Copy link
Member

@ScheererJ ScheererJ left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@gardener-prow gardener-prow bot added the lgtm Indicates that a PR is ready to be merged. label Apr 16, 2025
Copy link
Contributor

gardener-prow bot commented Apr 16, 2025

LGTM label has been added.

Git tree hash: beeee74a3b72ad279a7ddf005bd3a3d46ead3e81

Copy link
Member

@timuthy timuthy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!
/lgtm
/approve

Copy link
Contributor

gardener-prow bot commented Apr 16, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: timuthy

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

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@gardener-prow gardener-prow bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Apr 16, 2025
@gardener-prow gardener-prow bot merged commit 2dc0ad5 into gardener:master Apr 16, 2025
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. area/testing Testing related cla: yes Indicates the PR's author has signed the cla-assistant.io CLA. kind/bug Bug lgtm Indicates that a PR is ready to be merged. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants