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

Error when running with Redis Backend #453

Closed
samudurand opened this issue Mar 3, 2022 · 2 comments · Fixed by #462
Closed

Error when running with Redis Backend #453

samudurand opened this issue Mar 3, 2022 · 2 comments · Fixed by #462
Labels
bug Something isn't working

Comments

@samudurand
Copy link

samudurand commented Mar 3, 2022

Describe the bug
Running Julie when using the RedisBackend results in the following error:

java.lang.IllegalArgumentException: argument "content" is null
	at com.fasterxml.jackson.databind.ObjectMapper._assertNotNull(ObjectMapper.java:4757)
	at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:35[15](https://github.com/mobimeo/infrastructure-monorepo/runs/5408337681?check_suite_focus=true#step:4:15))
	at com.purbon.kafka.topology.utils.JSON.toObject(JSON.java:53)
	at com.purbon.kafka.topology.backend.RedisBackend.load(RedisBackend.java:53)
	at com.purbon.kafka.topology.BackendController.load(BackendController.java:103)
	at com.purbon.kafka.topology.ExecutionPlan.init(ExecutionPlan.java:75)
	at com.purbon.kafka.topology.JulieOps.run(JulieOps.java:232)
	at com.purbon.kafka.topology.JulieOps.run(JulieOps.java:268)
	at com.purbon.kafka.topology.CommandLineInterface.processTopology(CommandLineInterface.java:212)
	at com.purbon.kafka.topology.CommandLineInterface.run(CommandLineInterface.java:[16](https://github.com/mobimeo/infrastructure-monorepo/runs/5408337681?check_suite_focus=true#step:4:16)1)
	at com.purbon.kafka.topology.CommandLineInterface.main(CommandLineInterface.java:147)

To Reproduce
Steps to reproduce the behavior:

  1. Configure Julie with a Redis backend'
topology.state.cluster.enabled = true
topology.builder.state.processor.class = com.purbon.kafka.topology.backend.RedisBackend
topology.builder.redis.host = myhost
topology.builder.redis.port = 6379
  1. Run Julie in dry run mode for the first time (no prior successful execution: julie-ops-cli.sh --brokers ${{ env.KAFKA_TLS_STRING }} --clientConfig config.properties --dryRun --topology topologies/${{ matrix.topology_file }}

Expected behavior
Julie should display the planned changes

Possible reason
I have looked into the code and this section in particular in the Redis backend looks like it would never work on the initial run, since the Redis value would be nil the first time.

String content = jedis.get(JULIE_OPS_STATE);
return (BackendState) JSON.toObject(content, BackendState.class);

What I want to know
Is it an expected behaviour because I am missing something in my configuration ? Or is it a bug with a workaround ?

@samudurand samudurand added the bug Something isn't working label Mar 3, 2022
@samudurand samudurand changed the title Error when running dry-run with Redis Backend Error when running with Redis Backend Mar 3, 2022
@purbon
Copy link
Collaborator

purbon commented Mar 22, 2022

should be fix with #462, stupid error of manual 101 sorry for that. I have included proper test to make sure it does not happen again

@samudurand
Copy link
Author

samudurand commented Mar 23, 2022

Nice ! Thanks for that. I figured out a workaround by storing the file manually between builds in S3 but this is a much better solution.

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