[release-v1.22.x] SRVKP-12189: Remove TektonHub integration from pipelines task catalog and quick search#1137
Conversation
|
@openshift-cherrypick-robot: Ignoring requests to cherry-pick non-bug issues: SRVKP-12189 DetailsIn 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 openshift-eng/jira-lifecycle-plugin repository. |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: openshift-cherrypick-robot The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
Code Review by Qodo
1. ArtifactHub install URL missing
|
| if (!url || typeof url !== 'string') { | ||
| return Promise.reject( | ||
| new Error('ArtifactHub task content URL is missing or invalid'), | ||
| ); | ||
| } |
There was a problem hiding this comment.
1. Artifacthub install url missing 🐞 Bug ≡ Correctness
ArtifactHub create/update now hard-fails when the task content URL is missing, but the ArtifactHub catalog provider still calls create/update using selectedItem.attributes.selectedVersionContentUrl which is not populated on that path, so installs/updates can fail at runtime.
Agent Prompt
### Issue description
`createArtifactHubTask` / `updateArtifactHubTask` now reject/throw when `url` is missing, but the ArtifactHub catalog item provider’s CTA callback still passes `selectedItem.attributes.selectedVersionContentUrl` (often unset), causing install/update to fail.
### Issue Context
The quick-search details panel populates `selectedVersionContentUrl` via `getArtifactHubTaskDetails`, but the catalog provider CTA callback does not.
### Fix Focus Areas
- src/components/catalog/providers/useArtifactHubTasksProvider.tsx[57-104]
- src/components/catalog/apis/artifactHub.ts[101-164]
### Expected fix
In the CTA callback in `normalizeArtifactHubTasks`, compute a valid `selectedVersionUrl` before calling `createArtifactHubTask`/`updateArtifactHubTask`:
- Prefer `selectedItem.attributes.selectedVersionContentUrl` when present and matches the selected version.
- Otherwise call `getArtifactHubTaskDetails(selectedItem, selectedVersion, isDevConsoleProxyAvailable)` and use `content_url`.
- If URL still missing, fail fast and surface an actionable error (and avoid resolving the pipeline-builder callback before the task import/update is actually started/validated).
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
This is an automated cherry-pick of #1095
/assign anwesha-palit-redhat