Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

retryPolicy.[maximum|minimum]Backoff doesn't accept documented fractional digits #409

Open
daniellervik opened this issue Feb 23, 2021 · 2 comments
Labels
bug Something isn't working

Comments

@daniellervik
Copy link

Describe the bug
The pubsub_v1beta1_pubsubsubscription retryPolicy object describes maximumBackoff and minimumBackoff accepting fractional digits in the optional durations:

A duration in seconds with up to nine fractional digits, terminated by 's'. Example: "3.5s".

They only seem to accept non-fractional durations, e.g. "3s".

ConfigConnector Version
1.36.0

To Reproduce

  1. Set PubSubSubscription's spec.retryPolicy.minimumBackoff: "60.0s". Apply changes. Expected outcome: The subscription resource starts flickering between Updating/UpToDate indefinitely.
  2. Changing to spec.retryPolicy.minimumBackoff: "60s" and applying works as expected and it settles as UpToDate.

YAML snippets:

  1. With fractional digits, retries to apply indefinitely
apiVersion: pubsub.cnrm.cloud.google.com/v1beta1
kind: PubSubSubscription
metadata:
  name: some-subscription
  namespace: some-namespace
spec:
  retryPolicy:
    minimumBackoff: 60.0s
  topicRef:
    name: some-subscribed-topic
  1. Without fractional digits, works as expected
apiVersion: pubsub.cnrm.cloud.google.com/v1beta1
kind: PubSubSubscription
metadata:
  name: some-subscription
  namespace: some-namespace
spec:
  retryPolicy:
    minimumBackoff: 60s
  topicRef:
    name: some-subscribed-topic
@daniellervik daniellervik added the bug Something isn't working label Feb 23, 2021
@toumorokoshi
Copy link
Contributor

Thanks for the bug report! sorry you're having issues.

I can reproduce the case (here's a more complete example)

apiVersion: v1
kind: Namespace
metadata:
  name: gh-409
  annotations:
    "cnrm.cloud.google.com/project-id": <redacted>
---
  apiVersion: pubsub.cnrm.cloud.google.com/v1beta1
  kind: PubSubSubscription
  metadata:
    namespace: gh-409
    labels:
      label-one: "value-one"
    name: pubsubsubscription-sample
  spec:
    ackDeadlineSeconds: 15
    messageRetentionDuration: 86400s
    retryPolicy:
      minimumBackoff: 60.1s
    retainAckedMessages: false
    topicRef:
      name: pubsubsubscription-dep
---
apiVersion: pubsub.cnrm.cloud.google.com/v1beta1
kind: PubSubTopic
metadata:
  name: pubsubsubscription-dep
  namespace: gh-409

We're taking a look and will try to come back with an ETA to fix.

@toumorokoshi
Copy link
Contributor

Hello! small update: we've tracked down the issue to some inconsistency in the upstream API for normalizing that string. Terraform has a similar bug filed against it now, I'll file a bug with the pubsub team internally.

The best way to get traction is to talk to GCP support for the pubsub issue specifically. But I'll see if I can push on the pubsub team a little bit as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants