Skip to content

Commit c48d05c

Browse files
joelanfordasmacdoJAORMXVenkatRamarajuEric Stroczynski
authored
[v1.0.x] Backports (#3899)
Co-authored-by: Austin Macdonald <[email protected]> Co-authored-by: Joe Lanford <[email protected]> Co-authored-by: Juan Osorio Robles <[email protected]> Co-authored-by: Venkat Ramaraju <[email protected]> Co-authored-by: Eric Stroczynski <[email protected]> Co-authored-by: mikeshng <[email protected]> Co-authored-by: Camila Macedo <[email protected]>
1 parent 1cd4d3b commit c48d05c

File tree

30 files changed

+561
-90
lines changed

30 files changed

+561
-90
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
entries:
2+
- description: Fixed debug logging in the `bundle validate` subcommand of `operator-sdk`
3+
kind: "bugfix"
4+
breaking: false
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
entries:
2+
- description: >
3+
`generate <bundle|packagemanifests>` now generates a CSV base with only the `AllNamespaces` install mode
4+
supported by default, since projects are cluster-scoped by default.
5+
kind: bugfix
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# entries is a list of entries to include in
2+
# release notes and/or the migration guide
3+
entries:
4+
- description: >
5+
When generating bundles and packagemanifests, remove `metadata.namespace` from
6+
namespaced resources when writing them into the `manifests` directory to avoid
7+
validation errors.
8+
9+
# kind is one of:
10+
# - addition
11+
# - change
12+
# - deprecation
13+
# - removal
14+
# - bugfix
15+
kind: bugfix
16+
17+
# Is this a breaking change?
18+
breaking: false
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
entries:
2+
- description: Fixed a bug that caused the Helm operator not to set the `InstallSuccessful` and `UpgradeSuccessful` status reasons when the status update fails during installation and upgrade.
3+
kind: "bugfix"
4+
breaking: false
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# entries is a list of entries to include in
2+
# release notes and/or the migration guide
3+
entries:
4+
- description: >
5+
In Helm projects, fix operator permissions for Openshift deployments by adding a `<resource>/finalizers` rule in the operator's role.
6+
7+
# kind is one of:
8+
# - addition
9+
# - change
10+
# - deprecation
11+
# - removal
12+
# - bugfix
13+
kind: "bugfix"
14+
15+
# Is this a breaking change?
16+
breaking: false
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
entries:
2+
- description: >
3+
Prevent `run packagemanifests` from creating an OperatorGroup if one already exists in a namespace,
4+
and use that OperatorGroup if its target namespaces exactly match those passed in `--install-mode`.
5+
See [#3681](https://github.com/operator-framework/operator-sdk/issues/3681).
6+
kind: bugfix
7+
breaking: false
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
entries:
2+
- description: >
3+
Stop reconciling tasks when the event raised is a rescue in Ansible-based Operators.
4+
More info: [Bugzilla 1856714](https://bugzilla.redhat.com/show_bug.cgi?id=1856714)
5+
6+
kind: "bugfix"
7+
8+
breaking: false
9+
pull_request_override: 3650
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# entries is a list of entries to include in
2+
# release notes and/or the migration guide
3+
entries:
4+
- description: >
5+
When scaffolding scorecard configurations, use release versions instead of `latest` in image tags.
6+
7+
# kind is one of:
8+
# - addition
9+
# - change
10+
# - deprecation
11+
# - removal
12+
# - bugfix
13+
kind: "bugfix"
14+
15+
# Is this a breaking change?
16+
breaking: false

internal/ansible/controller/reconcile.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ func (r *AnsibleOperatorReconciler) Reconcile(request reconcile.Request) (reconc
186186
return reconcile.Result{}, err
187187
}
188188
}
189-
if event.Event == eventapi.EventRunnerOnFailed && !event.IgnoreError() {
189+
if event.Event == eventapi.EventRunnerOnFailed && !event.IgnoreError() && !event.Rescued() {
190190
failureMessages = append(failureMessages, event.GetFailedPlaybookMessage())
191191
}
192192
}

internal/ansible/runner/eventapi/types.go

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,3 +122,15 @@ func (je JobEvent) IgnoreError() bool {
122122
}
123123
return false
124124
}
125+
126+
// Rescued - Detects whether or not a task was rescued
127+
func (je JobEvent) Rescued() bool {
128+
if rescued, contains := je.EventData["rescued"]; contains {
129+
for _, v := range rescued.(map[string]interface{}) {
130+
if int(v.(float64)) == 1 {
131+
return true
132+
}
133+
}
134+
}
135+
return false
136+
}

0 commit comments

Comments
 (0)