knative / knative/eventing

Updating subscriptions fails on sequence update

Open
#8,016 1 comment 1 reaction 1 assignee Claimed by @Cali0707 View on GitHub
area/channels kind/bug triage/accepted
Dominant language
Go
Stars
1.6k
Forks
631
Avg merge
2d 1h
Merged PRs (30d)
6

Description

**Describe the bug**
If a sequence is updated with a new retry configuration the sequence is not successfully updated.

**Expected behavior**
The sequence is updated successfully

**To Reproduce**
Knative Kafka Broker needs to be installed: https://github.com/knative-extensions/eventing-kafka-broker

Create sequence:
```yaml
apiVersion: serving.knative.dev/v1
kind: Service
metadata:
name: first
spec:
template:
spec:
containers:
- image: gcr.io/knative-releases/knative.dev/eventing/cmd/appender
env:
- name: MESSAGE
value: " - Handled by 0"

---
apiVersion: serving.knative.dev/v1
kind: Service
metadata:
name: second
spec:
template:
spec:
containers:
- image: gcr.io/knative-releases/knative.dev/eventing/cmd/appender
env:
- name: MESSAGE
value: " - Handled by 1"
---
apiVersion: serving.knative.dev/v1
kind: Service
metadata:
name: third
spec:
template:
spec:
containers:
- image: gcr.io/knative-releases/knative.dev/eventing/cmd/appender
env:
- name: MESSAGE
value: " - Handled by 2"
---
apiVersion: flows.knative.dev/v1
kind: Sequence
metadata:
name: sequence
spec:
channelTemplate:
apiVersion: messaging.knative.dev/v1beta1
kind: KafkaChannel
spec:
numPartitions: 1
replicationFactor: 3
steps:
- ref:
apiVersion: serving.knative.dev/v1
kind: Service
name: first
delivery:
backoffDelay: PT1S
backoffPolicy: linear
retry: 5
- ref:
apiVersion: serving.knative.dev/v1
kind: Service
name: second
delivery:
backoffDelay: PT1S
backoffPolicy: linear
retry: 5
- ref:
apiVersion: serving.knative.dev/v1
kind: Service
name: third
delivery:
backoffDelay: PT1S
backoffPolicy: linear
retry: 5
```
The subscriptions should have been created.

```yaml
$ kubectl get subscription
NAME AGE READY REASON
sequence-kn-sequence-0 14s True
sequence-kn-sequence-1 14s True
sequence-kn-sequence-2 14s True
```
Modify the sequence and update the delivery spec on step 2 -> retry: 7 or something

The sequence update fails and when displaying the sequence yaml, the following entry is displayed in the `conditions` block
```yaml
- lastTransitionTime: "2024-06-20T14:03:00Z"
message: 'failed to reconcile subscription resource for step: 0 : subscriptions.messaging.knative.dev
"sequence-kn-sequence-0" is invalid: metadata.resourceVersion: Invalid value:
0x0: must be specified for an update'
reason: SubscriptionsNotReady
status: Unknown
type: Ready
```

**Knative release version**
1.14.3

**Additional context**
This bug is a followup to #7939. We deployed the 1.14.3 release to a test system and attempted to update a sequence, which is why the reproduction steps are essentially the same as in that report.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.