Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@QiWang19
Copy link
Member

@QiWang19 QiWang19 commented Apr 6, 2021

Fix Bug 1942608, during the call of ListImages, do not list the image if the there's no manifest exist.

Signed-off-by: Qi Wang [email protected]

What type of PR is this?

/kind bug

What this PR does / why we need it:

Which issue(s) this PR fixes:

https://bugzilla.redhat.com/show_bug.cgi?id=1942608

Special notes for your reviewer:

Does this PR introduce a user-facing change?

None

@QiWang19 QiWang19 requested review from mrunalp and runcom as code owners April 6, 2021 22:09
@openshift-ci-robot openshift-ci-robot added release-note-none Denotes a PR that doesn't merit a release note. dco-signoff: yes Indicates the PR's author has DCO signed all their commits. labels Apr 6, 2021
@codecov
Copy link

codecov bot commented Apr 6, 2021

Codecov Report

Merging #4726 (23096d2) into master (730c035) will increase coverage by 0.04%.
The diff coverage is 22.22%.

❗ Current head 23096d2 differs from pull request most recent head 82f315a. Consider uploading reports for the commit 82f315a to get more accurate results

@@            Coverage Diff             @@
##           master    #4726      +/-   ##
==========================================
+ Coverage   43.02%   43.07%   +0.04%     
==========================================
  Files         107      107              
  Lines        9764     9763       -1     
==========================================
+ Hits         4201     4205       +4     
+ Misses       5110     5104       -6     
- Partials      453      454       +1     

@QiWang19
Copy link
Member Author

QiWang19 commented Apr 7, 2021

/retest

}
results, err = svc.appendCachedResult(systemContext, ref, image, results, newImageCache)
if err != nil {
if err != nil && !strings.Contains(err.Error(), fmt.Sprintf(`error locating item named "%s"`, "manifest")) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is too specific. Another option we discussed is keeping a list of images being pulled and then if we get any such error for an image in that list, we skip it.

@QiWang19 QiWang19 force-pushed the manifest-locate-error branch from b44fc11 to 7902947 Compare April 7, 2021 20:37
@haircommander haircommander added this to the 1.21 milestone Apr 7, 2021
@haircommander
Copy link
Member

/override ci/openshift-jenkins/critest_rhel
/override ci/openshift-jenkins/critest_fedora
/approve

LGTM

@openshift-ci-robot
Copy link

@haircommander: Overrode contexts on behalf of haircommander: ci/openshift-jenkins/critest_fedora, ci/openshift-jenkins/critest_rhel

Details

In response to this:

/override ci/openshift-jenkins/critest_rhel
/override ci/openshift-jenkins/critest_fedora
/approve

LGTM

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/test-infra repository.

@openshift-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Apr 7, 2021
@haircommander
Copy link
Member

/retest

@QiWang19 QiWang19 force-pushed the manifest-locate-error branch from 7902947 to dc07eda Compare April 8, 2021 13:36
@QiWang19
Copy link
Member Author

QiWang19 commented Apr 8, 2021

/retest

@QiWang19 QiWang19 force-pushed the manifest-locate-error branch from dc07eda to 1dd33fc Compare April 8, 2021 19:45
@haircommander haircommander removed this from the 1.21 milestone Apr 8, 2021
imageRef = status.RepoDigests[0]
}

if _, ok := storage.PulledImages[status.ID]; !ok {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You need to remove it from the map oncer the pull is completed.

ctx context.Context
}

var PulledImages map[string]int
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need sync on this.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use a sync.Map

@QiWang19 QiWang19 force-pushed the manifest-locate-error branch 3 times, most recently from 7f3611a to cc5465b Compare April 8, 2021 21:10
@QiWang19
Copy link
Member Author

QiWang19 commented Apr 8, 2021

@mrunalp PTAL

@QiWang19
Copy link
Member Author

QiWang19 commented Apr 9, 2021

/retest

1 similar comment
@QiWang19
Copy link
Member Author

QiWang19 commented Apr 9, 2021

/retest

@QiWang19
Copy link
Member Author

QiWang19 commented Apr 9, 2021

@vrothberg @saschagrunert PTAL

@QiWang19 QiWang19 force-pushed the manifest-locate-error branch from cc5465b to f7640ca Compare April 9, 2021 19:12
@openshift-bot
Copy link

/retest

Please review the full test history for this PR and help us cut down flakes.

Copy link
Contributor

@TomSweeneyRedHat TomSweeneyRedHat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@openshift-bot
Copy link

/retest

Please review the full test history for this PR and help us cut down flakes.

1 similar comment
@openshift-bot
Copy link

/retest

Please review the full test history for this PR and help us cut down flakes.

@saschagrunert
Copy link
Member

/override ci/prow/e2e-agnostic

@openshift-ci-robot
Copy link

@saschagrunert: Overrode contexts on behalf of saschagrunert: ci/prow/e2e-agnostic

Details

In response to this:

/override ci/prow/e2e-agnostic

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/test-infra repository.

@saschagrunert
Copy link
Member

/override ci/prow/e2e-gcp

@openshift-ci-robot
Copy link

@saschagrunert: Overrode contexts on behalf of saschagrunert: ci/prow/e2e-gcp

Details

In response to this:

/override ci/prow/e2e-gcp

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/test-infra repository.

Fix Bug 1942608, during the call of ListImages, do not list the image if the there's no manifest exist.
Skip reporting the error locating manifest if the imaage is in the ImageBeingPulled list.

Signed-off-by: Qi Wang <[email protected]>
@QiWang19 QiWang19 force-pushed the manifest-locate-error branch from 8071f56 to 82f315a Compare April 20, 2021 13:52
@openshift-ci-robot openshift-ci-robot removed the lgtm Indicates that a PR is ready to be merged. label Apr 20, 2021
Copy link
Member

@saschagrunert saschagrunert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Apr 20, 2021
@openshift-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: haircommander, QiWang19, saschagrunert

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:
  • OWNERS [haircommander,saschagrunert]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@saschagrunert
Copy link
Member

/override ci/prow/e2e-gcp
/override ci/prow/e2e-agnostic

@openshift-ci-robot
Copy link

@saschagrunert: Overrode contexts on behalf of saschagrunert: ci/prow/e2e-agnostic, ci/prow/e2e-gcp

Details

In response to this:

/override ci/prow/e2e-gcp
/override ci/prow/e2e-agnostic

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/test-infra repository.

@QiWang19
Copy link
Member Author

/test e2e_cgroupv2
/test e2e-agnostic

@saschagrunert
Copy link
Member

/override ci/prow/e2e-gcp
/override ci/prow/e2e-agnostic

@openshift-ci-robot
Copy link

@saschagrunert: Overrode contexts on behalf of saschagrunert: ci/prow/e2e-agnostic, ci/prow/e2e-gcp

Details

In response to this:

/override ci/prow/e2e-gcp
/override ci/prow/e2e-agnostic

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/test-infra repository.

@QiWang19
Copy link
Member Author

/test e2e_rhel
/test e2e_cgroupv2

@openshift-bot
Copy link

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Apr 20, 2021

@QiWang19: The following test failed, say /retest to rerun all failed tests:

Test name Commit Details Rerun command
ci/openshift-jenkins/e2e_crun_cgroupv2 82f315a link /test e2e_cgroupv2

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/test-infra repository. I understand the commands that are listed here.

@openshift-bot
Copy link

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-merge-robot openshift-merge-robot merged commit d1d9cbd into cri-o:master Apr 21, 2021
@haircommander
Copy link
Member

/cherry-pick release-1.21

@openshift-cherrypick-robot

@haircommander: new pull request created: #4785

Details

In response to this:

/cherry-pick release-1.21

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/test-infra repository.

QiWang19 added a commit to QiWang19/cri-o that referenced this pull request Jul 30, 2023
Apply fix cri-o#4726 when ListImage with `filter`.

Previous bug https://bugzilla.redhat.com/show_bug.cgi?id=1942608  appeared in the log hyperkube ListImages with filters.
`"ListImages with filter from image service failed" err="rpc error: code = Unknown desc = error locating item named \"manifest\" for image with ID \"9e11cc7364c9791ebf68949c852bf121cb4ae5829c925a1da6546be6f63b3536\": file does not exist" filter="nil"`

Signed-off-by: Qi Wang <[email protected]>
QiWang19 added a commit to QiWang19/cri-o that referenced this pull request Jul 31, 2023
Apply fix cri-o#4726 when ListImage with `filter`.

Previous bug https://bugzilla.redhat.com/show_bug.cgi?id=1942608  appeared in the log hyperkube ListImages with filters.
`"ListImages with filter from image service failed" err="rpc error: code = Unknown desc = error locating item named \"manifest\" for image with ID \"9e11cc7364c9791ebf68949c852bf121cb4ae5829c925a1da6546be6f63b3536\": file does not exist" filter="nil"`

Signed-off-by: Qi Wang <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. dco-signoff: yes Indicates the PR's author has DCO signed all their commits. lgtm Indicates that a PR is ready to be merged. release-note-none Denotes a PR that doesn't merit a release note.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

10 participants