-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
🌱 Improve logging for self-hosted e2e test #9637
🌱 Improve logging for self-hosted e2e test #9637
Conversation
/test pull-cluster-api-e2e-full-main |
b76b791
to
5de616e
Compare
5de616e
to
50ae30f
Compare
Signed-off-by: killianmuldoon <kmuldoon@vmware.com>
50ae30f
to
2caa534
Compare
@@ -271,7 +271,7 @@ func ClusterctlUpgradeSpec(ctx context.Context, inputGetter func() ClusterctlUpg | |||
} | |||
|
|||
// Get a ClusterProxy so we can interact with the workload cluster | |||
managementClusterProxy = input.BootstrapClusterProxy.GetWorkloadCluster(ctx, cluster.Namespace, cluster.Name) | |||
managementClusterProxy = input.BootstrapClusterProxy.GetWorkloadCluster(ctx, cluster.Namespace, cluster.Name, framework.WithMachineLogCollector(input.BootstrapClusterProxy.GetLogCollector())) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alternatively we could always add a logCollector to the workload ClusterProxy where the bootstrap ClusterProxy has one. This might be less surprising for users (it was surprising for me 😅)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This won't work if the bootstrap cluster and the workload cluster are from different infrastructure providers. I'm not sure if that's something we really support in our e2e tests though. This logger would also have trouble with e.g. mixed infrastructure.
Should I work on something that's able to pick the logger based on the infrastructure used for the Cluster?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@chrischdi @sbueringer WDYT?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm okay with both variants.
The variant on this PR would help to not create too many (unnecessary?) logs which waste resources. So I lean to keeping this for now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Current version is fine
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
LGTM label has been added. Git tree hash: 6f0d26098024ee5168b35cc3f9db12980c17930c
|
Super helpful addition which should help to debug self-hosted clusters! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Going to approve this as it only touches test code and it's useful for debugging current issues with self-hosted clusters.
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: killianmuldoon 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 |
Improve logging for the self-hosted tests by ensuring Machine and Infrastructure logs are collected before performing the move to the bootstrap cluster.
/area e2e-testing