Skip to content

fix invalid validation error checking#5565

Merged
fuweid merged 1 commit intocontainerd:masterfrom
mikebrow:wrapf-fixes
Jun 4, 2021
Merged

fix invalid validation error checking#5565
fuweid merged 1 commit intocontainerd:masterfrom
mikebrow:wrapf-fixes

Conversation

@mikebrow
Copy link
Copy Markdown
Member

@mikebrow mikebrow commented Jun 3, 2021

validateContainer and validateInfo returning immediately if a label exists

found these while reviewing if we had any issues regarding calling "github.com/pkg/errors".Wrapf(err, where err is nil... turns out yes. Was looking thanks to learning from #5560 that if wrapping nil you get nil ..

** side note github.com/hashicorp/errorwrap.Wrapf in our vendor tree (didn't check why) does in fact wrap nil with as <nil> and thus returns the nil wrapped vs returning nil)

Signed-off-by: Mike Brown brownwm@us.ibm.com

Signed-off-by: Mike Brown <brownwm@us.ibm.com>
@theopenlab-ci
Copy link
Copy Markdown

theopenlab-ci bot commented Jun 3, 2021

Build succeeded.

@dmcgowan
Copy link
Copy Markdown
Member

dmcgowan commented Jun 3, 2021

Interesting find as well, the logic is backwards but it just ends up being a no-op because of Wrapf. We need to add more testing around these edge case error conditions.

@fuweid fuweid merged commit e2f7842 into containerd:master Jun 4, 2021
@mikebrow mikebrow added cherry-picked/1.4.x PR commits are cherry picked into the release/1.4 branch cherry-picked/1.5.x PR commits are cherry-picked into release/1.5 branch and removed cherry-pick/1.4.x labels Jun 8, 2021
fuweid added a commit that referenced this pull request Jun 9, 2021
[release/1.5] cherry pick #5565 to release 1.5 - fix invalid validation error checking
estesp added a commit that referenced this pull request Jun 9, 2021
[release/1.4] cherry pick #5565 to release 1.4 - fix invalid validation error checking
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cherry-picked/1.4.x PR commits are cherry picked into the release/1.4 branch cherry-picked/1.5.x PR commits are cherry-picked into release/1.5 branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants