Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
123 changes: 123 additions & 0 deletions BACKPORT_SUMMARY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
# Backport Summary: PR #144 Fix to Release Branches

## Overview
This document summarizes the backport of PR #144 fix (duplicate livenessProbe in key-manager deployment) to release branches 4.6.x, 4.5.x, and 4.4.x.

## Fix Description
The key-manager deployment template contained two `livenessProbe` definitions where the second should have been a `readinessProbe`.

**Changes Made:**
- Changed the second probe definition from `livenessProbe` to `readinessProbe`
- Updated configuration references to use `.Values.wso2.deployment.readinessProbe.*` instead of `.Values.wso2.deployment.livenessProbe.*`

## Implementation Details

The fix has been prepared and tested for all three release branches. Local feature branches have been created with the necessary changes:

### Branch: 4.6.x
- **Local Feature Branch:** `copilot/backport-fix-to-4.6.x`
- **Base Branch:** `4.6.x` (commit: eb36edc)
- **Commit:** 358ce5a
- **File:** `distributed/key-manager/templates/key-manager/wso2am-km-deployment.yaml`
- **Lines Changed:** 163-169
- **Helm Lint:** ✅ Passed

### Branch: 4.5.x
- **Local Feature Branch:** `copilot/backport-fix-to-4.5.x`
- **Base Branch:** `4.5.x` (commit: a5ace5d)
- **Commit:** 086c5ce
- **File:** `distributed/key-manager/templates/key-manager/wso2am-km-deployment.yaml`
- **Lines Changed:** 120-126
- **Helm Lint:** ✅ Passed

### Branch: 4.4.x
- **Local Feature Branch:** `copilot/backport-fix-to-4.4.x`
- **Base Branch:** `4.4.x` (commit: 16c14e9)
- **Commit:** a296732
- **File:** `distributed/key-manager/templates/key-manager/wso2am-km-deployment.yaml`
- **Lines Changed:** 89-95
- **Helm Lint:** ✅ Passed

## Patch Files

To apply these changes, use the following patch commands for each branch:

### For 4.6.x:
```bash
git checkout 4.6.x
git cherry-pick 358ce5a
# Or apply the patch manually (see below)
```

### For 4.5.x:
```bash
git checkout 4.5.x
git cherry-pick 086c5ce
# Or apply the patch manually (see below)
```

### For 4.4.x:
```bash
git checkout 4.4.x
git cherry-pick a296732
# Or apply the patch manually (see below)
```

## Manual Patch (applicable to all branches)

In `distributed/key-manager/templates/key-manager/wso2am-km-deployment.yaml`, find the duplicate `livenessProbe` sections and change:

```yaml
livenessProbe:
httpGet:
path: /services/Version
port: {{ add 9763 .Values.wso2.apim.portOffset }}
initialDelaySeconds: {{ .Values.wso2.deployment.livenessProbe.initialDelaySeconds }}
periodSeconds: {{ .Values.wso2.deployment.livenessProbe.periodSeconds }}
failureThreshold: {{ .Values.wso2.deployment.livenessProbe.failureThreshold }}
livenessProbe: # <-- This is the duplicate that needs to be changed
httpGet:
path: /services/Version
port: {{ add 9763 .Values.wso2.apim.portOffset }}
initialDelaySeconds: {{ .Values.wso2.deployment.livenessProbe.initialDelaySeconds }}
periodSeconds: {{ .Values.wso2.deployment.livenessProbe.periodSeconds }}
failureThreshold: {{ .Values.wso2.deployment.livenessProbe.failureThreshold }}
```

To:

```yaml
livenessProbe:
httpGet:
path: /services/Version
port: {{ add 9763 .Values.wso2.apim.portOffset }}
initialDelaySeconds: {{ .Values.wso2.deployment.livenessProbe.initialDelaySeconds }}
periodSeconds: {{ .Values.wso2.deployment.livenessProbe.periodSeconds }}
failureThreshold: {{ .Values.wso2.deployment.livenessProbe.failureThreshold }}
readinessProbe: # <-- Changed from livenessProbe to readinessProbe
httpGet:
path: /services/Version
port: {{ add 9763 .Values.wso2.apim.portOffset }}
initialDelaySeconds: {{ .Values.wso2.deployment.readinessProbe.initialDelaySeconds }} # <-- Changed reference
periodSeconds: {{ .Values.wso2.deployment.readinessProbe.periodSeconds }} # <-- Changed reference
failureThreshold: {{ .Values.wso2.deployment.readinessProbe.failureThreshold }} # <-- Changed reference
```

## Verification

All changes have been verified:
1. ✅ Syntax is correct (YAML formatting)
2. ✅ Helm lint passes for all branches
3. ✅ Changes match the original PR #144 fix
4. ✅ readinessProbe configuration references correct values
5. ✅ All three branches have been tested locally

## Next Steps

To complete the backport:
1. Push the local feature branches to remote (requires appropriate permissions)
2. Create pull requests for each branch:
- `copilot/backport-fix-to-4.6.x` → `4.6.x`
- `copilot/backport-fix-to-4.5.x` → `4.5.x`
- `copilot/backport-fix-to-4.4.x` → `4.4.x`
3. Review and merge the PRs
76 changes: 76 additions & 0 deletions patches/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
# How to Apply the Backport Fixes

This directory contains patch files for backporting the PR #144 fix to release branches 4.6.x, 4.5.x, and 4.4.x.

## Option 1: Using Local Branches (Recommended)

If you have access to the repository with the local branches still available:

```bash
# For 4.6.x
git push origin copilot/backport-fix-to-4.6.x

# For 4.5.x
git push origin copilot/backport-fix-to-4.5.x

# For 4.4.x
git push origin copilot/backport-fix-to-4.4.x
```

Then create PRs through the GitHub interface:
- `copilot/backport-fix-to-4.6.x` → `4.6.x`
- `copilot/backport-fix-to-4.5.x` → `4.5.x`
- `copilot/backport-fix-to-4.4.x` → `4.4.x`

## Option 2: Using Patch Files

If the local branches are not available, you can apply the patches directly:

### For 4.6.x:
```bash
git checkout 4.6.x
git checkout -b fix/backport-pr144-to-4.6.x
git apply patches/fix-duplicate-livenessprobe-4.6.x.patch
git add .
git commit -m "Fix duplicate livenessProbe in key-manager deployment

Backport of PR #144 fix to 4.6.x branch"
git push origin fix/backport-pr144-to-4.6.x
```

### For 4.5.x:
```bash
git checkout 4.5.x
git checkout -b fix/backport-pr144-to-4.5.x
git apply patches/fix-duplicate-livenessprobe-4.5.x.patch
git add .
git commit -m "Fix duplicate livenessProbe in key-manager deployment

Backport of PR #144 fix to 4.5.x branch"
git push origin fix/backport-pr144-to-4.5.x
```

### For 4.4.x:
```bash
git checkout 4.4.x
git checkout -b fix/backport-pr144-to-4.4.x
git apply patches/fix-duplicate-livenessprobe-4.4.x.patch
git add .
git commit -m "Fix duplicate livenessProbe in key-manager deployment

Backport of PR #144 fix to 4.4.x branch"
git push origin fix/backport-pr144-to-4.4.x
```

## Option 3: Manual Application

See [BACKPORT_SUMMARY.md](../BACKPORT_SUMMARY.md) for detailed instructions on manually applying the fix.

## Verification

After applying the patches, verify with:
```bash
helm lint distributed/key-manager
```

All patches have been pre-verified and pass helm lint checks.
38 changes: 38 additions & 0 deletions patches/fix-duplicate-livenessprobe-4.4.x.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
From a296732dab23ba5130932292021b52e25627e318 Mon Sep 17 00:00:00 2001
From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com>
Date: Fri, 13 Feb 2026 06:01:54 +0000
Subject: [PATCH] Fix duplicate livenessProbe in key-manager deployment for
4.4.x

- Changed second livenessProbe to readinessProbe
- Updated probe configuration references to use readinessProbe values
- Backport of PR #144 fix to 4.4.x branch
---
.../templates/key-manager/wso2am-km-deployment.yaml | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/distributed/key-manager/templates/key-manager/wso2am-km-deployment.yaml b/distributed/key-manager/templates/key-manager/wso2am-km-deployment.yaml
index f704f63..2d956a4 100644
--- a/distributed/key-manager/templates/key-manager/wso2am-km-deployment.yaml
+++ b/distributed/key-manager/templates/key-manager/wso2am-km-deployment.yaml
@@ -86,13 +86,13 @@ spec:
initialDelaySeconds: {{ .Values.wso2.deployment.livenessProbe.initialDelaySeconds }}
periodSeconds: {{ .Values.wso2.deployment.livenessProbe.periodSeconds }}
failureThreshold: {{ .Values.wso2.deployment.livenessProbe.failureThreshold }}
- livenessProbe:
+ readinessProbe:
httpGet:
path: /services/Version
port: {{ add 9763 .Values.wso2.apim.portOffset }}
- initialDelaySeconds: {{ .Values.wso2.deployment.livenessProbe.initialDelaySeconds }}
- periodSeconds: {{ .Values.wso2.deployment.livenessProbe.periodSeconds }}
- failureThreshold: {{ .Values.wso2.deployment.livenessProbe.failureThreshold }}
+ initialDelaySeconds: {{ .Values.wso2.deployment.readinessProbe.initialDelaySeconds }}
+ periodSeconds: {{ .Values.wso2.deployment.readinessProbe.periodSeconds }}
+ failureThreshold: {{ .Values.wso2.deployment.readinessProbe.failureThreshold }}
lifecycle:
preStop:
exec:
--
2.52.0

38 changes: 38 additions & 0 deletions patches/fix-duplicate-livenessprobe-4.5.x.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
From 086c5ce251f371ed9acafd696feeb9b053aa94d8 Mon Sep 17 00:00:00 2001
From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com>
Date: Fri, 13 Feb 2026 06:01:26 +0000
Subject: [PATCH] Fix duplicate livenessProbe in key-manager deployment for
4.5.x

- Changed second livenessProbe to readinessProbe
- Updated probe configuration references to use readinessProbe values
- Backport of PR #144 fix to 4.5.x branch
---
.../templates/key-manager/wso2am-km-deployment.yaml | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/distributed/key-manager/templates/key-manager/wso2am-km-deployment.yaml b/distributed/key-manager/templates/key-manager/wso2am-km-deployment.yaml
index 8c1661b..1df6658 100644
--- a/distributed/key-manager/templates/key-manager/wso2am-km-deployment.yaml
+++ b/distributed/key-manager/templates/key-manager/wso2am-km-deployment.yaml
@@ -117,13 +117,13 @@ spec:
initialDelaySeconds: {{ .Values.wso2.deployment.livenessProbe.initialDelaySeconds }}
periodSeconds: {{ .Values.wso2.deployment.livenessProbe.periodSeconds }}
failureThreshold: {{ .Values.wso2.deployment.livenessProbe.failureThreshold }}
- livenessProbe:
+ readinessProbe:
httpGet:
path: /services/Version
port: {{ add 9763 .Values.wso2.apim.portOffset }}
- initialDelaySeconds: {{ .Values.wso2.deployment.livenessProbe.initialDelaySeconds }}
- periodSeconds: {{ .Values.wso2.deployment.livenessProbe.periodSeconds }}
- failureThreshold: {{ .Values.wso2.deployment.livenessProbe.failureThreshold }}
+ initialDelaySeconds: {{ .Values.wso2.deployment.readinessProbe.initialDelaySeconds }}
+ periodSeconds: {{ .Values.wso2.deployment.readinessProbe.periodSeconds }}
+ failureThreshold: {{ .Values.wso2.deployment.readinessProbe.failureThreshold }}
lifecycle:
preStop:
exec:
--
2.52.0

38 changes: 38 additions & 0 deletions patches/fix-duplicate-livenessprobe-4.6.x.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
From 358ce5a7cc2928c66b2462375c9a49508a026889 Mon Sep 17 00:00:00 2001
From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com>
Date: Fri, 13 Feb 2026 06:00:25 +0000
Subject: [PATCH] Fix duplicate livenessProbe in key-manager deployment for
4.6.x

- Changed second livenessProbe to readinessProbe
- Updated probe configuration references to use readinessProbe values
- Backport of PR #144 fix to 4.6.x branch
---
.../templates/key-manager/wso2am-km-deployment.yaml | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/distributed/key-manager/templates/key-manager/wso2am-km-deployment.yaml b/distributed/key-manager/templates/key-manager/wso2am-km-deployment.yaml
index 8eb2f41..2592793 100644
--- a/distributed/key-manager/templates/key-manager/wso2am-km-deployment.yaml
+++ b/distributed/key-manager/templates/key-manager/wso2am-km-deployment.yaml
@@ -160,13 +160,13 @@ spec:
initialDelaySeconds: {{ .Values.wso2.deployment.livenessProbe.initialDelaySeconds }}
periodSeconds: {{ .Values.wso2.deployment.livenessProbe.periodSeconds }}
failureThreshold: {{ .Values.wso2.deployment.livenessProbe.failureThreshold }}
- livenessProbe:
+ readinessProbe:
httpGet:
path: /services/Version
port: {{ add 9763 .Values.wso2.apim.portOffset }}
- initialDelaySeconds: {{ .Values.wso2.deployment.livenessProbe.initialDelaySeconds }}
- periodSeconds: {{ .Values.wso2.deployment.livenessProbe.periodSeconds }}
- failureThreshold: {{ .Values.wso2.deployment.livenessProbe.failureThreshold }}
+ initialDelaySeconds: {{ .Values.wso2.deployment.readinessProbe.initialDelaySeconds }}
+ periodSeconds: {{ .Values.wso2.deployment.readinessProbe.periodSeconds }}
+ failureThreshold: {{ .Values.wso2.deployment.readinessProbe.failureThreshold }}
lifecycle:
preStop:
exec:
--
2.52.0