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

Conflicting property-based creators during upgrade to v0.35.4 #513

Open
RouxAntoine opened this issue Jan 14, 2025 · 4 comments
Open

Conflicting property-based creators during upgrade to v0.35.4 #513

RouxAntoine opened this issue Jan 14, 2025 · 4 comments

Comments

@RouxAntoine
Copy link

RouxAntoine commented Jan 14, 2025

Hello

Describe the bug

After upgrading from v0.33.3 to v0.35.4, we have an error to on aiven acl topic resources.

To Reproduce
Steps to reproduce the behavior:

input testing resources that we use

---
apiVersion: "kafka.aiven.io/v1beta1"
kind: "KafkaTopicAclEntry"
metadata:
  annotations:
    decathlon.com/domain: "address"
spec:
  username: bob
  permission: READWRITE
  topic: '*'
---
apiVersion: "kafka.aiven.io/v1beta1"
kind: "KafkaTopicAclEntry"
metadata:
  annotations:
    decathlon.com/domain: "address"
spec:
  username: alice
  permission: READWRITE
  topic: '*alice*'
---
apiVersion: "kafka.aiven.io/v1beta1"
kind: "KafkaTopicAclEntry"
metadata:
  annotations:
    decathlon.com/domain: "streaming"
spec:
  username: member-sport
  permission: READ
  topic: 'local.dkt-member.streaming.public.fact.demo-member-event.v1.avro'

Sorry for the bad reproducer as you know (For @fhussonnois) this is a little complex to give a reproducer code in our case.

Expected behavior

As of before no change in the jikkou log output because we do not change the input acl resources.

Screenshots/Configs

here is the stack trace

Caused by: com.fasterxml.jackson.databind.exc.InvalidDefinitionException: Conflicting property-based creators: already 
had explicit creator [constructor for `io.streamthoughts.jikkou.core.models.change.SpecificStateChange` (4 args), 
annotations: {interface java.beans.ConstructorProperties=@java.beans.ConstructorProperties({"name", "op", "before", 
"after", "description"})}, encountered another: [constructor for 
`io.streamthoughts.jikkou.core.models.change.SpecificStateChange` (5 args), annotations: {interface 
java.beans.ConstructorProperties=@java.beans.ConstructorProperties({"name", "op", "before", "after", "description"})} 
(through reference chain: io.streamthoughts.jikkou.kafka.reporter.ce.CloudEventEntity["data"]-
>io.streamthoughts.jikkou.core.reconciler.DefaultChangeResult["change"]-
>io.streamthoughts.jikkou.core.models.change.GenericResourceChange["spec"]-
>io.streamthoughts.jikkou.core.models.change.GenericResourceChangeSpec["changes"]-
>java.util.Collections$UnmodifiableList[0])

Additional context
Add any other context about the problem here.

My supposition is a conflict between

https://github.com/streamthoughts/jikkou/blob/main/core/src/main/java/io/streamthoughts/jikkou/core/models/change/SpecificStateChange.java#L32

and

https://github.com/streamthoughts/jikkou/blob/main/core/src/main/java/io/streamthoughts/jikkou/core/models/change/SpecificStateChange.java#L54

both have

    @ConstructorProperties({
            "name",
            "op",
            "before",
            "after",
            "description"
    })

the first one should be instead

    @ConstructorProperties({
            "name",
            "op",
            "before",
            "after"
    })
@RouxAntoine
Copy link
Author

Same here
https://github.com/streamthoughts/jikkou/blob/main/core/src/main/java/io/streamthoughts/jikkou/core/reconciler/DefaultChangeResult.java#L45-L51

Seems strange to have

    @ConstructorProperties({
            "end",
            "errors",
            "status",
            "data",
            "description"
    })

"data" -> should be "change" I think

@RouxAntoine
Copy link
Author

seems to be related to a spring boot upgrade from 3.3.5 to 3.4.1

@RouxAntoine
Copy link
Author

PR try to address this #514

@RouxAntoine
Copy link
Author

PR completed with a test case https://github.com/streamthoughts/jikkou/pull/514/files#diff-753d67b1d33e9fa347b62fd925b983b1934bf0ef21594e9872598f5b9e24d95cR60 to demonstrate the problem, this is due to the new fasterxml which does not allow multiple ConstructorProperties in a same class

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant