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

update: add cronjob registered in operator + add into cache for template and cronjob #1510

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

zdtsw
Copy link
Member

@zdtsw zdtsw commented Jan 16, 2025

Description

How Has This Been Tested?

Screenshot or short clip

Merge criteria

  • You have read the contributors guide.
  • Commit messages are meaningful - have a clear and concise summary and detailed explanation of what was changed and why.
  • Pull Request contains a description of the solution, a link to the JIRA issue, and to any dependent or related Pull Request.
  • Testing instructions have been added in the PR body (for PRs involving changes that are not immediately obvious).
  • The developer has manually tested the changes and verified that the changes work

@zdtsw
Copy link
Member Author

zdtsw commented Jan 16, 2025

cc @TomerFi

@zdtsw zdtsw requested review from lburgazzoli and jstourac and removed request for MarianMacik and biswassri January 16, 2025 13:10
@@ -652,6 +652,10 @@ func cleanupNimIntegration(ctx context.Context, cli client.Client, oldRelease cl

for _, delObj := range deleteObjs {
if gErr := cli.Get(ctx, types.NamespacedName{Name: delObj.name, Namespace: applicationNS}, delObj.obj); gErr != nil {
if errors.Is(gErr, &meta.NoKindMatchError{}) {
log.V(1).Error(k8serr.NewNotFound(schema.GroupResource{}, delObj.obj.GetName()), fmt.Sprintf("%s %s not found", delObj.desc, delObj.name))
Copy link
Contributor

@lburgazzoli lburgazzoli Jan 16, 2025

Choose a reason for hiding this comment

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

is this actually an error ? if neither kserve, nor modelmesh have been installed before, this would result in an error but it is not (IMHO)

Copy link
Member Author

Choose a reason for hiding this comment

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

but this is a check on the CRD, not on object, right?
i think the error was complaining not seeing "Template" in the cluster.

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes it would signal that the kind is unknown. My point is - if this should be seen as an error or not because if the type do not exist, then also the object won't exist.

However if the Template type is not know, would the installation of the component fail ?

Copy link
Contributor

Choose a reason for hiding this comment

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

However if the Template type is not know, would the installation of the component fail ?

if it fails, let it fail there in the component, not on cleanup of some leftover :)

Copy link
Member Author

Choose a reason for hiding this comment

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

reverted this change

@zdtsw zdtsw changed the title update: add error check for upgrade if delete object kind not exist in cluster update: add cronjob registered in operator + add into cache for template and cronjob Jan 16, 2025
Copy link

codecov bot commented Jan 16, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 19.78%. Comparing base (c35c6c1) to head (ac8fd08).
Report is 18 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1510   +/-   ##
=======================================
  Coverage   19.78%   19.78%           
=======================================
  Files         160      160           
  Lines       10880    10880           
=======================================
  Hits         2153     2153           
  Misses       8500     8500           
  Partials      227      227           

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

Copy link

openshift-ci bot commented Jan 17, 2025

@TomerFi: changing LGTM is restricted to collaborators

In response to this:

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.

Copy link

openshift-ci bot commented Jan 17, 2025

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: TomerFi
Once this PR has been reviewed and has the lgtm label, please ask for approval from zdtsw. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found 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

@zdtsw zdtsw removed the request for review from jstourac January 17, 2025 06:46
@openshift-merge-robot
Copy link
Contributor

PR needs rebase.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Todo
Development

Successfully merging this pull request may close these issues.

5 participants