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

apis: DSCInitialization: annotate ApplicationsNamespace with omitempty #1585

Merged

Conversation

ykaliuta
Copy link
Contributor

@ykaliuta ykaliuta commented Jan 29, 2025

Jira: https://issues.redhat.com/browse/RHOAIENG-18931

Api sets default value to opendatahub, but without "omitempty" in
case of operator automatically creates DSCI (upgrade.go:CreateDefaultDSCI), the resulting object contains applicationsNamespace: "" and it's not defaulted by the api server causing then problems like

Namespace "" is invalid: metadata.name: Required value: name or generateName is required

The problem was triggered by removing default value for command line switch in the cleanup.

Fixes: b0a0f87 ("update: clean up old code before refactor (#1494)")

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

@openshift-ci openshift-ci bot requested review from ugiordan and zdtsw January 29, 2025 13:56
Copy link
Contributor

This PR can't be merged just yet 😢

Please run make generate manifests api-docs and commit the changes.

For more info: https://github.com/opendatahub-io/opendatahub-operator/actions/runs/13032878021

@ykaliuta
Copy link
Contributor Author

/cc @lburgazzoli

@openshift-ci openshift-ci bot requested a review from lburgazzoli January 29, 2025 13:57
@ykaliuta ykaliuta force-pushed the empty-app-namespace branch 3 times, most recently from f3ed875 to bc0520b Compare January 29, 2025 15:21
Jira: https://issues.redhat.com/browse/RHOAIENG-18931

Api sets default value to opendatahub, but without "omitempty" in
case of operator automatically creates
DSCI (upgrade.go:CreateDefaultDSCI), the resulting object contains
applicationsNamespace: "" and it's not defaulted by the api server
causing then problems like

```
Namespace "" is invalid: metadata.name: Required value: name or generateName is required
```

The problem was triggered by removing default value for command line
switch in the cleanup.

Fixes: b0a0f87 ("update: clean up old code before refactor (opendatahub-io#1494)")

Signed-off-by: Yauheni Kaliuta <[email protected]>
@ykaliuta ykaliuta force-pushed the empty-app-namespace branch from bc0520b to ddf85f0 Compare January 29, 2025 15:27
Copy link

openshift-ci bot commented Jan 29, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: zdtsw

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

Copy link

codecov bot commented Jan 29, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 19.98%. Comparing base (6e134b1) to head (ddf85f0).
Report is 3 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1585   +/-   ##
=======================================
  Coverage   19.98%   19.98%           
=======================================
  Files         159      159           
  Lines       10780    10780           
=======================================
  Hits         2154     2154           
  Misses       8396     8396           
  Partials      230      230           

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

@openshift-merge-bot openshift-merge-bot bot merged commit 768539c into opendatahub-io:main Jan 29, 2025
10 checks passed
zdtsw pushed a commit to zdtsw-forking/opendatahub-operator that referenced this pull request Feb 3, 2025
opendatahub-io#1585)

Jira: https://issues.redhat.com/browse/RHOAIENG-18931

Api sets default value to opendatahub, but without "omitempty" in
case of operator automatically creates
DSCI (upgrade.go:CreateDefaultDSCI), the resulting object contains
applicationsNamespace: "" and it's not defaulted by the api server
causing then problems like

```
Namespace "" is invalid: metadata.name: Required value: name or generateName is required
```

The problem was triggered by removing default value for command line
switch in the cleanup.

Fixes: b0a0f87 ("update: clean up old code before refactor (opendatahub-io#1494)")

Signed-off-by: Yauheni Kaliuta <[email protected]>
(cherry picked from commit 768539c)
openshift-merge-bot bot pushed a commit that referenced this pull request Feb 10, 2025
* chore: cleanup kustomize config (#1497)

- suspend too many WARNING lines from "make bundle"
- remove sample config for components and monitoring

Signed-off-by: Wen Zhou <[email protected]>
(cherry picked from commit 4fe5bed)

* chore: add more rules in golint (#1487)

- add rules for our API components and service which force alias to be named with suffix ctrl

Signed-off-by: Wen Zhou <[email protected]>
(cherry picked from commit 32d75a8)

* update: clean up old code before refactor (#1494)

* update: clean up old code before refactor

- remove reference we explicilty check on odhdashboardconfig and kserve
- remove customized config on controller QPS
- remove RemoveLabel which is not called anywhere

Signed-off-by: Wen Zhou <[email protected]>

* update:

- remove function for upgrade cleanup introduced before 2.8
- remove flags to main: operator namespace and application namespace
  ( operator namespace is passing as env variable, app namespace is done by DSCI )

Signed-off-by: Wen Zhou <[email protected]>

* fix: Auth CR is cluster-scoped no need to set namespace for request

- application namespace is removed from reconciler of dsci

Signed-off-by: Wen Zhou <[email protected]>

* fix: wrong code for upgrade path + rebase error

Signed-off-by: Wen Zhou <[email protected]>

---------

Signed-off-by: Wen Zhou <[email protected]>
(cherry picked from commit b0a0f87)

* docs: update workflow and how we use two branchs for ODH and downstream (#1582)

* docs: update workflow and how we use two branchs for ODH and downstream

- add new doc for how workflow, label on PR, sync process
- update branch away from incubatin in github action and reference

Signed-off-by: Wen Zhou <[email protected]>

* Update docs/sync_code.md

Co-authored-by: Gerard Ryan <[email protected]>

* revert: branch related test config

Signed-off-by: Wen Zhou <[email protected]>

* fix: typo

Signed-off-by: Wen Zhou <[email protected]>

---------

Signed-off-by: Wen Zhou <[email protected]>
Co-authored-by: Gerard Ryan <[email protected]>
(cherry picked from commit da75d42)

* update: platform team (#1583)

Signed-off-by: Wen Zhou <[email protected]>
(cherry picked from commit 46d8ba2)

* Remove Sara4994 from OWNER_ALIASES (#1598)

(cherry picked from commit bf8a6e2)

* github: add branch into GHA for tests (#1593)

Signed-off-by: Wen Zhou <[email protected]>
(cherry picked from commit f4c932b)

* apis: DSCInitialization: annotate ApplicationsNamespace with omitempty (#1585)

Jira: https://issues.redhat.com/browse/RHOAIENG-18931

Api sets default value to opendatahub, but without "omitempty" in
case of operator automatically creates
DSCI (upgrade.go:CreateDefaultDSCI), the resulting object contains
applicationsNamespace: "" and it's not defaulted by the api server
causing then problems like

```
Namespace "" is invalid: metadata.name: Required value: name or generateName is required
```

The problem was triggered by removing default value for command line
switch in the cleanup.

Fixes: b0a0f87 ("update: clean up old code before refactor (#1494)")

Signed-off-by: Yauheni Kaliuta <[email protected]>
(cherry picked from commit 768539c)

* regen bundle (#1602)

(cherry picked from commit 2384ada)

* test: prolong e2e in rhoai for 50mins

Signed-off-by: Wen Zhou <[email protected]>

* fix:default monitoring namespace

Signed-off-by: Wen Zhou <[email protected]>

---------

Signed-off-by: Wen Zhou <[email protected]>
Co-authored-by: Ajay Jaganathan <[email protected]>
Co-authored-by: Yauheni Kaliuta <[email protected]>
Co-authored-by: Luca Burgazzoli <[email protected]>
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.

2 participants