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: bug not filling params.env with default cert value in model registry operator #1457

Conversation

Al-Pragliola
Copy link
Contributor

Description

Starting with version v2.22.0, the DEFAULT_CERT value in the params.env file for the model registry operator is not updated with the value from

	extraParamsMap = map[string]string{
		"DEFAULT_CERT": DefaultModelRegistryCert,
	}

The problem seems to be that the extraParamsMap was merged with imageParams when it was passed to the odhdeploy.ApplyParams function, here the second argument went through

	// 1. Update images with env variables
	// e.g "odh-kuberay-operator-controller-image": "RELATED_IMAGE_ODH_KUBERAY_OPERATOR_CONTROLLER_IMAGE",
	for i := range paramsEnvMap {
		relatedImageValue := os.Getenv(imageParamsMap[i])
		if relatedImageValue != "" {
			updated |= updateMap(&paramsEnvMap, i, relatedImageValue)
		}
	}

instead of

	// 2. Update other fileds with extraParamsMap which are not carried from component
	for _, extraParamsMap := range extraParamsMaps {
		for eKey, eValue := range extraParamsMap {
			updated |= updateMap(&paramsEnvMap, eKey, eValue)
		}
	}

so the empty value is explained

How Has This Been Tested?

local testing

Screenshot or short clip

envs from model registry operator

image

folder inside opendatahub-operator

image

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

Signed-off-by: Alessio Pragliola <seth.pro@gmail.com>
@openshift-ci openshift-ci bot requested review from CFSNM and gzaronikas December 17, 2024 12:45
@Al-Pragliola
Copy link
Contributor Author

Al-Pragliola commented Dec 17, 2024

/cc @lburgazzoli @opendatahub-io/platform

@openshift-ci openshift-ci bot requested a review from lburgazzoli December 17, 2024 12:48
@lburgazzoli
Copy link
Contributor

@Al-Pragliola good catch, I guess other components may be suffering from the same issue ...

@Al-Pragliola
Copy link
Contributor Author

@Al-Pragliola good catch, I guess other components may be suffering from the same issue ...

I looked at the other components and it seems that model registry was the only component affected

Copy link

openshift-ci bot commented Dec 17, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: lburgazzoli

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

@Al-Pragliola
Copy link
Contributor Author

@lburgazzoli thanks for the review 🙏🏼 I think there's something wrong with the CI

@lburgazzoli
Copy link
Contributor

@lburgazzoli thanks for the review 🙏🏼 I think there's something wrong with the CI

yep, it is broken

@biswassri
Copy link
Contributor

/retest

4 similar comments
@lburgazzoli
Copy link
Contributor

/retest

@biswassri
Copy link
Contributor

/retest

@lburgazzoli
Copy link
Contributor

/retest

@lburgazzoli
Copy link
Contributor

/retest

@lburgazzoli
Copy link
Contributor

/test opendatahub-operator-e2e

@grdryn
Copy link
Member

grdryn commented Dec 18, 2024

/retest

1 similar comment
@biswassri
Copy link
Contributor

/retest

Copy link

codecov bot commented Dec 19, 2024

Codecov Report

Attention: Patch coverage is 0% with 2 lines in your changes missing coverage. Please review.

Please upload report for BASE (main@dc23f27). Learn more about missing BASE report.

Files with missing lines Patch % Lines
...trollers/components/modelregistry/modelregistry.go 0.00% 2 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1457   +/-   ##
=======================================
  Coverage        ?   19.16%           
=======================================
  Files           ?      157           
  Lines           ?    10330           
  Branches        ?        0           
=======================================
  Hits            ?     1980           
  Misses          ?     8126           
  Partials        ?      224           

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

@openshift-merge-bot openshift-merge-bot bot merged commit 198fd71 into opendatahub-io:main Dec 19, 2024
10 checks passed
@Al-Pragliola Al-Pragliola deleted the al-pragliola-fix-bug-no-default-cert-mr-operator branch December 19, 2024 08:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

4 participants