Skip to content

Initial http reaction #253

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

Merged
merged 5 commits into from
Jun 26, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,11 @@ jobs:
label: 'PostDaprPubSub',
path: './reactions/dapr/post-pubsub',
name: 'reaction-post-dapr-pubsub'
},
{
label: 'Http',
path: './reactions/http',
name: 'reaction-http'
}
]
steps:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/draft-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ env:
{"label": "StorageQueue", "path": "reactions/azure/storagequeue-reaction", "name": "reaction-storage-queue", "platforms": "linux/amd64,linux/arm64"},
{"label": "SyncDaprStateStore", "path": "reactions/dapr/sync-statestore", "name": "reaction-sync-dapr-statestore", "platforms": "linux/amd64,linux/arm64"},
{"label": "PostDaprPubSub", "path": "reactions/dapr/post-pubsub", "name": "reaction-post-dapr-pubsub", "platforms": "linux/amd64,linux/arm64"},
{"label": "Http", "path": "reactions/http", "name": "reaction-http", "platforms": "linux/amd64,linux/arm64"},
{"label": "StoredProc", "path": "reactions/sql/storedproc-reaction", "name": "reaction-storedproc", "platforms": "linux/amd64,linux/arm64"}]'

jobs:
Expand Down
19 changes: 19 additions & 0 deletions cli/installers/resources/default-reaction-providers.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -256,4 +256,23 @@ spec:
services:
reaction:
image: reaction-post-dapr-pubsub
---
apiVersion: v1
kind: ReactionProvider
name: Http
spec:
services:
reaction:
image: reaction-http
config_schema:
type: object
properties:
baseUrl:
type: string
token:
type: string
timeout:
type: number
required:
- baseUrl

57 changes: 35 additions & 22 deletions query-container/Cargo.lock

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

1 change: 1 addition & 0 deletions reactions/http/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules
2 changes: 2 additions & 0 deletions reactions/http/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
node_modules
dist
11 changes: 11 additions & 0 deletions reactions/http/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
FROM node:20-alpine

WORKDIR /usr/src/app

COPY . .

RUN npm install -g typescript
RUN npm install
RUN npm run build

CMD ["npm", "start"]
27 changes: 27 additions & 0 deletions reactions/http/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
.PHONY: default docker-build kind-load

CLUSTER_NAME ?= kind
IMAGE_PREFIX ?= drasi-project
DOCKER_TAG_VERSION ?= latest
DOCKERX_OPTS ?= --load --cache-to type=inline,mode=max

default: docker-build

docker-build:
docker buildx build . -t $(IMAGE_PREFIX)/reaction-http:$(DOCKER_TAG_VERSION) $(DOCKERX_OPTS)

docker-build-debug:
docker buildx build . -f Dockerfile.debug -t $(IMAGE_PREFIX)/reaction-http:$(DOCKER_TAG_VERSION) $(DOCKERX_OPTS)

kind-load:
kind load docker-image $(IMAGE_PREFIX)/reaction-http:$(DOCKER_TAG_VERSION) --name $(CLUSTER_NAME)

k3d-load: CLUSTER_NAME=k3s-default
k3d-load:
k3d image import $(IMAGE_PREFIX)/reaction-http:$(DOCKER_TAG_VERSION) -c $(CLUSTER_NAME)

test:
@echo "No tests to run yet"

lint-check:
@echo "No lint checks to run yet"
Loading
Loading