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

Consumer #11

Merged
merged 34 commits into from
Feb 6, 2024
Merged

Consumer #11

merged 34 commits into from
Feb 6, 2024

Conversation

taco-paco
Copy link
Contributor

No description provided.

@taco-paco taco-paco requested a review from Hyodar January 31, 2024 13:27
@taco-paco taco-paco self-assigned this Jan 31, 2024
Copy link
Contributor

@Hyodar Hyodar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some minor observations mainly. I'd like to take a look again after those are discussed, so marking it accordingly.

consumer/consumer.go Outdated Show resolved Hide resolved
consumer/consumer.go Outdated Show resolved Hide resolved
consumer/consumer.go Outdated Show resolved Hide resolved
consumer/consumer.go Outdated Show resolved Hide resolved
consumer/consumer.go Outdated Show resolved Hide resolved
consumer/consumer.go Outdated Show resolved Hide resolved
consumer/consumer.go Outdated Show resolved Hide resolved
consumer/consumer.go Outdated Show resolved Hide resolved
consumer/queue_listener.go Outdated Show resolved Hide resolved
@Hyodar
Copy link
Contributor

Hyodar commented Feb 5, 2024

Okay, I ended up doing more changes than I initially expected, so I'll still leave the PR open for you to take a look tomorrow. Feel free to revert whatever, but I think mostly it's not something that will bring much of a discussion. Breaking down the most significant changes a bit so it's easier to consider:

  • Removed some unnecessary TODOs - if you still think some of those are relevant, we can discuss it here. Let's try and keep it a bit cleaner, there were some that were already solved but the comment was still there.
  • Moved the CLI to the cmd package, as in all the other submodules, and used urfave/cli, as in all other submodules.
  • Refactored QueuesListener logic into Consumer - it was effectively implementable in a single function and it didn't seem like we were getting too much benefit from the QueuesListener abstraction. Plus, because of the rollup ID <-> channel name mapping, it was also strongly linked to Consumer through it since this is effectively a Consumer config.
  • We consider each a rollup-related queue is simply "rollup" + str(id). This is simpler and I don't think we're losing anything with it.
  • Added rollup IDs to ConsumerConfig. With the point above, this is equivalent to also knowing the queues.

There were also some minor changes, some related to my private comments on Slack.

@Hyodar
Copy link
Contributor

Hyodar commented Feb 6, 2024

Made some other small changes and integrated the consumer into the operator. I was originally going to do this in my PR after this was merged, but decided to do this instead. Same observations as above, feel free to do whatever.

Copy link
Contributor

@Hyodar Hyodar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@taco-paco taco-paco merged commit ab76b2c into main Feb 6, 2024
3 checks passed
@Hyodar Hyodar deleted the feat/consumer branch July 22, 2024 16:58
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

Successfully merging this pull request may close these issues.

2 participants