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

Unrecognized field "resource_id" #307

Closed
lexey-evergreen opened this issue Jul 29, 2021 · 1 comment · Fixed by #309
Closed

Unrecognized field "resource_id" #307

lexey-evergreen opened this issue Jul 29, 2021 · 1 comment · Fixed by #309
Labels
bug Something isn't working

Comments

@lexey-evergreen
Copy link

lexey-evergreen commented Jul 29, 2021

Describe the bug
When attempting to manage Confluent Cloud service accounts with the JulieOps CLI tool while using any version of ccloud above v1.27.0, the error message

... Unrecognized field "resource_id" ...

appears in the output.

To Reproduce
Steps to reproduce the behavior:

  1. Use Confluent Cloud
  2. Install any version of ccloud above v1.27.0
curl -L --http1.1 https://cnfl.io/ccloud-cli | sh -s -- -b /usr/bin v1.28.0
  1. Run JulieOps with a topology that includes principals that have a specific prefix. You can use this example and choose "User" as your prefix
  2. Configure your .properties file like so
# Broker config
bootstrap.servers=<broker URL>
ssl.endpoint.identification.algorithm=https
security.protocol=SASL_SSL
sasl.mechanism=PLAIN
sasl.jaas.config=org.apache.kafka.common.security.plain.PlainLoginModule required username="<API key>" password="<API secret>";
# Principal management
topology.features.experimental=true
allow.delete.principals=true
allow.delete.bindings=true
topology.service.accounts.managed.prefixes.0=User
topology.translation.principal.enabled=true
# Confluent Cloud
ccloud.environment=<CC environment ID>
topology.state.cluster.enabled=true

Note the value of topology.service.accounts.managed.prefixes.0 is the same principal prefix as in step 3
5. See the error

Expected behavior
This should not throw an Unrecognized field "resource_id" error on ccloud CLI versions above v1.27.0.

Runtime (please complete the following information):

Additional context
The full error message reads:

com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException: Unrecognized field "resource_id" (class com.purbon.kafka.topology.model.cluster.ServiceAccount), not marked as ignorable (3 known properties: "id", "description", "name"])

Along with those three known properties and the "Show Resource IDs when listing service accounts" release note for v1.28.0 of ccloud, I believe this is as simple as adding a resource_id property to the ServiceAccount.java model.

I'm not sure if thisresource_id property will be helpful for anything else right now, but at least we'll be able to use the latest version of ccloud with JulieOps.

@lexey-evergreen lexey-evergreen added the bug Something isn't working label Jul 29, 2021
purbon pushed a commit that referenced this issue Aug 18, 2021
* Added resourceId to ServiceAccount.java to support ccloud v1.28.0+

* Added @JsonProperty to match resource_id in service account json
sverrehu pushed a commit to sverrehu/julie that referenced this issue Aug 19, 2021
* Added resourceId to ServiceAccount.java to support ccloud v1.28.0+

* Added @JsonProperty to match resource_id in service account json
@purbon purbon linked a pull request Sep 11, 2021 that will close this issue
@purbon
Copy link
Collaborator

purbon commented Sep 11, 2021

closed with the merge of #309

@purbon purbon closed this as completed Sep 11, 2021
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

Successfully merging a pull request may close this issue.

2 participants