feat(info_collector): add test to fetch versions for tools in cluster - #997
feat(info_collector): add test to fetch versions for tools in cluster#997silvi-t wants to merge 2 commits into
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (2)
📝 WalkthroughWalkthroughComponent image parsing now preserves untagged images with empty tags and safely handles missing Istio version attributes. Information collection excludes pipeline-tool images and records selected tools images plus operator subscription versions as Report Portal properties. ChangesTool metadata property reporting
Estimated code review effort: 2 (Simple) | ~10 minutes Sequence Diagram(s)sequenceDiagram
participant test_tools_properties
participant ReportPortalMetadataCollector
participant record_testsuite_property
test_tools_properties->>ReportPortalMetadataCollector: collect tools component images
ReportPortalMetadataCollector-->>test_tools_properties: image name, tag, full image
test_tools_properties->>record_testsuite_property: record unique tool properties
test_tools_properties->>record_testsuite_property: record unique operator version properties
Possibly related PRs
Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
azgabur
left a comment
There was a problem hiding this comment.
Its not yet the case, but when releasing we will want to have all versions pinned when deploying kuadrant
Kuadrant/helm-charts-olm#80
Kuadrant/helm-charts-olm#88
So a simple collecting without resolving should be sufficient.
Keycloak version should be checked from CSV field "installedCSV" not from catalog.redhat.com as it is bit disconnected from what is on cluster.
Signed-off-by: Silvia Tarabova <starabov@redhat.com>
40ca7f8 to
4f374b4
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@testsuite/component_metadata.py`:
- Around line 140-142: Update component metadata collection in
testsuite/component_metadata.py at lines 140-142 and 180-182: add inner
AttributeError handling around sub.model.status.installedCSV and
istio[0].model.spec.version, respectively. Skip the affected subscription when
status is unavailable, and preserve the Istio fallback logic so istiod pod
labels and images are still collected when spec.version is missing.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 52b3e33a-b81a-45d1-9b1b-74f2a6b2231f
📒 Files selected for processing (2)
testsuite/component_metadata.pytestsuite/tests/info_collector.py
@azgabur agreed — since tools can be now deployed with pinned version tags (helm-charts-olm#80, helm-charts-olm#88), I've removed the
|
4f374b4 to
4b90907
Compare
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Silvia Tarabova <starabov@redhat.com>
4b90907 to
26479c1
Compare
Important
This PR modifies shared/core testsuite code that could potentially affect multiple test areas. 2 reviewers should review this PR to ensure adequate coverage.
Description
test_tools_propertiescollector test that resolves actual deployed versions of tools (e.g.keycloak:latest→keycloak:26.4.11) by querying container registry APIscontainer_image_versions.pymodule withContainerRegistryResolverthat matches image digests from pod status against semver tags in quay.io, ghcr.io, and Red Hat Catalogstatus.containerStatuses[].imageIDvia newget_pod_images()methodChanges
New Features
testsuite/container_image_versions.py: New module withContainerRegistryResolverclass that resolves container image digests to semver version tags via registry APIs (quay.io, ghcr.io, Red Hat Catalog)testsuite/tests/info_collector.py: Newtest_tools_propertiestest that collects images from thetoolsnamespace, resolves:latesttags to actual versions, and records them as Report Portal launch attributestestsuite/tests/info_collector.py: New_resolve_tools_versions()helper that skips resolution for images already tagged with semver and falls back gracefully on failureModifications
testsuite/component_metadata.py: Refactoredget_component_images()intoget_pod_images()which additionally extracts image digests from podstatus.containerStatuses;get_component_images()now wrapsget_pod_images()for backwards compatibilitytestsuite/tests/info_collector.py: Filteredtestsuite-pipelines-toolsfromtest_kuadrant_propertiesoutput as it is a CI tool, not a Kuadrant componentVerification steps
junit-00-collect.xmlfor resolved tools versionsSummary by CodeRabbit
Bug Fixes
Tests