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

Scaffold async workflow queue provider component #5627

Merged
merged 1 commit into from
Jan 26, 2024

Conversation

Shaddoll
Copy link
Member

@Shaddoll Shaddoll commented Jan 24, 2024

What changed?

  • Create async workflow queue provider component
  • Implement Kafka queue plugin for async workflow queue provider
  • Add async workflow queue to resource component to be used by services

Async workflow queue config will looks like this:

asyncQueues:
  queue1:
    type: kafka
    config:
      brokers:
        - localhost:9092
      tls:
        enable: true
        …
      sasl:
        enable: true
        …
      topic: cadence-async-queue-prod-dca
  queue2:
    type: kafka-proxy
    config:
      topic: cadence-async-queue-proxy-prod-dca

Why?
This component is used by our async workflow API to publish async requests to a queue and consume the request with a controlled throughput. We implement a plugin system in the component to allow us change the implementation of the queue easily. Currently, we only support Kafka.

How did you test it?
unit tests

Potential risks

Release notes

Documentation Changes

common/asyncqueue/provider.go Outdated Show resolved Hide resolved
common/config/config.go Show resolved Hide resolved
common/asyncqueue/provider.go Outdated Show resolved Hide resolved
@Shaddoll Shaddoll force-pushed the asyncqueue branch 7 times, most recently from 03c44b9 to 9e202ed Compare January 25, 2024 23:46
Copy link
Member

@taylanisikdemir taylanisikdemir left a comment

Choose a reason for hiding this comment

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

changes LGTM. will take one final pass after UTs

@Shaddoll Shaddoll force-pushed the asyncqueue branch 2 times, most recently from ef3b0cc to 77d7c02 Compare January 26, 2024 03:54
@coveralls
Copy link

coveralls commented Jan 26, 2024

Pull Request Test Coverage Report for Build 018d4755-210e-49c7-af40-b9b866925a63

  • -50 of 158 (68.35%) changed or added relevant lines in 10 files are covered.
  • 144 unchanged lines in 21 files lost coverage.
  • Overall coverage decreased (-0.05%) to 62.703%

Changes Missing Coverage Covered Lines Changed/Added Lines %
common/asyncworkflow/queue/kafka/init.go 5 6 83.33%
common/asyncworkflow/queue/kafka/producer.go 19 21 90.48%
common/resource/resourceImpl.go 2 5 40.0%
cmd/server/cadence/server.go 0 4 0.0%
common/asyncworkflow/queue/kafka/consumer.go 25 29 86.21%
common/resource/resourceTest.go 0 7 0.0%
common/asyncworkflow/queue/provider.go 20 32 62.5%
common/asyncworkflow/queue/kafka/config.go 16 33 48.48%
Files with Coverage Reduction New Missed Lines %
common/task/weighted_round_robin_task_scheduler.go 1 89.05%
common/persistence/executionManager.go 2 78.94%
common/persistence/statsComputer.go 2 94.64%
common/util.go 2 91.69%
service/history/task/transfer_active_task_executor.go 2 72.22%
service/history/task/transfer_standby_task_executor.go 2 86.19%
service/history/task/fetcher.go 3 85.57%
common/archiver/filestore/historyArchiver.go 4 80.95%
common/persistence/nosql/nosqlplugin/cassandra/tasks.go 4 76.09%
common/task/fifo_task_scheduler.go 4 83.51%
Totals Coverage Status
Change from base Build 018d4267-a931-42dc-9a08-a7ab15db3f96: -0.05%
Covered Lines: 92274
Relevant Lines: 147161

💛 - Coveralls

@Shaddoll Shaddoll changed the title [WIP]Scaffold asyncqueue provider component Scaffold async workflow queue provider component Jan 26, 2024
@Shaddoll Shaddoll marked this pull request as ready for review January 26, 2024 04:50
Copy link
Member

@davidporter-id-au davidporter-id-au left a comment

Choose a reason for hiding this comment

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

hard to fault anything here

@Shaddoll Shaddoll merged commit 58f9fb5 into cadence-workflow:master Jan 26, 2024
16 checks passed
@Shaddoll Shaddoll deleted the asyncqueue branch January 26, 2024 20:31
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.

4 participants