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

[pull] master from dapr:master #274

Merged
merged 3,944 commits into from
Jan 1, 2025
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
Show all changes
3944 commits
Select commit Hold shift + click to select a range
f87e04f
move metrics call into assert eventually
cicoyle Oct 2, 2024
cc1d412
open new pr based off old (#8137)
cicoyle Oct 2, 2024
532c89d
Merge branch 'master' into fix-flaky-int-tests
mikeee Oct 3, 2024
295747b
Apply suggestions from code review
cicoyle Oct 3, 2024
e644b0d
fixes after adding PR feedback
cicoyle Oct 3, 2024
bf7be8a
rm dapr appID since its no longer needed
cicoyle Oct 3, 2024
c20ba9f
Linter
elena-kolevska Oct 3, 2024
82da521
Updates the golangci-lint action
elena-kolevska Oct 3, 2024
c326208
Linter: Updates test code for new linter rules (#8147)
JoshVanL Oct 3, 2024
cfd83e5
Merge branch 'master' into fix-jobs-key-path
dapr-bot Oct 3, 2024
020b670
Merge branch 'master' into protoc-version-25.4
JoshVanL Oct 3, 2024
dfa5ccf
Merge branch 'master' into feature/configurable-placement-timeout
dapr-bot Oct 3, 2024
46d8004
feat(outbox): use content-type in the metadata for projections item (…
luigirende Oct 3, 2024
40f996b
api: add Conversation API (#7858)
daixiang0 Oct 3, 2024
c2329b5
Merge branch 'master' into feature/configurable-placement-timeout
dapr-bot Oct 3, 2024
2ff7328
Merge branch 'master' into fix-jobs-key-path
dapr-bot Oct 3, 2024
45010d7
Merge branch 'master' into update-linter-action-version
elena-kolevska Oct 3, 2024
fd70717
merge in master
cicoyle Oct 3, 2024
89cd61b
Merge branch 'master' into protoc-version-25.4
JoshVanL Oct 4, 2024
dbf3aad
Merge pull request #8165 from elena-kolevska/update-linter-action-ver…
JoshVanL Oct 4, 2024
a552a62
Merge branch 'master' into feature/configurable-placement-timeout
dapr-bot Oct 4, 2024
f5b7ca7
Merge branch 'master' into feat-scheduler-metrics
dapr-bot Oct 4, 2024
70a4b0c
Merge branch 'master' into fix-jobs-key-path
dapr-bot Oct 4, 2024
b4160c3
cumulative -> last val for daprconnections to decrement as well
cicoyle Oct 4, 2024
f1b81aa
rm mutex. use atomic int
cicoyle Oct 4, 2024
a9ee0a1
rm sprintf to fix lint
cicoyle Oct 4, 2024
c4b7e05
Conversation API: add integration tests (#8167)
yaron2 Oct 4, 2024
046f881
Merge branch 'master' into feature/configurable-placement-timeout
dapr-bot Oct 4, 2024
847e04a
Merge branch 'master' into feat-scheduler-metrics
dapr-bot Oct 4, 2024
8c66da3
Merge branch 'master' into fix-jobs-key-path
dapr-bot Oct 4, 2024
efe9ac9
Increase delay to Raft HA test (#8174)
antontroshin Oct 5, 2024
635423a
Merge branch 'master' into feature/configurable-placement-timeout
dapr-bot Oct 5, 2024
6268010
Merge branch 'master' into feat-scheduler-metrics
dapr-bot Oct 5, 2024
ea83e5a
Merge branch 'master' into fix-jobs-key-path
dapr-bot Oct 5, 2024
94fe7b9
fix: runtime outputs memory address on startup for metrics spec (#8169)
SpiffyEight77 Oct 7, 2024
1ec6b6e
Merge branch 'master' into feature/configurable-placement-timeout
dapr-bot Oct 7, 2024
8f641a5
Merge branch 'master' into feat-scheduler-metrics
dapr-bot Oct 7, 2024
2bf65e2
Merge branch 'master' into fix-jobs-key-path
dapr-bot Oct 7, 2024
570eef7
Merge branch 'master' into protoc-version-25.4
JoshVanL Oct 7, 2024
bd0428b
Changes max disseminate delay to 3 seconds
elena-kolevska Oct 7, 2024
8b92cf5
updates docs
elena-kolevska Oct 7, 2024
e163e8c
Guaranteed FIFO invocation for actors (#8139)
elena-kolevska Oct 8, 2024
4864051
Merge branch 'master' into feat-scheduler-metrics
dapr-bot Oct 8, 2024
cb79aed
Merge branch 'master' into fix-jobs-key-path
dapr-bot Oct 8, 2024
bb2b017
Merge branch 'master' into feature/configurable-placement-timeout
elena-kolevska Oct 8, 2024
46a8d74
Merge branch 'master' into protoc-version-25.4
JoshVanL Oct 8, 2024
9432820
Set permissions to all workflows (try and error) (#8177)
artursouza Oct 9, 2024
1a5c5d4
Merge branch 'master' into feature/configurable-placement-timeout
dapr-bot Oct 9, 2024
519f5a8
Merge branch 'master' into feat-scheduler-metrics
dapr-bot Oct 9, 2024
f684253
Merge branch 'master' into fix-jobs-key-path
dapr-bot Oct 9, 2024
2295274
Merge branch 'master' into protoc-version-25.4
dapr-bot Oct 9, 2024
30e0e59
Apply suggestions from code review
cicoyle Oct 9, 2024
1f01043
Adds golang/govulncheck-action@v1 PR action (#8179)
JoshVanL Oct 9, 2024
2829001
Merge branch 'master' into feature/configurable-placement-timeout
dapr-bot Oct 9, 2024
b228a66
Merge branch 'master' into feat-scheduler-metrics
dapr-bot Oct 9, 2024
742d6f0
Merge branch 'master' into fix-jobs-key-path
dapr-bot Oct 9, 2024
3e75a48
Merge branch 'master' into protoc-version-25.4
dapr-bot Oct 9, 2024
f564ac2
update based on PR feedback
cicoyle Oct 9, 2024
1f316d9
rm unused import & fix e2e with deprecated field
cicoyle Oct 9, 2024
88bcdf2
Add CodeQL as static analysis (#8182)
artursouza Oct 9, 2024
8ccf903
Merge branch 'master' into feature/configurable-placement-timeout
dapr-bot Oct 9, 2024
fc23d67
Merge branch 'master' into feat-scheduler-metrics
dapr-bot Oct 9, 2024
0ed870e
Merge branch 'master' into fix-jobs-key-path
dapr-bot Oct 9, 2024
7bef700
Merge branch 'master' into protoc-version-25.4
dapr-bot Oct 9, 2024
cd2327b
updates per PR feedback
cicoyle Oct 9, 2024
c180836
add client.withprefix to etcd get by default
cicoyle Oct 9, 2024
912dff5
rm //nolint:mnd
cicoyle Oct 9, 2024
e13f0e4
rm appID label from metric
cicoyle Oct 9, 2024
3d35d28
fix e2e - update deprecated field (#8183)
cicoyle Oct 9, 2024
b428fe4
Merge branch 'master' into feature/configurable-placement-timeout
dapr-bot Oct 9, 2024
e080f53
Merge branch 'master' into feat-scheduler-metrics
dapr-bot Oct 9, 2024
ed2826f
Merge branch 'master' into fix-jobs-key-path
dapr-bot Oct 9, 2024
755d5eb
Merge branch 'master' into protoc-version-25.4
dapr-bot Oct 9, 2024
e581aa1
update comment
cicoyle Oct 10, 2024
1ba035c
Merge branch 'master' into fix-flaky-int-tests
cicoyle Oct 10, 2024
f5e9c3f
add ignore-missing flag to see if it fixes e2e failures
cicoyle Oct 10, 2024
53e572d
rm dup
cicoyle Oct 10, 2024
a1b7401
rm extra diff
cicoyle Oct 10, 2024
28bcf46
revert e2e change that didnt work
cicoyle Oct 10, 2024
0b69f6a
fix broken packages when freeing disk space (#8187)
yaron2 Oct 10, 2024
a498a32
Merge branch 'master' into feature/configurable-placement-timeout
dapr-bot Oct 10, 2024
c55a100
Merge branch 'master' into feat-scheduler-metrics
dapr-bot Oct 10, 2024
0abc857
Merge branch 'master' into fix-jobs-key-path
dapr-bot Oct 10, 2024
5ec60b2
Merge branch 'master' into protoc-version-25.4
dapr-bot Oct 10, 2024
eac8138
Merge branch 'master' into fix-flaky-int-tests
cicoyle Oct 10, 2024
1502e3b
Add role support to conversational api (#8186)
yaron2 Oct 10, 2024
2e01f94
Merge branch 'master' into feature/configurable-placement-timeout
dapr-bot Oct 10, 2024
93edab5
Merge branch 'master' into feat-scheduler-metrics
dapr-bot Oct 10, 2024
b67bba3
Merge branch 'master' into fix-jobs-key-path
dapr-bot Oct 10, 2024
dbe65be
Merge branch 'master' into protoc-version-25.4
dapr-bot Oct 10, 2024
c3aacef
Merge branch 'master' into fix-flaky-int-tests
artursouza Oct 10, 2024
4f642d5
mv metrics var into assert eventually
cicoyle Oct 10, 2024
2527b7b
Merge pull request #8015 from elena-kolevska/feature/configurable-pla…
JoshVanL Oct 11, 2024
dda3c0d
Merge branch 'master' into fix-flaky-int-tests
dapr-bot Oct 11, 2024
60fa683
Merge branch 'master' into feat-scheduler-metrics
dapr-bot Oct 11, 2024
88c532d
Merge branch 'master' into fix-jobs-key-path
dapr-bot Oct 11, 2024
264b888
Merge branch 'master' into protoc-version-25.4
dapr-bot Oct 11, 2024
78e5cfd
Add PII scrubbing to conversational api (#8191)
yaron2 Oct 11, 2024
5fe166a
Merge branch 'master' into fix-flaky-int-tests
dapr-bot Oct 11, 2024
1dc50f6
Merge branch 'master' into feat-scheduler-metrics
dapr-bot Oct 11, 2024
db5c132
Merge branch 'master' into fix-jobs-key-path
dapr-bot Oct 11, 2024
21c6fb1
Merge branch 'master' into protoc-version-25.4
dapr-bot Oct 11, 2024
5e3feae
Merge pull request #8158 from cicoyle/fix-jobs-key-path
JoshVanL Oct 14, 2024
00002fd
Merge branch 'master' into fix-flaky-int-tests
dapr-bot Oct 14, 2024
2b574c3
Merge branch 'master' into protoc-version-25.4
dapr-bot Oct 14, 2024
39777fd
merge conflicts + rm ns
cicoyle Oct 14, 2024
bb68a29
Merge pull request #7982 from cicoyle/fix-flaky-int-tests
JoshVanL Oct 14, 2024
66bd9da
Merge branch 'master' into feat-scheduler-metrics
artursouza Oct 14, 2024
7d6a4d0
Merge branch 'master' into protoc-version-25.4
dapr-bot Oct 14, 2024
687af01
assert eventually to give time for CI
cicoyle Oct 14, 2024
681a30d
give grace to a test for CI env
cicoyle Oct 14, 2024
96bf8e3
Integration Test: PII: use JSON equal for json string assertion (#8195)
JoshVanL Oct 14, 2024
8b82ea1
docs: fix upgrade dapr with helm link (#8162)
znd4 Oct 14, 2024
dc5a4e1
update path for job key path
cicoyle Oct 14, 2024
77f7c8f
Merge branch 'master' into feat-scheduler-metrics
dapr-bot Oct 14, 2024
2c2bbc3
Merge branch 'master' into protoc-version-25.4
dapr-bot Oct 14, 2024
4934846
Disable some checks in master branch. (#8200)
artursouza Oct 15, 2024
3372d6d
Add LLM temperature support (#8199)
yaron2 Oct 15, 2024
c13daac
Merge branch 'master' into feat-scheduler-metrics
dapr-bot Oct 15, 2024
93d3b64
Merge branch 'master' into protoc-version-25.4
dapr-bot Oct 15, 2024
6b46daa
further fine tuning
cicoyle Oct 15, 2024
54d5e05
try fixing borked e2e
cicoyle Oct 15, 2024
9afe64c
try fixing standalone validation
cicoyle Oct 15, 2024
d857ad1
Merge pull request #8134 from cicoyle/feat-scheduler-metrics
JoshVanL Oct 15, 2024
d163925
Merge branch 'master' into fix-perf-again
JoshVanL Oct 15, 2024
63f23f9
install numpy too
cicoyle Oct 15, 2024
04e22a3
update pip & install pkgs globally instead of venv
cicoyle Oct 15, 2024
d6380bb
install requests
cicoyle Oct 15, 2024
28555e0
// -> # for commented line
cicoyle Oct 15, 2024
435dda1
match only installed version of powershell
cicoyle Oct 15, 2024
6baedbd
Scheduler: ListJobs API
JoshVanL Sep 27, 2024
645809d
Linting
JoshVanL Oct 3, 2024
3d6136b
Fix unit tests
JoshVanL Oct 3, 2024
4bb0d4b
[1.14] HTTP API: Remove "github.com/valyala/fasthttp" (#8091)
JoshVanL Oct 15, 2024
6bd574f
Merge pull request #8202 from cicoyle/fix-perf-again
JoshVanL Oct 15, 2024
ed7462b
Merge branch 'master' into scheduler-api-listjobs
JoshVanL Oct 15, 2024
6312166
Scheduler e2e Tests (#8150)
cicoyle Oct 15, 2024
7a350a7
Merge branch 'master' into scheduler-api-listjobs
dapr-bot Oct 15, 2024
0a8efcb
Merge branch 'master' into protoc-version-25.4
dapr-bot Oct 15, 2024
fd9d402
Merge pull request #8157 from JoshVanL/scheduler-api-listjobs
JoshVanL Oct 15, 2024
0503fc5
Merge branch 'master' into protoc-version-25.4
dapr-bot Oct 16, 2024
8500327
Scheduler: Adds Kubernetes namespace controller
JoshVanL Sep 1, 2024
ef21d25
Fix namespace controller integration tests
JoshVanL Sep 8, 2024
ebf1c69
Adds Eventually for getting KV for reminder registration
JoshVanL Sep 9, 2024
91ac8c2
add keepalives to public api grpc server (#8204)
famarting Oct 16, 2024
e31479b
Merge branch 'master' into protoc-version-25.4
dapr-bot Oct 16, 2024
a0747bd
Merge pull request #8161 from JoshVanL/protoc-version-25.4
JoshVanL Oct 16, 2024
fd7457f
Update diagridio/go-etcd-cron to v0.3.0
JoshVanL Sep 10, 2024
5df95cb
Increase timeout for job be in Etcd
JoshVanL Sep 18, 2024
28d4927
Linting
JoshVanL Oct 4, 2024
ff0e423
Adds informer waits for scheduler namespace informer
JoshVanL Oct 8, 2024
743f4f4
Use filepath join for Etcd get path to account for windows
JoshVanL Oct 8, 2024
2f3d97c
Review comments
JoshVanL Oct 10, 2024
0182c0f
Fix scheduler trigger metrics
JoshVanL Oct 16, 2024
4da728c
Merge branch 'master' into scheduler-server-controller-namespace
JoshVanL Oct 16, 2024
672d49f
go mod tidy
JoshVanL Oct 16, 2024
db3d10e
Construct Etcd key paths manually, instead of legacy filepath.Join
JoshVanL Oct 16, 2024
3138e09
Register LLM components (#8206)
yaron2 Oct 17, 2024
99a76b7
Merge branch 'master' into scheduler-server-controller-namespace
JoshVanL Oct 17, 2024
027155e
Fixes flaky `scheduler/idtype` and `TestMonitorLeadership` tests (#7973)
elena-kolevska Oct 17, 2024
77b5022
Merge pull request #8039 from JoshVanL/scheduler-server-controller-na…
JoshVanL Oct 17, 2024
2cbded5
Fix flakey raft ha test (#8197)
elena-kolevska Oct 18, 2024
990aa6e
overwrite dapr-api-token when sending local instead of appending (#8173)
vermillionsword Oct 18, 2024
686e061
Actors: Reminder migration state->scheduler
JoshVanL Oct 19, 2024
12fafc0
Skip sqlite process on windows due to limitation
JoshVanL Oct 21, 2024
69e8e53
Move htarget ready to outside of placement update ch
JoshVanL Oct 21, 2024
1fa8e7c
Fix migration integration test
JoshVanL Oct 22, 2024
2b0614e
Moved priority class declaration in the right position of manifests (…
m3nax Oct 22, 2024
81cd0a7
Adds actor reminder scheduler to actor state store
JoshVanL Oct 22, 2024
bbb8155
Always set actor runtime health ready on init
JoshVanL Oct 22, 2024
93b34e4
Merge branch 'master' into actors-scheduler-reminder-state-migration
JoshVanL Oct 23, 2024
2b76820
chore: fix some function names in comment (#8215)
davidwoood Oct 23, 2024
c94df57
Writer keeps retrying
elena-kolevska Oct 23, 2024
64429ee
Merge branch 'master' into actors-scheduler-reminder-state-migration
dapr-bot Oct 23, 2024
488b4b6
Ensure dapr-api-token gets removed from metadata after validaton (#8219)
yaron2 Oct 23, 2024
ea4dc74
Merge branch 'master' into actors-scheduler-reminder-state-migration
dapr-bot Oct 23, 2024
297bff5
temp disable scheduler actor reminder e2e test before staging queue
JoshVanL Oct 24, 2024
acc274f
Adds cleanup to distributed run
JoshVanL Oct 24, 2024
5a48b79
Scheduler: Updates cron library to include staging queue
JoshVanL Oct 22, 2024
53c4017
Re-enable e2e actor reminder tests with scheduler as staging queue added
JoshVanL Oct 24, 2024
125d13d
Merge pull request #8217 from JoshVanL/actors-scheduler-reminder-stat…
JoshVanL Oct 24, 2024
16892bc
Merge branch 'master' into scheduler-update-cron-staging
JoshVanL Oct 24, 2024
bfcbabd
Revert error log used for debugging
JoshVanL Oct 24, 2024
6fa4d31
Re-remove actor reminder scheduler e2e tests
JoshVanL Oct 24, 2024
020c77e
Merge branch 'release-1.14'
elena-kolevska Oct 24, 2024
b2db94b
Linter
elena-kolevska Oct 24, 2024
7aa6d31
Merge remote-tracking branch 'upstream/master'
elena-kolevska Oct 24, 2024
92efe94
Provide ability to configure dapr grpc ports through dapr pod annotat…
passuied Oct 24, 2024
5840b47
Merge branch 'master' into scheduler-update-cron-staging
JoshVanL Oct 25, 2024
99845eb
feat: new resiliency metric for CircuitBreakerState (last_value / gau…
jake-engelberg Oct 29, 2024
0a9f266
ci(kind-e2e): upgrade k8s to 1.31/1.30/1.29 and bumps kind-action (#8…
mikeee Oct 29, 2024
65ad4cd
Remove architecture in node affinity to test DBs (#7992)
antontroshin Oct 29, 2024
805f781
Merge branch 'master' into scheduler-update-cron-staging
JoshVanL Oct 29, 2024
e286015
Merge pull request #8220 from JoshVanL/scheduler-update-cron-staging
JoshVanL Oct 29, 2024
150f1db
Scheduler: Expose FailurePolicy on internal API
JoshVanL Oct 22, 2024
bfc7e9d
Merge branch 'master' into master
elena-kolevska Oct 30, 2024
c6f04f0
Review comments
JoshVanL Oct 30, 2024
284211f
Merge pull request #8222 from JoshVanL/scheduler-api-failure-policy
JoshVanL Oct 30, 2024
d697612
Propagate trace inforation from incoming headers (#7932)
evhen14 Oct 31, 2024
07ed8d4
Jobs: Return Job execution SUCCESS/FAILURE (#8240)
JoshVanL Nov 4, 2024
334ae9e
Renaming conversation types to exclude "Alpha1" (#8250)
WhitWaldo Nov 4, 2024
df2e9a2
Support alpha releases (pre-RC) (#8267)
artursouza Nov 6, 2024
d4a7138
Removes integration tests log spam
elena-kolevska Nov 7, 2024
90b2019
linter
elena-kolevska Nov 7, 2024
acb2613
Merge pull request #8269 from elena-kolevska/nolog
JoshVanL Nov 7, 2024
3efd528
Add a resource reporter
lrascao Nov 7, 2024
2b7872a
fixup! Add a resource reporter
lrascao Nov 7, 2024
8ab2ff1
fixup! Add a resource reporter
lrascao Nov 7, 2024
88e2579
fixup! Add a resource reporter
lrascao Nov 7, 2024
d35d347
fixup! Add a resource reporter
lrascao Nov 7, 2024
f33b5f6
Merge branch 'master' into master
elena-kolevska Nov 7, 2024
1ff86c4
Updates test after code change
elena-kolevska Nov 7, 2024
f5696ca
Merge pull request #8268 from lrascao/component-reporter
JoshVanL Nov 8, 2024
654cae0
Moves check to “eventually”
elena-kolevska Nov 11, 2024
1da5813
Merge branch 'master' into writecloser
elena-kolevska Nov 11, 2024
9c40837
linter
elena-kolevska Nov 11, 2024
42818c7
small simplification
elena-kolevska Nov 11, 2024
b60d216
Merge branch 'master' into master
elena-kolevska Nov 11, 2024
e628128
Merge pull request #8274 from elena-kolevska/writecloser
JoshVanL Nov 12, 2024
40912e3
Merge branch 'master' into master
elena-kolevska Nov 13, 2024
30d88df
Fix CVE GO-2024-3250 bump github.com/diagridio/go-etcd-cron
antontroshin Nov 14, 2024
b1184d9
go mod tidy
antontroshin Nov 14, 2024
945ba74
Skip Scheduler Reconnect Test on Windows
antontroshin Nov 15, 2024
e4a670e
Merge pull request #8281 from antontroshin/fix-CVE-GO-2024-3250
JoshVanL Nov 15, 2024
f18398b
Merge branch 'master' into skip-scheduler-windows-reconnect-test
JoshVanL Nov 15, 2024
62cc2ce
Merge pull request #8282 from antontroshin/skip-scheduler-windows-rec…
JoshVanL Nov 15, 2024
071ce2b
Merge branch 'master' into master
elena-kolevska Nov 18, 2024
24535ad
Add support for test framework to run with local Kind cluster (#8000)
antontroshin Nov 18, 2024
f1c269f
sftp component register (#8263)
arslanmusta Nov 18, 2024
98d5bdb
chore: add logging to dapr-bot script (#8260)
mikeee Nov 18, 2024
72ce350
Continuation of resiliency filter based on http code (#8252)
antontroshin Nov 18, 2024
f8824c5
Merge branch 'master' into master
elena-kolevska Nov 18, 2024
0178722
Merge pull request #8237 from elena-kolevska/master
artursouza Nov 18, 2024
b3c1e23
Fix permission to publish GHCR images. (#8287)
artursouza Nov 18, 2024
39383e3
Fix another permission problem to push to GHCR. (#8289)
artursouza Nov 19, 2024
8958c13
do not ingore dlq errors (#8291)
evhen14 Nov 20, 2024
103d5b0
Don't publish alpha release to GitHub (#8293)
artursouza Nov 20, 2024
315bdcc
Adds unit tests for different circuit breaker trip expressions (#8257)
elena-kolevska Nov 20, 2024
22feaa0
Unregister actor in placement (#8264)
elena-kolevska Nov 20, 2024
c86a77f
Remove useless retry matching test that caused panic in test app (#8300)
antontroshin Nov 20, 2024
b5d83e5
use dapr_scheduler.ha to allow for scaling independently of the globa…
cicoyle Nov 21, 2024
780bf8b
Increase graceful shutdown duration for state components shutdown tes…
antontroshin Nov 22, 2024
776209e
Mark Workflow API Alpha as deprecated (#8299)
antontroshin Nov 25, 2024
5594351
make WorkflowStateMetadata public struct (#8314)
famarting Nov 27, 2024
b2fc1d8
Dissalow running Scheduler with ephemeral storage when in HA mode (#8…
elena-kolevska Nov 27, 2024
19fc533
Updated the default value of app.kubernetes.io/managed-by from "helm"…
m3nax Nov 27, 2024
fdd642e
Metric Error Codes Recording + Error Code Prefixing (#8256)
jake-engelberg Nov 27, 2024
24ac3b8
processor: fix waitgroup panic (#8307)
lrascao Nov 28, 2024
34f0b87
Stop nightly buids and remove longhaul update.
artursouza Dec 2, 2024
6c488fd
Merge pull request #8325 from artursouza/clean_dapr_release
JoshVanL Dec 2, 2024
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
80 changes: 65 additions & 15 deletions tests/apps/schedulerapp/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,30 +59,32 @@ var (
jobsMutex sync.Mutex
)

func scheduleJobHTTP(name string, jsonValue []byte) (int, error) {
log.Printf("Scheduling job named: %s", name)

url := fmt.Sprintf("http://localhost:%d/v1.0-alpha1/jobs/%s", daprPortHTTP, name)

func makeHTTPCall(jobName string, body []byte, methodType string) ([]byte, int, error) {
url := fmt.Sprintf("http://localhost:%d/v1.0-alpha1/jobs/%s", daprPortHTTP, jobName)
ctx, cancel := context.WithTimeout(context.Background(), 30*time.Second)
defer cancel()

req, err := http.NewRequestWithContext(ctx, http.MethodPost, url, bytes.NewBuffer(jsonValue))
req, err := http.NewRequestWithContext(ctx, methodType, url, bytes.NewBuffer(body))
if err != nil {
return 0, err
return nil, 0, err
}

req.Header.Set("Content-Type", "application/json")

resp, err := httpClient.Do(req)
if err != nil {
if resp != nil {
return resp.StatusCode, err
return nil, resp.StatusCode, err
}
return http.StatusInternalServerError, err
return nil, http.StatusInternalServerError, err
}
defer resp.Body.Close()
return resp.StatusCode, nil

respBody, err := io.ReadAll(resp.Body)
if err != nil {
return nil, resp.StatusCode, err
}

return respBody, resp.StatusCode, nil
}

// scheduleJobHandler is to schedule a job with the Daprd sidecar
Expand All @@ -92,19 +94,20 @@ func scheduleJobHandler(w http.ResponseWriter, r *http.Request) {
jobName := vars["name"]

// Extract job data from the request body
var jobData job
if err := json.NewDecoder(r.Body).Decode(&jobData); err != nil {
var j job
if err := json.NewDecoder(r.Body).Decode(&j); err != nil {
http.Error(w, fmt.Sprintf("error decoding JSON: %v", err), http.StatusBadRequest)
return
}

jsonData, err := json.Marshal(jobData)
jsonData, err := json.Marshal(j)
if err != nil {
http.Error(w, fmt.Sprintf("error encoding JSON: %v", err), http.StatusInternalServerError)
return
}

statusCode, err := scheduleJobHTTP(jobName, jsonData)
log.Printf("Scheduling job named: %s", jobName)
_, statusCode, err := makeHTTPCall(jobName, jsonData, http.MethodPost)
if err != nil {
http.Error(w, fmt.Sprintf("error scheduling job: %v", err), statusCode)
return
Expand Down Expand Up @@ -145,6 +148,47 @@ func getTriggeredJobs(w http.ResponseWriter, r *http.Request) {
}
}

// deleteJobHandler is to delete a job with the Daprd sidecar
func deleteJobHandler(w http.ResponseWriter, r *http.Request) {
// Extract the job name from the URL path parameters
vars := mux.Vars(r)
jobName := vars["name"]

log.Printf("Deleting job named: %s", jobName)
_, statusCode, err := makeHTTPCall(jobName, nil, http.MethodDelete)
if err != nil {
http.Error(w, fmt.Sprintf("error scheduling job: %v", err), statusCode)
return
}
w.WriteHeader(statusCode)
}

// getJobHandler is to get a job from the Daprd sidecar
func getJobHandler(w http.ResponseWriter, r *http.Request) {
// Extract the job name from the URL path parameters
vars := mux.Vars(r)
jobName := vars["name"]

log.Printf("Getting job named: %s", jobName)
responseBody, statusCode, err := makeHTTPCall(jobName, nil, http.MethodGet)
if err != nil {
http.Error(w, fmt.Sprintf("error scheduling job: %v", err), statusCode)
return
}

// Write the response body
if statusCode == http.StatusOK {
w.Header().Set("Content-Type", "application/json")
w.WriteHeader(statusCode)
_, err := w.Write(responseBody)
if err != nil {
log.Printf("failed to write response body: %s", err)
}
} else {
w.WriteHeader(statusCode)
}
}

// jobHandler is to receive the job at trigger time
func jobHandler(w http.ResponseWriter, r *http.Request) {
reqBody, err := io.ReadAll(r.Body)
Expand Down Expand Up @@ -179,7 +223,13 @@ func appRouter() http.Handler {
// Log requests and their processing time
router.Use(utils.LoggerMiddleware)

// schedule the job to the daprd sidecar
router.HandleFunc("/scheduleJob/{name}", scheduleJobHandler).Methods(http.MethodPost)
// get the scheduled job from the daprd sidecar
router.HandleFunc("/getJob/{name}", getJobHandler).Methods(http.MethodGet)
// delete the job from the daprd sidecar
router.HandleFunc("/deleteJob/{name}", deleteJobHandler).Methods(http.MethodDelete)

// receive triggered job from daprd sidecar
router.HandleFunc("/job/{name}", jobHandler).Methods(http.MethodPost)
// get the triggered jobs back for testing purposes
Expand Down
Loading