Skip to content

Commit

Permalink
feat: Add Kafka trigger to Tracetest (#3056)
Browse files Browse the repository at this point in the history
* feature(server): add kafka trigger (#3024)

* wip - adding kafka trigger

* Adding code for Kafka trigger

* Adding Sarama as dependency

* Updating backend and examples to support trigger

* Fixing example

* feat(cli, fe): adding Kafka trigger (#3045)

* wip

* wip

* updated openapi specs

* Updating CLI

* Fixing types on FE to support Kafka

* wip - changing components to accept kafka

* wip adding form items

* Fixing add step

* Fixing warnings and some bindings

* small fixes

* tests

* Fixing UI and server mappings

* Fixing marshalling error on server

* Fixing UI test

* Adding PR suggestions

* Moving header component to a generic one

* Using KeyValueListInput instead of custom header for Rest components

* Adding more PR suggestions

* Updating component names
  • Loading branch information
danielbdias committed Aug 11, 2023
1 parent 7882f45 commit c8843fe
Show file tree
Hide file tree
Showing 76 changed files with 3,494 additions and 63 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/deploy-demo.yml
Expand Up @@ -79,7 +79,7 @@ jobs:
- uses: goreleaser/goreleaser-action@v4
with:
distribution: goreleaser-pro
version: v1.18.2
version: v1.19.2
args: release --clean --skip-announce -f .goreleaser.demo.yaml
env:
VERSION: ${{ github.ref_name}}-demo
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/deploy-main.yml
Expand Up @@ -120,7 +120,7 @@ jobs:
if: steps.cache.outputs.cache-hit != 'true'
with:
distribution: goreleaser-pro
version: v1.18.2
version: v1.19.2
args: release --clean --split --nightly
env:
GOOS: ${{ matrix.GOOS }}
Expand Down Expand Up @@ -189,7 +189,7 @@ jobs:
if: steps.cache.outputs.cache-hit != 'true'
with:
distribution: goreleaser-pro
version: v1.18.2
version: v1.19.2
args: continue --merge
env:
VERSION: sha-${{ env.sha_short }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pull-request.yaml
Expand Up @@ -188,7 +188,7 @@ jobs:
if: steps.cache-docker-build.outputs.cache-hit != 'true'
with:
distribution: goreleaser-pro
version: v1.18.2
version: v1.19.2
args: release --skip-announce --snapshot -f .goreleaser.dev.yaml
- name: Move binaries to known location
if: steps.cache-docker-build.outputs.cache-hit != 'true'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-candidate.yml
Expand Up @@ -82,7 +82,7 @@ jobs:
if: steps.cache.outputs.cache-hit != 'true'
with:
distribution: goreleaser-pro
version: v1.18.2
version: v1.19.2
args: release --clean -f .goreleaser.rc.yaml
env:
VERSION: ${{ github.ref_name}}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-version.yml
Expand Up @@ -93,7 +93,7 @@ jobs:
if: steps.cache.outputs.cache-hit != 'true'
with:
distribution: goreleaser-pro
version: v1.18.2
version: v1.19.2
args: release --clean
env:
VERSION: ${{ github.ref_name}}
Expand Down
2 changes: 1 addition & 1 deletion Makefile
@@ -1,6 +1,6 @@
VERSION?="dev"
TAG?=$(VERSION)
GORELEASER_VERSION=1.18.2-pro
GORELEASER_VERSION=1.19.2-pro

PROJECT_ROOT=${PWD}

Expand Down
55 changes: 55 additions & 0 deletions api/kafka.yaml
@@ -0,0 +1,55 @@
openapi: 3.0.0
components:
schemas:
KafkaRequest:
type: object
properties:
brokerUrls:
type: array
items:
type: string
topic:
type: string
authentication:
$ref: "#/components/schemas/KafkaAuthentication"
sslVerification:
type: boolean
default: false
headers:
type: array
items:
$ref: "#/components/schemas/KafkaMessageHeader"
messageKey:
type: string
messageValue:
type: string

KafkaResponse:
type: object
properties:
partition:
type: string
offset:
type: string

KafkaMessageHeader:
type: object
properties:
key:
type: string
value:
type: string

KafkaAuthentication:
type: object
properties:
type:
type: string
enum: [plain]
plain:
type: object
properties:
username:
type: string
password:
type: string
4 changes: 2 additions & 2 deletions api/openapi.yaml
Expand Up @@ -1149,8 +1149,8 @@ paths:
- resource-api
parameters:
- $ref: "./parameters.yaml#/components/parameters/variableSetId"
summary: "Delete an variable set"
description: "Delete an variable set from Tracetest"
summary: "Delete a variable set"
description: "Delete a variable set from Tracetest"
operationId: deleteVariableSet
responses:
204:
Expand Down
8 changes: 6 additions & 2 deletions api/triggers.yaml
Expand Up @@ -6,20 +6,22 @@ components:
properties:
type:
type: string
enum: ["http", "grpc", "traceid"]
enum: ["http", "grpc", "traceid", "kafka"]
httpRequest:
$ref: "./http.yaml#/components/schemas/HTTPRequest"
grpc:
$ref: "./grpc.yaml#/components/schemas/GRPCRequest"
traceid:
$ref: "./traceid.yaml#/components/schemas/TRACEIDRequest"
kafka:
$ref: "./kafka.yaml#/components/schemas/KafkaRequest"

TriggerResult:
type: object
properties:
type:
type: string
enum: ["http", "grpc", "traceid"]
enum: ["http", "grpc", "traceid", "kafka"]
triggerResult:
type: object
properties:
Expand All @@ -29,3 +31,5 @@ components:
$ref: "./grpc.yaml#/components/schemas/GRPCResponse"
traceid:
$ref: "./traceid.yaml#/components/schemas/TRACEIDResponse"
kafka:
$ref: "./kafka.yaml#/components/schemas/KafkaResponse"
1 change: 1 addition & 0 deletions cli/openapi/api_resource_api.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

160 changes: 160 additions & 0 deletions cli/openapi/model_kafka_authentication.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit c8843fe

Please sign in to comment.