Skip to content

Commit f10f090

Browse files
committed
fix(ansible): invalid maxArtifacts annotation
When the maxArtifacts annotation can not be converted to an integer, do not use it.
1 parent 70efaa3 commit f10f090

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
### Bug Fixes
1414

1515
- OLM internal manager is not returning errors in the initialization. ([#1976](https://github.com/operator-framework/operator-sdk/pull/1976))
16+
- Handle invalid maxArtifacts annotation on CRs for Ansible based operators. ([2093](https://github.com/operator-framework/operator-sdk/pull/2093))
1617

1718
## v0.11.0
1819

pkg/ansible/runner/runner.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,8 +174,9 @@ func (r *runner) Run(ident string, u *unstructured.Unstructured, kubeconfig stri
174174
i, err := strconv.Atoi(ma)
175175
if err != nil {
176176
log.Info("Invalid max runner artifact annotation", "err", err, "value", ma)
177+
} else {
178+
maxArtifacts = i
177179
}
178-
maxArtifacts = i
179180
}
180181

181182
go func() {

0 commit comments

Comments
 (0)