Skip to content

Conversation

@yevgeny-shnaidman
Copy link
Contributor

This API return the status of the an image in the MBSC object based on the image and the action. Is required by the MBSC controller

This API return the status of the an image in the MBSC object based on
the image and the action. Is required by the MBSC controller
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: yevgeny-shnaidman

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details 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 requested a review from mresvanis March 10, 2025 12:03
@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Mar 10, 2025
@k8s-ci-robot k8s-ci-robot requested a review from ybettan March 10, 2025 12:03
@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Mar 10, 2025
@yevgeny-shnaidman
Copy link
Contributor Author

/assign @ybettan

@k8s-ci-robot k8s-ci-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Mar 10, 2025
@netlify
Copy link

netlify bot commented Mar 10, 2025

Deploy Preview for kubernetes-sigs-kmm ready!

Name Link
🔨 Latest commit 8433c7e
🔍 Latest deploy log https://app.netlify.com/sites/kubernetes-sigs-kmm/deploys/67ced4f43b8d6e0008494eb2
😎 Deploy Preview https://deploy-preview-1045--kubernetes-sigs-kmm.netlify.app
📱 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 site configuration.

@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 74.40%. Comparing base (fa23a9b) to head (8433c7e).
Report is 232 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1045      +/-   ##
==========================================
- Coverage   79.09%   74.40%   -4.70%     
==========================================
  Files          51       76      +25     
  Lines        5109     6711    +1602     
==========================================
+ Hits         4041     4993     +952     
- Misses        882     1510     +628     
- Partials      186      208      +22     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • Test Analytics: Detect flaky tests, report on failures, and find test suite problems.


func (m *mbsc) GetImageStatus(mbscObj *kmmv1beta1.ModuleBuildSignConfig, image string, action kmmv1beta1.BuildOrSignAction) kmmv1beta1.BuildOrSignStatus {
for _, imageState := range mbscObj.Status.Images {
if imageState.Image == image && imageState.Action == action {
Copy link
Contributor

Choose a reason for hiding this comment

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

Why do we need to pass the action to get the status?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

to make sure that we get the correct one. MIC is sending request for image and action, if we don't pass action, we might get the status for the previous action

Copy link
Contributor

Choose a reason for hiding this comment

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

Remind me why don't we just update the whole status atomically, and remove the imageState.status if we just changed the action and the status wasn't reported yet?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

the status is updated atomically by MBSC controller, but it is updated once the MBSC controller has the result. MIC should never update the status of MBSC object.

@ybettan
Copy link
Contributor

ybettan commented Mar 11, 2025

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Mar 11, 2025
@k8s-ci-robot k8s-ci-robot merged commit 907c322 into kubernetes-sigs:main Mar 11, 2025
22 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. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants