Skip to content

chore: Small Makefile fixes - #928

Merged
openshift-merge-bot[bot] merged 1 commit into
opendatahub-io:incubationfrom
israel-hdez:makefile-mini-fixes
Mar 22, 2024
Merged

openshift-merge-bot[bot] merged 1 commit into
opendatahub-io:incubationfrom
israel-hdez:makefile-mini-fixes

Conversation

@israel-hdez

Copy link
Copy Markdown
Contributor

Description

  • Go back to using IMG ?= rather than forcing the value with IMG =. This makes it easier to override the value of IMG for development, and also aligns it to how BUNDLE_IMG is assigned.
  • Add prepare as dependency of the undeploy target. This is just for convenience, although when looking at the other targets, prepare may simply be a missing dependency in undeploy.

How Has This Been Tested?

Using the Makefile :-)

Merge criteria:

  • The commits are squashed in a cohesive manner and have meaningful messages.
  • 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 HumairAK and harshad16 March 20, 2024 16:43
* Go back to using `IMG ?=` rather than forcing the value with `IMG =`. This makes it easier to override the value of `IMG` for development, and it also aligns it to how `BUNDLE_IMG` is assigned.
* Add `prepare` as dependency of the `undeploy` target. This is just for convenience, although when looking at the other targets, `prepare` may simply be a missing dependency in `undeploy`.

Signed-off-by: Edgar Hernández <23639005+israel-hdez@users.noreply.github.com>
@israel-hdez
israel-hdez force-pushed the makefile-mini-fixes branch from f4f0458 to b1e1979 Compare March 20, 2024 16:44
@ykaliuta

ykaliuta commented Mar 20, 2024 •

Copy link
Copy Markdown
Contributor
  • Go back to using IMG ?= rather than forcing the value with IMG =.

Doubtful. It's not forcing, it's assigning. Forcing is with override keyword.

This makes it easier to override the value of IMG for development,

What difficulties do you have?

The only scenario I can imagine is setting environment variable and running make without -e switch. And IMG is pretty bad name for environment variable. All other scenarios (command line, local.mk and even make -e which wrong usage is all around different documentations) work fine.

and also aligns it to how BUNDLE_IMG is assigned.

Align it :). I frankly cannot imagine any usecase where most of our ?= would be useful (well, some should be moved before the -include local.mk to say any instead of most).

I should remind you, that command line overriding has preference over most of assignments https://www.gnu.org/software/make/manual/html_node/Values.html

  • Add prepare as dependency of the undeploy target. This is just for convenience, although when looking at the other targets, prepare may simply be a missing dependency in undeploy.

Hmm, debatable. I would prefer for undeploy to have the same configuration I had for deploy. But would listen to others. From the description it seems that you did not have any practical problem, right?

@israel-hdez

Copy link
Copy Markdown
Contributor Author

What difficulties do you have? The only scenario I can imagine is setting environment variable and running make without -e switch.

The scenario you mention is what I want.

Because of the number of repos I use, I like using direnv to remember less. I do can use the -e switch, but it would be something to remember (on the other repos I use, I don't need any flags). I think I still can use IMAGE_TAG_BASE and IMG_TAG as a proxies, but I thought it was a regression because in the past it was possible to simply set the IMG envvar, similarly to BUNDLE_IMG and CATALOG_IMG.

And IMG is pretty bad name for environment variable.

I would agree.

Hmm, debatable. I would prefer for undeploy to have the same configuration I had for deploy. But would listen to others.

I think this makes sense, although there is an implied workflow: to deploy (which would also prepare), then undeploy. Nothing wrong.

Use-case: if you share a cluster with another dev, they won't have the generated artifacts and undeploy won't work correctly, until you first do prepare. So, I think I'd appreciate a note in the README, as there are no pointers that undeploy is broken if you hadn't ran deploy or prepare previously.

From the description it seems that you did not have any practical problem, right?

Not a problem, as I could simply do make prepare undeploy.

It is just that since manifests get modified as part of development (nothing wrong with this), that I often do hard-resets for clean-up. Then trying to undeploy in an existent cluster would not work until I do prepare. So, as I said in my main comment, this is more for convenience.

I guess this PR is more on the enhancements side, than on the fixes side. I anyway have workarounds, so feel free to drop the PR if you think there is nothing to enhance :-)

@israel-hdez

Copy link
Copy Markdown
Contributor Author

Hmm, debatable. I would prefer for undeploy to have the same configuration I had for deploy.

BTW, I find weird that for undeploy you would need to run prepare manually, while uninstall has prepare as dependency.

@ykaliuta

Copy link
Copy Markdown
Contributor

What difficulties do you have? The only scenario I can imagine is setting environment variable and running make without -e switch.

The scenario you mention is what I want.

Because of the number of repos I use, I like using direnv to remember less. I do can use the -e switch, but it would be something to remember (on the other repos I use, I don't need any flags). I think I still can use IMAGE_TAG_BASE and IMG_TAG as a proxies, but I thought it was a regression because in the past it was possible to simply set the IMG envvar, similarly to BUNDLE_IMG and CATALOG_IMG.

Ah, great! So, I will rephrase the commit message for myself to something like:

Makefile: revert IMG assigned type to prefer environment

This revert the change introduced by
a799964cf6df ("Makefile: generate default image name based on current user (#730)")
since the discarded scenario explicitly described there actually is in use, so it introduced a regression.  

Regression definitely was not an intention.

And IMG is pretty bad name for environment variable.

I would agree.

Hmm, debatable. I would prefer for undeploy to have the same configuration I had for deploy. But would listen to others.

I think this makes sense, although there is an implied workflow: to deploy (which would also prepare), then undeploy. Nothing wrong.

Use-case: if you share a cluster with another dev, they won't have the generated artifacts and undeploy won't work correctly, until you first do prepare.

Sounds as other side of the coin. But the other party better know the variables you called prepare with to generate same configuration, doesn't? The same was valid for my local regeneration.

No, I do not have a strong opinion what is better. Both more or less work for me.

So, I think I'd appreciate a note in the README, as there are no pointers that undeploy is broken if you hadn't ran deploy or prepare previously.

From the description it seems that you did not have any practical problem, right?

Not a problem, as I could simply do make prepare undeploy.

It is just that since manifests get modified as part of development (nothing wrong with this), that I often do hard-resets for clean-up. Then trying to undeploy in an existent cluster would not work until I do prepare. So, as I said in my main comment, this is more for convenience.

I guess this PR is more on the enhancements side, than on the fixes side. I anyway have workarounds, so feel free to drop the PR if you think there is nothing to enhance :-)

It has 2 pretty different changes actually.

@ykaliuta

Copy link
Copy Markdown
Contributor

Hmm, debatable. I would prefer for undeploy to have the same configuration I had for deploy.

BTW, I find weird that for undeploy you would need to run prepare manually, while uninstall has prepare as dependency.

Agree. But it was done originally for some reason (prepare just replaced the existing generation parts).

@zdtsw
zdtsw requested review from VaishnaviHire and ykaliuta and removed request for HumairAK and harshad16 March 21, 2024 15:31
@zdtsw zdtsw added the incubating Added to issues that are currently incubating in ODH label Mar 21, 2024
@openshift-ci

openshift-ci Bot commented Mar 21, 2024

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ykaliuta

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

@israel-hdez

Copy link
Copy Markdown
Contributor Author

Sounds as other side of the coin.

Definitely! Although, it was just an example use-case. Emphasis on just an example, no need to cover it :-)

But the other party better know the variables you called prepare with to generate same configuration, doesn't?

Yup... Although, right now, I think it doesn't matter for undeploy isn't it?. But I do understand the need of syncing on the values as it could be relevant for other uses.


And thanks for moving this forward :-)

@openshift-merge-bot
openshift-merge-bot Bot merged commit 529ee84 into opendatahub-io:incubation Mar 22, 2024
@israel-hdez
israel-hdez deleted the makefile-mini-fixes branch March 22, 2024 00:24
zdtsw referenced this pull request in zdtsw-forking/rhods-operator Mar 25, 2024
* Go back to using `IMG ?=` rather than forcing the value with `IMG =`. This makes it easier to override the value of `IMG` for development, and it also aligns it to how `BUNDLE_IMG` is assigned.
* Add `prepare` as dependency of the `undeploy` target. This is just for convenience, although when looking at the other targets, `prepare` may simply be a missing dependency in `undeploy`.

Signed-off-by: Edgar Hernández <23639005+israel-hdez@users.noreply.github.com>
zdtsw referenced this pull request in red-hat-data-services/rhods-operator Mar 25, 2024
* feat(gh-action): ensures generated files are up-to-date in PR (#917)

* RHOAIENG-4433 Update readme/config files

* rework gh action based on comments

* feat(gh-action): ensures generated files are up-to-date in PR

* fix review comments

* reuse cmd

* fix(gen): upgrades to crd-ref-doc generator to latest version (#920)

fix(gen): upgrades to crd-ref-doc to latest version

- add "diff" in the failed GH action to help understand problem
- update: api doc

---------

Signed-off-by: Wen Zhou <wenzhou@redhat.com>

* fix: Enable annotations using golangci-lint(gh action) (#919)

* fix: Enable annotations using golangci-lint(gh action)

* update versions

* fix(make): cleans linter cache on clean (#922)

When juggling between branches golangci linter cache can have leftovers from the code that does not exist in the other branch.

This can lead to errors while running `make lint` as the linter tries to check cached sources first.

This change cleans the linter cache as part of the clean target to ensure consistency.

Here's an example of an invalid cache state leading to error:

```
WARN [runner] Can't process result by autogenerated_exclude processor: can't filter issue result.Issue{FromLinter:"ireturn", Text:"Entry returns interface (github.com/opendatahub-io/opendatahub-operator/v2/pkg/feature.DataProvider)", Severity:"", SourceLines:[]string(nil), Replacement:(*result.Replacement)(nil), Pkg:(*packages.Package)(0xc001343e00), LineRange:(*result.Range)(nil), Pos:token.Position{Filename:"/home/bartek/code/rhods/opendatahub-operator/incubation/pkg/feature/data_provider.go", Offset:1382, Line:45, Column:1}, HunkPos:0, ExpectNoLint:false, ExpectedNoLintLinter:""}: failed to get doc of file
```

* chore(Github): update issue template re-direct user for jira (#838)

* chore(Github): update issue template re-direct user for jira

Signed-off-by: Wen Zhou <wenzhou@redhat.com>

* Update .github/ISSUE_TEMPLATE/feature_request.md

Co-authored-by: Ajay Jaganathan <36824134+AjayJagan@users.noreply.github.com>

* Update .github/ISSUE_TEMPLATE/bug_report.md

Co-authored-by: Ajay Jaganathan <36824134+AjayJagan@users.noreply.github.com>

---------

Signed-off-by: Wen Zhou <wenzhou@redhat.com>
Co-authored-by: Ajay Jaganathan <36824134+AjayJagan@users.noreply.github.com>

* chore: Small Makefile fixes (#928)

* Go back to using `IMG ?=` rather than forcing the value with `IMG =`. This makes it easier to override the value of `IMG` for development, and it also aligns it to how `BUNDLE_IMG` is assigned.
* Add `prepare` as dependency of the `undeploy` target. This is just for convenience, although when looking at the other targets, `prepare` may simply be a missing dependency in `undeploy`.

Signed-off-by: Edgar Hernández <23639005+israel-hdez@users.noreply.github.com>

* fix(test): pin version not latest which just introduced to use go 1.22 (#934)

* fix(test): pin version not latest which just introduced to use go 1.22

Signed-off-by: Wen Zhou <wenzhou@redhat.com>

* update: code review

Signed-off-by: Wen Zhou <wenzhou@redhat.com>

---------

Signed-off-by: Wen Zhou <wenzhou@redhat.com>

---------

Signed-off-by: Wen Zhou <wenzhou@redhat.com>
Signed-off-by: Edgar Hernández <23639005+israel-hdez@users.noreply.github.com>
Co-authored-by: Ajay Jaganathan <36824134+AjayJagan@users.noreply.github.com>
Co-authored-by: Bartosz Majsak <bartosz.majsak@gmail.com>
Co-authored-by: Edgar Hernández <ehernand@redhat.com>
@bartoszmajsak bartoszmajsak mentioned this pull request Mar 25, 2024
robotmaxtron pushed a commit to robotmaxtron/opendatahub-operator that referenced this pull request Sep 17, 2025
…endatahub-io#231)

* feat(gh-action): ensures generated files are up-to-date in PR (opendatahub-io#917)

* RHOAIENG-4433 Update readme/config files

* rework gh action based on comments

* feat(gh-action): ensures generated files are up-to-date in PR

* fix review comments

* reuse cmd

* fix(gen): upgrades to crd-ref-doc generator to latest version (opendatahub-io#920)

fix(gen): upgrades to crd-ref-doc to latest version

- add "diff" in the failed GH action to help understand problem
- update: api doc

---------

Signed-off-by: Wen Zhou <wenzhou@redhat.com>

* fix: Enable annotations using golangci-lint(gh action) (opendatahub-io#919)

* fix: Enable annotations using golangci-lint(gh action)

* update versions

* fix(make): cleans linter cache on clean (opendatahub-io#922)

When juggling between branches golangci linter cache can have leftovers from the code that does not exist in the other branch.

This can lead to errors while running `make lint` as the linter tries to check cached sources first.

This change cleans the linter cache as part of the clean target to ensure consistency.

Here's an example of an invalid cache state leading to error:

```
WARN [runner] Can't process result by autogenerated_exclude processor: can't filter issue result.Issue{FromLinter:"ireturn", Text:"Entry returns interface (github.com/opendatahub-io/opendatahub-operator/v2/pkg/feature.DataProvider)", Severity:"", SourceLines:[]string(nil), Replacement:(*result.Replacement)(nil), Pkg:(*packages.Package)(0xc001343e00), LineRange:(*result.Range)(nil), Pos:token.Position{Filename:"/home/bartek/code/rhods/opendatahub-operator/incubation/pkg/feature/data_provider.go", Offset:1382, Line:45, Column:1}, HunkPos:0, ExpectNoLint:false, ExpectedNoLintLinter:""}: failed to get doc of file
```

* chore(Github): update issue template re-direct user for jira (opendatahub-io#838)

* chore(Github): update issue template re-direct user for jira

Signed-off-by: Wen Zhou <wenzhou@redhat.com>

* Update .github/ISSUE_TEMPLATE/feature_request.md

Co-authored-by: Ajay Jaganathan <36824134+AjayJagan@users.noreply.github.com>

* Update .github/ISSUE_TEMPLATE/bug_report.md

Co-authored-by: Ajay Jaganathan <36824134+AjayJagan@users.noreply.github.com>

---------

Signed-off-by: Wen Zhou <wenzhou@redhat.com>
Co-authored-by: Ajay Jaganathan <36824134+AjayJagan@users.noreply.github.com>

* chore: Small Makefile fixes (opendatahub-io#928)

* Go back to using `IMG ?=` rather than forcing the value with `IMG =`. This makes it easier to override the value of `IMG` for development, and it also aligns it to how `BUNDLE_IMG` is assigned.
* Add `prepare` as dependency of the `undeploy` target. This is just for convenience, although when looking at the other targets, `prepare` may simply be a missing dependency in `undeploy`.

Signed-off-by: Edgar Hernández <23639005+israel-hdez@users.noreply.github.com>

* fix(test): pin version not latest which just introduced to use go 1.22 (opendatahub-io#934)

* fix(test): pin version not latest which just introduced to use go 1.22

Signed-off-by: Wen Zhou <wenzhou@redhat.com>

* update: code review

Signed-off-by: Wen Zhou <wenzhou@redhat.com>

---------

Signed-off-by: Wen Zhou <wenzhou@redhat.com>

---------

Signed-off-by: Wen Zhou <wenzhou@redhat.com>
Signed-off-by: Edgar Hernández <23639005+israel-hdez@users.noreply.github.com>
Co-authored-by: Ajay Jaganathan <36824134+AjayJagan@users.noreply.github.com>
Co-authored-by: Bartosz Majsak <bartosz.majsak@gmail.com>
Co-authored-by: Edgar Hernández <ehernand@redhat.com>
kpunwatk added a commit to kpunwatk/opendatahub-operator that referenced this pull request Sep 16, 2026
… fix

- ODH main@feb5b94 (opendatahub-io opendatahub-io#204)
- RHOAI rhoai-3.6-ea.2@75a4af5 (opendatahub-io#1956 / opendatahub-io#928 on rhoai)
- Module-operator image digest d2df18f5 (Konflux build for feb5b94)

Co-authored-by: Cursor <cursoragent@cursor.com>
kpunwatk added a commit to kpunwatk/opendatahub-operator that referenced this pull request Sep 16, 2026
… fix

- ODH main@feb5b94 (opendatahub-io opendatahub-io#204)
- RHOAI rhoai-3.6-ea.2@75a4af5 (opendatahub-io#1956 / opendatahub-io#928 on rhoai)
- Module-operator image digest d2df18f5 (Konflux build for feb5b94)
openshift-merge-bot Bot pushed a commit that referenced this pull request Sep 22, 2026
* feat: migrate TrustyAI from component to module

Rewrites the TrustyAI module handler against the current ModuleHandler
interface (PopulatePlatformModule/IsEnabled/BuildModuleCR signatures and
ModuleConfig fields changed significantly since the previous attempt in
PR #3643, which predates the DAG-orchestration and common
action-framework refactors). Follows sparkoperator's handler as the
template, since both are out-of-tree kustomize-based modules with their
own dedicated operator image.

- Add internal/controller/modules/trustyai/handler.go + handler_test.go
- Add PlatformModules.TrustyAI field (DSC mode only for now; Platform/xKS
  mode deferred pending API updates, matching the original migration's
  scope decision)
- Register TrustyAI in existingModules/moduleRunlevels (RL(32), after
  KServe's RL(31), since TrustyAI depends on KServe CRDs)
- Remove TrustyAI from existingComponents/componentRunlevels and delete
  the legacy in-tree component controller and its monitoring resources
- CRName uses componentApi.TrustyAIInstanceName ("default-trustyai"),
  now aligned with the trustyai-operator-module CRD's own singleton
  validation (see companion fix in trustyai-service-operator)

* fix(trustyai): use current image var name, add RHOAI build-config exception

RELATED_IMAGE_ODH_TRUSTYAI_SERVICE_IMAGE was renamed to
RELATED_IMAGE_ODH_TRUSTYAI_SERVICE_PY_IMAGE (#4011) before this
migration branch was rebased; the RelatedImages list still had the
stale name. Also adds an RHOAI-Build-Config exception for the new
RELATED_IMAGE_ODH_TRUSTYAI_MODULE_OPERATOR_IMAGE, matching the
trainer/sparkoperator module operator images (RHOAIENG-80231,
delivering in RHOAI 3.6 EA2). Confirmed via `make validate-related-images`
locally: 2 errors -> 0.

* docs: regenerate api-overview for TrustyAI module field

make generate manifests-all api-docs picked up the new
PlatformModules.TrustyAI field added in the previous commit.

* fix(trustyai): register manifests-config entry, fix ManifestDir/ContextDir mismatch

Two bugs causing "must build at directory: not a valid directory:
evalsymlink failure on '/opt/manifests/trustyai-module-operator/default'"
at deploy time:

- manifests-config.yaml had no entry for the module at all, so
  `make get-manifests` never fetched it. Added trustyai-module-operator,
  reusing the exact same repo/ref pins as the existing trustyai
  (component) entry, since both mirrors already have
  trustyai-operator-module/ at those SHAs -- confirmed via the GitHub
  API before adding.

- handler.go's ManifestDir was missing ContextDir: "default". Every
  other kustomize-based module (e.g. trainer) points sourcePath at the
  whole `config` directory and lets ContextDir select the `default`
  overlay at render time; PlatformModules.String() joins Path+ContextDir,
  so without it the platform looked for manifests directly under
  ManifestDir instead of ManifestDir/default -- the exact directory
  missing in the reported error.

Verified end to end: `make get-manifests` now fetches
trustyai-operator-module/config/{crd,rbac,manager,default} correctly,
and `kustomize build opt/manifests/trustyai-module-operator/default`
renders successfully.

* fix(trustyai): align RBAC markers and e2e tests with module architecture

RBAC markers for the trustyais CR belonged in internal/controller/modules
(module-managed), not datasciencecluster; moved them accordingly with no
change to generated output. Updated dag_ordering_test.go and
resilience_test.go to treat TrustyAI as a module like the other
already-migrated components (Trainer, Workbenches, Dashboard, AIHub),
matching gaps found by comparing against PR #4000.

* fix(trustyai): reuse existing trustyai manifests-config entry instead of a duplicate

The old trustyai entry (sourcePath: config) pointed at the removed in-tree
component manifests and had no remaining code consumer, so keeping a
separate trustyai-module-operator entry alongside it was redundant.
Repointed the existing entry's sourcePath at the module manifests and
dropped the duplicate.

* fix(trustyai): explicitly map permit fields instead of blind struct conversion

BuildModuleCR converted the whole DSC-facing TrustyAICommonSpec into the
module CR's spec via runtime.DefaultUnstructuredConverter. The DSC-facing
API declares permitCodeExecution/permitOnline as a string enum
("allow"/"deny") while the module CRD declares them as bool, so the
wholesale conversion projected a string into a field the module's typed
client expects to be bool, breaking its watch/list reflector on
existing CRs. Map the two permit fields explicitly with the
string-to-bool conversion instead.

Reported-by: Steven Tobin

* fix(trustyai): bump rhoai manifest pin to pick up CR-naming fix

The rhoai-3.6-ea.2 pin predated commit 5ed6709 (fix(module): align
TrustyAI singleton CR name with sibling modules), so the deployed
module CRD still required metadata.name == 'default' while
BuildModuleCR creates 'default-trustyai', causing every apply to be
rejected by the CRD's own CEL validation. Bumped to the branch's
current tip, which already includes the fix (verified via
GitHub compare API and by re-downloading manifests locally).

The odh pin (opendatahub-io/trustyai-service-operator@incubation)
still needs the same fix; that branch hasn't been re-synced from
main since before the fix landed, so it's left unchanged pending
that sync.

Reported-by: Steven Tobin

* fix(trustyai): switch odh manifest pin from incubation to main

The incubation branch (opendatahub-io/trustyai-service-operator) is
synced from that repo's own main via a separate, infrequent process
(last sync 2026-08-05), and hasn't picked up the CR-naming CEL fix
(commit 5ed6709, landed 2026-09-01) that the rhoai pin already has.
Waiting on that sync is unbounded, and this file already has
precedent for pinning odh directly at main (see the modelregistry
entry), so switch to main@<sha> instead. Verified the pinned commit
contains the fix by fetching the CRD directly and confirming the
CEL rule reads 'default-trustyai', and by re-running
`make get-manifests` + `kustomize build` locally.

Reported-by: Steven Tobin

* fix(trustyai): bump odh/rhoai manifest pins to pick up module operator fixes

trustyai-service-operator#908 (RBAC watch verbs, /opt write permission,
platform version handshake) has now propagated through both downstream
sync chains:

- odh: opendatahub-io/trustyai-service-operator#194 merged
- rhoai: red-hat-data-services/trustyai-service-operator#1932 (into
  main) and #1934 (main into rhoai-3.6-ea.2) both merged

Bumped both pins to the post-merge tips and verified locally: the
"watch" verb is present on deployments/rolebindings in both ODH and
RHOAI mode, kustomize build succeeds, and go build/test pass.

Reported-by: Steven Tobin

* fix(trustyai): remove redundant CRD-generating types now owned by the module

TrustyAI's Go type still had +kubebuilder:object:root=true on TrustyAI/
TrustyAIList, plus the PlatformObject interface implementation and
scheme registration. Since the CRD is now installed by
trustyai-operator-module (from its own manifests), this caused
opendatahub-operator to generate a second, competing CRD definition
for the same GVK from a Go type that isn't kept in sync with the
module's actual schema (already missing mcpGuardrailsMode and the
default-trustyai singleton validation independently added on each
side).

Removed the top-level TrustyAI/TrustyAIList struct, scheme
registration, and PlatformObject methods, keeping only the nested
spec/status types and DSCTrustyAI/DSCTrustyAIStatus, matching the
pattern already used by sibling modules (see sparkoperator_types.go).

Updated tests/e2e/trustyai_test.go to use NewModuleTestCtx (GVK +
instance name) instead of NewComponentTestCtx (which required a typed
struct) -- this is the existing mechanism other module e2e tests
(kserve_test.go, aigateway_test.go) already use for exactly this case.

Verified via a full config/crd/bases wipe + make manifests that no
components.platform.opendatahub.io_trustyais.yaml is generated anymore.

* fix(trustyai): bump rhoai manifest pin to pick up #913 (services/prometheuses watch)

trustyai-explainability/trustyai-service-operator#913 merged and has
propagated through both red-hat-data-services sync hops (main, then
rhoai-3.6-ea.2). Bumped the rhoai ref and verified locally: services
and prometheuses RBAC rules now include watch.

The odh pin is not bumped yet -- opendatahub-io/trustyai-service-operator#195
(the pull[bot] sync PR) already has the right content but hasn't merged.

* fix(trustyai): temporarily point odh pin at canonical upstream repo

opendatahub-io/trustyai-service-operator#195 (the pull[bot] sync PR
bringing in #913's services/prometheuses watch fix) already has the
right content as its head commit, but is stuck on the OWNERS approval
gate while the approver is on PTO. Rather than wait, point the odh
pin directly at trustyai-explainability/trustyai-service-operator
(the canonical upstream #195 pulls from) at that same commit.

Verified locally: make get-manifests resolves cleanly, RBAC role.yaml
has watch on services/prometheuses, CRD CEL rule reads
'default-trustyai', kustomize build succeeds, go build/test pass.

Switch back to the opendatahub-io mirror once #195 merges.

* switch ODH manifest pin back to opendatahub-io mirror

* bump(trustyai): rhoai manifest pin to pick up rhoai PR #1943

Picks up the same fixes that were merged into the ODH upstream repo.
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>

* bump(trustyai): manifest pins for #920/#921/#925 sync

Pick up post-sync mirror SHAs: ODH main @0b428d2 (#197) and
rhoai-3.6-ea.2 @5f278d7 (#1949), including the emptyDir/clearDir fix.

Co-authored-by: Cursor <cursoragent@cursor.com>

* bump(trustyai): update module operator image digest to latest build

* sync manager image overrides and regenerate api docs

* chore: resolve image digests after trustyai manifest sync

* bump(trustyai): service operator image only; revert broad digest resolve
Update RELATED_IMAGE_ODH_TRUSTYAI_SERVICE_OPERATOR_IMAGE to fix
--metrics-cert-path crash. Reverts platform-wide resolve-image-digests
from 4e0700d; module operator stays at e5cd204a (#925).

* fix(trustyai): TrustyAI-only image pins at latest validated digests

* fix(trustyai): drop unrelated data-registry rhoai digest from PR

Keep manifests-config image pin changes TrustyAI-only; remove
MOD_ARCH_DATA_REGISTRY rhoai block not in scope for #4051.

Co-authored-by: Cursor <cursoragent@cursor.com>

* Revert "fix(trustyai): drop unrelated data-registry rhoai digest from PR"
Restore MOD_ARCH_DATA_REGISTRY rhoai mapping from upstream #4073 merge.

* test(e2e): drop TrustyAI from platform-owned CRD validation

TrustyAI is now an out-of-tree module; its CRD is installed by the
module operator when enabled, not by the platform operator at startup.

Co-authored-by: Cursor <cursoragent@cursor.com>

* chore(manifests): bump trustyai rhoai ref after #1955 sync

Pick up #926 module operator fixes on rhoai-3.6-ea.2 (RELATED_IMAGE mapping,
manifest staging, memory limits).

* chore(manifests): bump trustyai odh ref to pick up #926 fixes

Sync opendatahub-io/trustyai-service-operator main to #202 merge (9c0ffa8).

* chore(manifests): bump trustyai pins for #928 readiness fix

- ODH main@feb5b94 (opendatahub-io #204)
- RHOAI rhoai-3.6-ea.2@75a4af5 (#1956 / #928 on rhoai)
- Module-operator image digest d2df18f5 (Konflux build for feb5b94)

* chore(manifests): align TrustyAI module-operator image with build configs

- ODH: quay.io/opendatahub/odh-trustyai-module-operator@b3cef1149
- RHOAI: quay.io/rhoai/odh-trustyai-module-operator-rhel9@51384d9610
- Remove stale rhoai_exceptions entry (RHOAIENG-80231 onboarded)

Co-authored-by: Cursor <cursoragent@cursor.com>

* feat(trustyai): propagate MCP Guardrails mode

Signed-off-by: Rui Vieira <ruidevieira@googlemail.com>
(cherry picked from commit 8a76d74)

* chore(docs): regenerate api-overview after Ray/TrustyAI module migration

Drop Ray and TrustyAI from the platform-owned Resource Types index so
make api-docs matches CI (Ensure generated files are included).

Co-authored-by: Cursor <cursoragent@cursor.com>

* fix(trustyai): bump module refs to include mcpGuardrailsMode in CRD schema

ODH: main@7838ba58fffca619610c6b260c4ec87c031d0a27 (was feb5b944...)
RHOAI: rhoai-3.6-ea.2@9a3b7b9f4f936419451c833b70ba180fe03a3e61 (was 75a4af5b...)

The previous refs lacked mcpGuardrailsMode in the TrustyAI CRD schema,
causing deployment failures when trying to apply the field: "field not
declared in schema". Newer upstream commits include this field.

Fixes e2e test failure: "unable to patch components.platform.opendatahub.io/v1alpha1,
Kind=TrustyAI default-trustyai: failed to create typed patch object: .spec.mcpGuardrailsMode:
field not declared in schema"

* fix(trustyai): bump module operator image digests to latest builds

Update both ODH and RHOAI image digests to the latest trustyai-module-operator
builds that include the MCP guardrails fix:

- ODH: sha256:65cba5211000f9b13b87b2bd9f1fb052ea814e1826e53f498edd84209d877b6e
  (midstream incubation→stable sync by Rui, synced to ODH)
- RHOAI: sha256:e6a0be61ecbedf259b80fc2a63ae8ee975aa18a6a6743538554b21bab9f7bd4c

Previous digests were stale and not available in the registry, causing
e2e test deployment failures with missing CRD fields.

* test(trustyai): override ValidateOperandsOwnerReferences for modular architecture

TrustyAI is now a module operator that deploys operands with different labels.
Override the parent test implementation to use the correct TrustyAI-specific label
'app.kubernetes.io/part-of: trustyai' instead of the generic component label,
and verify operands are owned by the TrustyAI CR by kind and name.

* style(test): fix import order in trustyai_test.go

* align the trusty tests to the module architecture

* Align RHOAI TrustyAI Module operator with RHOAI manifests

* Fix Missing Components CRD Handling test

---------

Signed-off-by: Rui Vieira <ruidevieira@googlemail.com>
Co-authored-by: Claude Haiku 4.5 <noreply@anthropic.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Rui Vieira <ruidevieira@googlemail.com>
Co-authored-by: Steven Tobin <stobin@redhat.com>
Co-authored-by: Marián Macik <mmacik@redhat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved incubating Added to issues that are currently incubating in ODH lgtm

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants