Skip to content

[fix] fix image filter with nonexist image#3544

Merged
djdongjin merged 1 commit intocontainerd:mainfrom
xyz-li:main
Oct 17, 2024
Merged

[fix] fix image filter with nonexist image#3544
djdongjin merged 1 commit intocontainerd:mainfrom
xyz-li:main

Conversation

@xyz-li
Copy link
Copy Markdown
Contributor

@xyz-li xyz-li commented Oct 15, 2024

Fix #3511

This commit does not cover this situation nerdctl images -f since=IMAGE_ID

@xyz-li xyz-li force-pushed the main branch 5 times, most recently from 3060371 to a8aaa0f Compare October 15, 2024 06:30
Comment thread pkg/imgutil/filtering.go Outdated
@xyz-li xyz-li requested a review from djdongjin October 16, 2024 08:05
Comment thread pkg/imgutil/filtering.go Outdated
Comment on lines +169 to +170
//nolint:stylecheck
return []images.Image{}, fmt.Errorf("No such image: %s", parseImageName(before))
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

why do we need nolint here?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

"No such image: aaaa:latest" is the output of docker. If don't add this nolint, then golint-ci won't pass, or we can change the output.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

If don't add this nolint, then golint-ci won't pass

what's the error message from golint-ci? (Or you mean "No such image: aaaa:latest" is the output of docker. is the error message from golint-ci?)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

 Running [/home/runner/golangci-lint-1.61.0-linux-amd64/golangci-lint run  --verbose] in [/home/runner/work/nerdctl/nerdctl] ...
  Error: pkg/imgutil/filtering.go:163:30: ST1005: error strings should not be capitalized (stylecheck)
  				return []images.Image{}, fmt.Errorf("No such image: %s", fetchImageNames(before))
  				                         ^
  Error: pkg/imgutil/filtering.go:179:30: ST1005: error strings should not be capitalized (stylecheck)
  				return []images.Image{}, fmt.Errorf("No such image: %s", fetchImageNames(since))
  	

@xyz-li xyz-li force-pushed the main branch 5 times, most recently from 795e114 to 22f5226 Compare October 17, 2024 06:05
Signed-off-by: xyz-li <hui0787411@163.com>
@djdongjin djdongjin added this to the v2.0.0 milestone Oct 17, 2024
@djdongjin djdongjin merged commit 71b8193 into containerd:main Oct 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

images --filter=non-existent inconsistent (docker vs. nerdctl)

2 participants