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

PubSubTopic attributes for schemaSettings optional on CRD, required by API #698

Open
3 tasks done
npitts0811 opened this issue Aug 12, 2022 · 2 comments
Open
3 tasks done
Labels
bug Something isn't working

Comments

@npitts0811
Copy link

Checklist

Bug Description

I found the following when trying to reference a PubSubSchema from a PubSubTopic:

  • the 'schemaSettings.encoding' attribute is defined as optional, however the resource fails to deploy unless specified (API error)
  • the 'schemaSettings.encoding' attribute is listed as having a default value of 'ENCODING_UNSPECIFIED', however the resource fails to deploy unless specified (API error)
  • child attributes of 'schemaSettings' are immutable, but not documented as such.
  • 'schemaSettings' cannot be added after a topic has been deployed

Additional Diagnostic Information

na

Kubernetes Cluster Version

v1.22.10-gke.600

Config Connector Version

1.90.0

Config Connector Mode

namespaced mode (default)

Log Output

schemaSettings.encoding not specified:
Update call failed: error applying desired state: summary: Error creating Topic: googleapi: Error 400: Schema settings for the topic projects/project/topics/pubsubtopic-example must include both the name and the encoding.

schemaSettings.encoding set to ENCODING_UNSPECIFIED:
Update call failed: error applying desired state: summary: Error creating Topic: googleapi: Error 400: Schema settings for the topic projects/project/topics/pubsubtopic-example must include both the name and the encoding.

updating any values under schemaSettings:
Update call failed: error applying desired state: summary: Error updating Topic "projects/project/topics/pubsubtopic-example0": googleapi: Error 400: Invalid update_mask provided in the UpdateTopicRequest: the 'schema_settings' field in the Topic is not mutable.

Steps to reproduce the issue

noted in description

YAML snippets

# encoding attribute not defined
---
apiVersion: pubsub.cnrm.cloud.google.com/v1beta1
kind: PubSubTopic
metadata:
  name: pubsubtopic-example
spec:
  schemaSettings:
    schemaRef:
      name: pubsubschema-sample
# encoding value set to ENCODING_UNSPECIFIED
---
apiVersion: pubsub.cnrm.cloud.google.com/v1beta1
kind: PubSubTopic
metadata:
  name: pubsubtopic-example
spec:
  schemaSettings:
    encoding: ENCODING_UNSPECIFIED
    schemaRef:
      name: pubsubschema-sample
@npitts0811 npitts0811 added the bug Something isn't working label Aug 12, 2022
@npitts0811 npitts0811 changed the title PubSubTopic attributes for PubSubSchema attributes optional on CRD, required by API PubSubTopic attributes for schemaSettings optional on CRD, required by API Aug 12, 2022
@caieo
Copy link
Contributor

caieo commented Aug 22, 2022

@npitts0811 Thank you for filing this issue with clear reproduction steps! I tested it out and agree that it is a bug and added it to our queue of bugs to fix. It doesn't look like the PubSubTopic API documentation indicates if that field is required or not, which is not that helpful.

Can you clarify if this bug is a blocker, friction-point, or nice-to-have for you? Because we have a pretty limited capacity, we can't provide an ETA for when this issue will be fixed. Please reach out to us via Cloud Support to prioritize your request if it is a blocker.

@npitts0811
Copy link
Author

@caieo Glad to hear this confirmed and isn't just me :) This is not a blocker for us, I just noticed the behavior and wanted to make sure to get some eyes on it.

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