Skip to content

Conversation

@chrischdi
Copy link
Member

@chrischdi chrischdi commented Nov 27, 2025

What type of PR is this?

/kind feature

What this PR does / why we need it:

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes #

Special notes for your reviewer:

Checklist:

  • squashed commits
  • includes documentation
  • includes emoji in title
  • adds unit tests
  • adds or updates e2e tests

Release note:

NONE

@k8s-ci-robot k8s-ci-robot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. release-note-none Denotes a PR that doesn't merit a release note. kind/feature Categorizes issue or PR as related to a new feature. needs-priority labels Nov 27, 2025
@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Nov 27, 2025
@chrischdi
Copy link
Member Author

/test pull-cluster-api-provider-aws-e2e-blocking

@chrischdi chrischdi force-pushed the pr-autoscale-ms-e2e-refactor branch from f4098f8 to 151d33e Compare November 27, 2025 21:12
@chrischdi
Copy link
Member Author

/retitle 🌱 autoscaling: try to gather the version information from MachineSets and e2e test improvements

/test pull-cluster-api-provider-aws-e2e

@k8s-ci-robot k8s-ci-robot changed the title [WIP] 🌱 autoscaling: try to gather the version information from MachineSets and e2e test improvements 🌱 autoscaling: try to gather the version information from MachineSets and e2e test improvements Nov 27, 2025
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Nov 27, 2025
@chrischdi
Copy link
Member Author

/retest

Comment on lines +543 to +548
func (r *AWSMachineTemplateReconciler) machineSetToAWSMachineTemplate(ctx context.Context, o client.Object) []ctrl.Request {
md, ok := o.(*clusterv1.MachineSet)
if !ok {
return nil
}

// Check if it references an AWSMachineTemplate
if md.Spec.Template.Spec.InfrastructureRef.Kind != awsMachineTemplateKind {
return nil
}

// Return reconcile request for the referenced AWSMachineTemplate
return []ctrl.Request{
{
NamespacedName: client.ObjectKey{
Namespace: md.Namespace,
Name: md.Spec.Template.Spec.InfrastructureRef.Name,
},
},
}
}
Copy link
Contributor

Choose a reason for hiding this comment

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

func (r *AWSMachineTemplateReconciler) kubeadmControlPlaneToAWSMachineTemplate(ctx context.Context, o client.Object) []ctrl.Request
func (r *AWSMachineTemplateReconciler) machineDeploymentToAWSMachineTemplate(ctx context.Context, o client.Object) []ctrl.Request
func (r *AWSMachineTemplateReconciler) machineSetToAWSMachineTemplate(ctx context.Context, o client.Object) []ctrl.Request

These three functions are very similar. Should we refactor them a bit, similar to how we handle objectToAWSMachineTemplate?

Copy link
Member

@damdo damdo Nov 28, 2025

Choose a reason for hiding this comment

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

I'd prefer to prioritize merging this if it comes back green, in the interest of getting the release out. But let's see what @chrischdi says

Copy link
Member Author

@chrischdi chrischdi Nov 28, 2025

Choose a reason for hiding this comment

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

Imho not worth the complexity compared to these simple functions.

Copy link
Member

@damdo damdo left a comment

Choose a reason for hiding this comment

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

A couple of non blocking nits

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Nov 28, 2025
@k8s-ci-robot
Copy link
Contributor

LGTM label has been added.

Git tree hash: d422856fc8bdd4edd2300244a6a9b0cd70be5549

@chrischdi chrischdi force-pushed the pr-autoscale-ms-e2e-refactor branch from 151d33e to f1ea53a Compare November 28, 2025 09:12
@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Nov 28, 2025
@k8s-ci-robot k8s-ci-robot requested a review from damdo November 28, 2025 09:12
Copy link
Member

@damdo damdo left a comment

Choose a reason for hiding this comment

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

/lgtm

TY

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Nov 28, 2025
@k8s-ci-robot
Copy link
Contributor

LGTM label has been added.

Git tree hash: ce26c1c04448c4b7076ed93ae7fcfdea1eb1a2cd

Copy link
Member

@richardcase richardcase left a comment

Choose a reason for hiding this comment

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

Thanks again @chrischdi

It would be good to move the predicate to a shared package somewhere but we don't need to hold the release up for that.

/approve

&clusterv1.MachineDeployment{},
handler.EnqueueRequestsFromMapFunc(r.machineDeploymentToAWSMachineTemplate),
// Only emit events for creation to reconcile in case the MachineDeployment got created after the AWSMachineTemplate was reconciled.
builder.WithPredicates(predicate.Funcs{
Copy link
Member

Choose a reason for hiding this comment

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

Could we move this predicate somewhere so its reusable? Especially as its used twice here.

Copy link
Member Author

Choose a reason for hiding this comment

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

I added it as var and used it here for now. I did not see a dedicated predicates package as we have in CAPI and currently we only need it here.

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: richardcase

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

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Nov 28, 2025
@chrischdi chrischdi force-pushed the pr-autoscale-ms-e2e-refactor branch from f1ea53a to 06f3c98 Compare November 28, 2025 10:44
@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Nov 28, 2025
@k8s-ci-robot k8s-ci-robot requested a review from damdo November 28, 2025 10:44
@chrischdi chrischdi force-pushed the pr-autoscale-ms-e2e-refactor branch from 06f3c98 to 2a454ad Compare November 28, 2025 10:45
Copy link
Member

@damdo damdo left a comment

Choose a reason for hiding this comment

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

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Nov 28, 2025
@k8s-ci-robot
Copy link
Contributor

LGTM label has been added.

Git tree hash: 499cfebd6966332847b3334b42bf7599c7388c46

@chrischdi
Copy link
Member Author

/retest

@k8s-ci-robot
Copy link
Contributor

k8s-ci-robot commented Nov 28, 2025

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

Test name Commit Details Required Rerun command
pull-cluster-api-provider-aws-e2e 151d33e link false /test pull-cluster-api-provider-aws-e2e

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

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-sigs/prow repository. I understand the commands that are listed here.

@damdo
Copy link
Member

damdo commented Nov 28, 2025

/test pull-cluster-api-provider-aws-e2e-blocking

@damdo
Copy link
Member

damdo commented Nov 28, 2025

/test pull-cluster-api-provider-aws-e2e

@k8s-ci-robot k8s-ci-robot merged commit c8e04c8 into kubernetes-sigs:main Nov 28, 2025
17 of 18 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. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/feature Categorizes issue or PR as related to a new feature. lgtm "Looks good to me", indicates that a PR is ready to be merged. needs-priority release-note-none Denotes a PR that doesn't merit a release note. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants