Fix: generate specs for pod with no infra container#28386
Conversation
|
Accidentally signed it with wrong key. I will resign the correct one later |
|
|
||
| infraSpec := &specgen.SpecGenerator{} | ||
| if pod.HasInfraContainer() { | ||
| if len(spec.InfraContainerSpec.Image) > 0 { |
There was a problem hiding this comment.
CI catch: panic: runtime error: invalid memory address or nil pointer dereference
| } | ||
| } | ||
|
|
||
| spec.InfraContainerSpec = infraSpec |
There was a problem hiding this comment.
Here is spec.InfraContainerSpec set. I assume it is before it is nil.
90ab113 to
2e0b0e3
Compare
09f4057 to
d2807ea
Compare
| if len(spec.InfraContainerSpec.Image) > 0 { | ||
| spec.InfraImage = spec.InfraContainerSpec.Image | ||
| } | ||
|
|
There was a problem hiding this comment.
non-blocking nit: but this might read better after the unmarshal block below; currently it's wedged in between a logical set.
There was a problem hiding this comment.
fixed now, thanks for the feedback
Honny1
left a comment
There was a problem hiding this comment.
LGTM, please squosh commits.
efa8810 to
b958f55
Compare
|
[NON-BLOCKING] Packit jobs failed. @containers/packit-build please check. Everyone else, feel free to ignore. |
|
CI is failing because quay.io is down at the moment. I will retry later. |
…ToSpec fixes podman-container-tools#21609 Signed-off-by: Nabil Houidi <35373676+NabilHouidi@users.noreply.github.com>
b958f55 to
d446555
Compare
Honny1
left a comment
There was a problem hiding this comment.
LGTM
PTAL @containers/podman-maintainers
|
Had to check that LGTM |
This commit fixes #21609.
Checklist
Ensure you have completed the following checklist for your pull request to be reviewed:
commits. (
git commit -s). (If needed, usegit commit -s --amend). The author email must matchthe sign-off email address. See CONTRIBUTING.md
for more information.
Fixes:in commit message (if applicable)make validatepr(format/lint checks)Noneif no user-facing changes)Does this PR introduce a user-facing change?