Skip to content
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

Fix test framework for eksa version #6278

Merged
merged 6 commits into from
Jul 25, 2023
Merged

Conversation

tatlat
Copy link
Member

@tatlat tatlat commented Jul 25, 2023

Issue #, if available:

Description of changes:

Testing (if applicable):

Documentation added/planned (if applicable):

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@eks-distro-bot eks-distro-bot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Jul 25, 2023
@codecov
Copy link

codecov bot commented Jul 25, 2023

Codecov Report

Merging #6278 (63092e7) into main (bb70937) will decrease coverage by 0.06%.
Report is 1 commits behind head on main.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main    #6278      +/-   ##
==========================================
- Coverage   75.17%   75.11%   -0.06%     
==========================================
  Files         448      447       -1     
  Lines       37592    37242     -350     
==========================================
- Hits        28261    27976     -285     
+ Misses       7743     7701      -42     
+ Partials     1588     1565      -23     
Files Changed Coverage Δ
pkg/controller/clusters/status.go 63.82% <100.00%> (+0.78%) ⬆️

... and 5 files with indirect coverage changes

@@ -22,6 +22,11 @@ func UpdateClusterStatusForControlPlane(ctx context.Context, client client.Clien
return errors.Wrapf(err, "getting kubeadmcontrolplane")
}

if kcp == nil {
Copy link
Member

Choose a reason for hiding this comment

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

why this change? it's difficult to understand the changes without any context

Copy link
Member Author

Choose a reason for hiding this comment

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

it caused a nil pointer dereference when deleting a workload cluster in TestVSphereUpgradeKubernetes123to124UbuntuWorkloadClusterAPI in updateControlPlaneReadyCondition(cluster, kcp)

Copy link
Member

Choose a reason for hiding this comment

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

I'd vote to just return nil here instead of also setting the condition then. The ControlPlaneInitialized condition should not be updated again after being "True". This will update the value back to "False"

Copy link
Member

Choose a reason for hiding this comment

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

is it easier to just add this check to updateControlPlaneReadyCondition?

Copy link
Member Author

Choose a reason for hiding this comment

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

yeah we can do that instead

Copy link
Member

Choose a reason for hiding this comment

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

yeah, i think that solution is better

@eks-distro-bot eks-distro-bot added size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Jul 25, 2023
@eks-distro-bot eks-distro-bot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Jul 25, 2023
@g-gaston
Copy link
Member

/lgtm
Next time please add some description to the PR to help the reviewers build context :)

@cxbrowne1207
Copy link
Member

/lgtm

@tatlat
Copy link
Member Author

tatlat commented Jul 25, 2023

/approve

@eks-distro-bot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: tatlat

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

@eks-distro-bot eks-distro-bot merged commit 25168af into aws:main Jul 25, 2023
5 checks passed
@tatlat
Copy link
Member Author

tatlat commented Jul 25, 2023

/cherry-pick release-0.17

@eks-distro-pr-bot
Copy link
Contributor

@tatlat: new pull request created: #6283

In response to this:

/cherry-pick release-0.17

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

shubhamsharan21 pushed a commit to shubhamsharan21/eks-anywhere that referenced this pull request Aug 2, 2023
* fix framework

* fix nil pointer dereference in e2e

* move nil check again

* add kcp nil test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved lgtm 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.

5 participants