[DO NOT MERGE] - testing a possible bug#4808
[DO NOT MERGE] - testing a possible bug#4808kunalmemane wants to merge 3 commits intoopenshift:mainfrom
Conversation
|
/hold |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: kunalmemane 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 |
WalkthroughAdded a top-level DO NOT MERGE warning to README; changed ManifestPusher API to return a digest and updated callers/tests; modified image push flow to capture manifest digest and wait for ImageStream tag to match that digest; removed an explicit 1-minute sleep from build creation retry loop. Changes
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes ✨ Finishing Touches🧪 Generate unit tests (beta)
⚔️ Resolve merge conflicts
Comment |
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (1)
README.md (1)
5-6: Ensure proper file formatting before merge.The warning message is appropriately placed, and the
/holdstatus correctly prevents merging. However, per the diff context, the file appears to be missing a newline at the end. Standard practice is to include a trailing newline at end-of-file.Apply this diff to add a trailing newline:
-DO NOT MERGE - investigating a possible bug. +DO NOT MERGE - investigating a possible bug.Additionally, once the underlying issue is resolved, remember to remove this temporary warning message and the preceding blank line before merging.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
Cache: Disabled due to data retention organization setting
Knowledge base: Disabled due to Reviews -> Disable Knowledge Base setting
📒 Files selected for processing (1)
README.md(1 hunks)
There was a problem hiding this comment.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
Cache: Disabled due to data retention organization setting
Knowledge base: Disabled due to Reviews -> Disable Knowledge Base setting
📒 Files selected for processing (1)
pkg/steps/source.go(1 hunks)
|
/uncc |
|
/retest |
1 similar comment
|
/retest |
1c94115 to
9d620cb
Compare
|
PR needs rebase. DetailsInstructions 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. |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
pkg/steps/source.go (1)
523-527: Consider resilience to transient API errors in the polling loop.If
buildClient.Get()fails with a transient error (network blip, API server restart), the current code returnsfalse, errwhich terminates the backoff immediately and fails the build. For improved reliability, consider returningfalse, nilfor transient/retriable errors to allow the backoff to continue.♻️ Suggested improvement
if err := wait.ExponentialBackoff(wait.Backoff{Duration: 10 * time.Second, Factor: 1.5, Steps: 10}, func() (bool, error) { is := &imagev1.ImageStream{} if err := buildClient.Get(ctx, ctrlruntimeclient.ObjectKey{Namespace: ns, Name: isName}, is); err != nil { - return false, err + if kerrors.IsNotFound(err) { + return false, err // ImageStream doesn't exist - permanent failure + } + logrus.WithError(err).Warnf("Transient error fetching imagestream %s/%s, retrying", ns, isName) + return false, nil // Retry on transient errors }🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@pkg/steps/source.go` around lines 523 - 527, The polling lambda passed to wait.ExponentialBackoff currently returns (false, err) on any buildClient.Get failure which stops retries; change the handler in the wait.ExponentialBackoff call so that when buildClient.Get(ctx, ctrlruntimeclient.ObjectKey{Namespace: ns, Name: isName}, is) returns a transient/retriable error (e.g., apierrors.IsTimeout(err), apierrors.IsServerTimeout(err), apierrors.IsTooManyRequests(err), or net.Error with Temporary() == true) you return (false, nil) to continue the backoff, but for non-retriable errors return (false, err); update imports to include k8s.io/apimachinery/pkg/api/errors and handle net.Error checks accordingly while keeping the rest of the logic around imagev1.ImageStream intact.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@pkg/steps/source.go`:
- Around line 523-527: The polling lambda passed to wait.ExponentialBackoff
currently returns (false, err) on any buildClient.Get failure which stops
retries; change the handler in the wait.ExponentialBackoff call so that when
buildClient.Get(ctx, ctrlruntimeclient.ObjectKey{Namespace: ns, Name: isName},
is) returns a transient/retriable error (e.g., apierrors.IsTimeout(err),
apierrors.IsServerTimeout(err), apierrors.IsTooManyRequests(err), or net.Error
with Temporary() == true) you return (false, nil) to continue the backoff, but
for non-retriable errors return (false, err); update imports to include
k8s.io/apimachinery/pkg/api/errors and handle net.Error checks accordingly while
keeping the rest of the logic around imagev1.ImageStream intact.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 935bb2bf-3381-4580-b4b9-2750ac174897
📒 Files selected for processing (4)
pkg/controller/multiarchbuildconfig/multiarchbuildconfig.gopkg/controller/multiarchbuildconfig/multiarchbuildconfig_test.gopkg/manifestpusher/manifestpusher.gopkg/steps/source.go
|
@kunalmemane: The following tests failed, say
Full PR test history. Your PR dashboard. DetailsInstructions 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. |
DO NOT MERGE - testing a possible bug