-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
🌱 Collect kind logs when e2e bootstrap fails #5910
🌱 Collect kind logs when e2e bootstrap fails #5910
Conversation
@@ -218,6 +218,7 @@ func setupBootstrapCluster(config *clusterctl.E2EConfig, scheme *runtime.Scheme, | |||
RequiresDockerSock: config.HasDockerProvider(), | |||
Images: config.Images, | |||
IPFamily: config.GetVariable(IPFamily), | |||
LogFolder: filepath.Join(artifactFolder, "kind"), |
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.
Ideally, this change should be implemented by everyone using the E2E test framework.
An option to give people room to this change overtime is to log only if the log folder is defined.
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.
Right now the field is not required but if the cluster creation fails it would log into folder "", right?
I would prefer one of the following options:
- enforce that the log folder is set (via an
Expect
at the beginning ofCreateKindBootstrapClusterAndLoadImages
) - only export logs if the LogFolder is set
Both options are fine for me, I would prefer 1.. Afaik our API compatibility guarantees for framework allow this and as log folder is used everywhere it shouldn't be a problem for users to also set it here. Option 2. would probably mean that apart from us probably almost nobody benefits of this improvement.
(Would be good to mention this in the migration guide if we implement Option 1 though)
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.
We are now exporting logs only if the LogFolder is set; this is documented in the migration guide (even if it is not mandatory)
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.
Thx!
@@ -218,6 +218,7 @@ func setupBootstrapCluster(config *clusterctl.E2EConfig, scheme *runtime.Scheme, | |||
RequiresDockerSock: config.HasDockerProvider(), | |||
Images: config.Images, | |||
IPFamily: config.GetVariable(IPFamily), | |||
LogFolder: filepath.Join(artifactFolder, "kind"), |
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.
Right now the field is not required but if the cluster creation fails it would log into folder "", right?
I would prefer one of the following options:
- enforce that the log folder is set (via an
Expect
at the beginning ofCreateKindBootstrapClusterAndLoadImages
) - only export logs if the LogFolder is set
Both options are fine for me, I would prefer 1.. Afaik our API compatibility guarantees for framework allow this and as log folder is used everywhere it shouldn't be a problem for users to also set it here. Option 2. would probably mean that apart from us probably almost nobody benefits of this improvement.
(Would be good to mention this in the migration guide if we implement Option 1 though)
bb702e3
to
b5305aa
Compare
b5305aa
to
2fe632f
Compare
Thx! /lgtm |
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.
/approve
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: vincepri 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 |
This PR adds LogFolder Parameter in e2e for collecting kind logs. Please see kubernetes-sigs/cluster-api#5910 for reference.
What this PR does / why we need it:
This PR improves the E2E test framework by collecting kind logs in case creating the bootstrap cluster fails for any reason