Skip to content

NO-JIRA: Fix iterating over stream.Status.Tags#2307

Open
vincentdephily wants to merge 1 commit into
openshift:mainfrom
vincentdephily:vdp-iter-stream-status-tags
Open

NO-JIRA: Fix iterating over stream.Status.Tags#2307
vincentdephily wants to merge 1 commit into
openshift:mainfrom
vincentdephily:vdp-iter-stream-status-tags

Conversation

@vincentdephily

@vincentdephily vincentdephily commented Jul 9, 2026

Copy link
Copy Markdown

Iteration is over an []T, not a map[string]T, tag string is in T.Tag.

Only affects log output. Mistake was AFAICT here from the start, but only showed up a typecheck error with go 1.26.

Summary by CodeRabbit

  • Bug Fixes
    • Improved image stream graph handling so image tag history is processed more reliably.
    • Logging now reports the correct tag and image reference when an image cannot be found, making issues easier to diagnose.

It's an `[]T`, not a `map[string]T`, tag string is in `T.Tag`. Only affects log output.
Mistake was AFAICT here from the start, but only showed up a typecheck error with go 1.26.
@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Jul 9, 2026
@openshift-ci-robot

Copy link
Copy Markdown

@vincentdephily: This pull request explicitly references no jira issue.

Details

In response to this:

Iteration is over an []T, not a map[string]T, tag string is in T.Tag.

Only affects log output. Mistake was AFAICT here from the start, but only showed up a typecheck error with go 1.26.

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.

@coderabbitai

coderabbitai Bot commented Jul 9, 2026

Copy link
Copy Markdown

Caution

Review failed

An error occurred during the review process. Please try again later.

Walkthrough

The addImageStreamsToGraph function in pkg/cli/admin/top/graph.go was updated to iterate tag histories directly rather than via key-value pairs, and to use ranged index/item variables in the inner loop, adjusting the missing-image log message accordingly.

Changes

Tag History Iteration Update

Layer / File(s) Summary
Loop variable and log message update
pkg/cli/admin/top/graph.go
Outer loop now ranges over histories directly instead of (tag, history) pairs; inner loop ranges over history.Items as (i, image) instead of indexing; the "Unable to find image" log now uses history.Tag and the ranged item's DockerImageReference.

Estimated code review effort: 1 (Trivial) | ~3 minutes

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Warning

Tools execution failed with the following error:

Failed to run tools: 13 INTERNAL: Received RST_STREAM with code 2 (Internal server error)


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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@openshift-ci

openshift-ci Bot commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

@vincentdephily: all tests passed!

Full PR test history. Your PR dashboard.

Details

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 kubernetes-sigs/prow repository. I understand the commands that are listed here.

@tchap

tchap commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

/lgtm

We will need to verify this manually, I guess.

@openshift-ci openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label Jul 10, 2026
@openshift-ci

openshift-ci Bot commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: tchap, vincentdephily
Once this PR has been reviewed and has the lgtm label, please assign ardaguclu for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. lgtm Indicates that a PR is ready to be merged.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants