Skip to content

Conversation

arshadd-b
Copy link
Contributor

What this PR does / why we need it:

This PR consists of following changes

  • Adopt CAPI v1beta2 status changes
  • Standardize the controller flow by utilising CAPI provided helper functions
  • Removed usage of deprecated github.com/pkg/errors package.

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 #2389

Special notes for your reviewer:

/area provider/ibmcloud

  1. Please confirm that if this PR changes any image versions, then that's the sole change this PR makes.

Release note:

Add v1beta2 changes to IBMPowerVSImage

@k8s-ci-robot k8s-ci-robot added area/provider/ibmcloud Issues or PRs related to ibmcloud provider cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Jul 1, 2025
Copy link

netlify bot commented Jul 1, 2025

Deploy Preview for kubernetes-sigs-cluster-api-ibmcloud ready!

Name Link
🔨 Latest commit e6945d2
🔍 Latest deploy log https://app.netlify.com/projects/kubernetes-sigs-cluster-api-ibmcloud/deploys/68a84bcf8980d300089e800e
😎 Deploy Preview https://deploy-preview-2412.cluster-api-ibmcloud.sigs.k8s.io
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@k8s-ci-robot k8s-ci-robot added needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Jul 1, 2025
@k8s-ci-robot
Copy link
Contributor

Hi @arshadd-b. Thanks for your PR.

I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

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.

@arshadd-b arshadd-b changed the title Add v1beta2 changes to IBMPowerVSImage [WIP] Add v1beta2 changes to IBMPowerVSImage Jul 1, 2025
@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. labels Jul 1, 2025
@arshadd-b arshadd-b force-pushed the update-powervs-image branch from 9632fae to a3756f6 Compare July 2, 2025 15:56
@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jul 2, 2025
@arshadd-b arshadd-b force-pushed the update-powervs-image branch 4 times, most recently from eaf2b42 to 1be332d Compare July 7, 2025 06:00
@k8s-ci-robot k8s-ci-robot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Jul 7, 2025
@arshadd-b arshadd-b force-pushed the update-powervs-image branch from 0956e60 to 322a3dc Compare July 8, 2025 05:00
Copy link
Contributor

@Karthik-K-N Karthik-K-N left a comment

Choose a reason for hiding this comment

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

Thanks for the PR, I will take a another look once you addressed the comments.

Overall lets revisit the log statement and make them better.

@Amulyam24
Copy link
Contributor

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Jul 11, 2025
@arshadd-b arshadd-b force-pushed the update-powervs-image branch from 75af036 to 7d51cd4 Compare July 15, 2025 04:27
@arshadd-b arshadd-b requested a review from Karthik-K-N July 18, 2025 07:25
@arshadd-b arshadd-b changed the title [WIP] Add v1beta2 changes to IBMPowerVSImage Add v1beta2 changes to IBMPowerVSImage Jul 18, 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 Jul 18, 2025
@arshadd-b
Copy link
Contributor Author

Image queued
Screenshot 2025-07-16 at 7 15 54 PM

Image Importing
Screenshot 2025-07-16 at 7 17 20 PM

Image Ready
Screenshot 2025-07-16 at 7 14 51 PM

Copy link
Contributor

@Karthik-K-N Karthik-K-N left a comment

Choose a reason for hiding this comment

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

One last thing, otherwise LGTM


func patchIBMPowerVSImage(ctx context.Context, patchHelper *v1beta1patch.Helper, ibmPowerVSImage *infrav1.IBMPowerVSImage) error {
// always update the readyCondition.
v1beta1conditions.SetSummary(ibmPowerVSImage,
Copy link
Contributor

Choose a reason for hiding this comment

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

Hey, Seems like you need to add back that previous change set of making sure conidtion is always set.

Also lets add a UT to make sure, the condition is always set in the first reconcilation

Copy link
Contributor

Choose a reason for hiding this comment

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

@arshadd-b please address the review comments.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added the condition back and added UT to check the condition is getting set.

@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Aug 12, 2025
@arshadd-b
Copy link
Contributor Author

/retest

@arshadd-b arshadd-b force-pushed the update-powervs-image branch 2 times, most recently from da50462 to f64ee6a Compare August 12, 2025 06:34
Copy link
Contributor

@Karthik-K-N Karthik-K-N left a comment

Choose a reason for hiding this comment

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

Couple of small things otherwise, LGTM, Thanks for the PR.

Since we don't have CI to test the flow, At the end of addressing all the changes, Do you mind testing the cluster creation with infra creation flow and share the output in the PR.

name string
powervsCluster *infrav1.IBMPowerVSCluster
powervsImage *infrav1.IBMPowerVSImage
expectError bool
Copy link
Contributor

Choose a reason for hiding this comment

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

Is it possible to just add another case, where the worksapceNotReady state is set?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

sure will check and add

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We have to mock the GetServiceInstance and it is not straight forward. Will create follow up for this
cc: @Karthik-K-N

@Prajyot-Parab
Copy link
Contributor

@arshadd-b We have a major release in the coming weeks. Please prioritize this task accordingly.

@arshadd-b
Copy link
Contributor Author

@arshadd-b We have a major release in the coming weeks. Please prioritize this task accordingly.

sure

@arshadd-b arshadd-b force-pushed the update-powervs-image branch 7 times, most recently from 885c76e to 71e2e39 Compare August 22, 2025 09:20
@Prajyot-Parab
Copy link
Contributor

@arshadd-b Please squash the commits.

record.Warnf(i.IBMPowerVSImage, "FailedCreateImageImportJob", "Failed image import job creation - %v", err)
return nil, nil, err
}
i.Info("New import job request created")
log.Info("New import job request created", "jobID", *jobRef.ID)
Copy link
Contributor

Choose a reason for hiding this comment

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

Is it safe to deref the jobRef, I see there is no nil check for jobRef?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I have removed this jobID

@arshadd-b arshadd-b force-pushed the update-powervs-image branch from a9bedbc to 728a270 Compare August 22, 2025 10:43
@arshadd-b arshadd-b force-pushed the update-powervs-image branch from 728a270 to e6945d2 Compare August 22, 2025 10:51
Copy link
Contributor

@Karthik-K-N Karthik-K-N left a comment

Choose a reason for hiding this comment

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

/lgtm

Thank you.

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

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Amulyam24, arshadd-b, Prajyot-Parab

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 Aug 22, 2025
@k8s-ci-robot k8s-ci-robot merged commit 4a0fa23 into kubernetes-sigs:main Aug 22, 2025
14 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/provider/ibmcloud Issues or PRs related to ibmcloud provider cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

EPIC: Update CAPIBM resources to use v1beta2 API
5 participants