Skip to content

Commit f66e46d

Browse files
committed
refactor: Replace testing HTTP client with the generic one
1 parent eebfd0e commit f66e46d

14 files changed

Lines changed: 93 additions & 92 deletions

File tree

obelisk-external.toml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,11 @@ name = "activity_fly_http"
33
location.oci = "docker.io/getobelisk/components_fly_activity_fly_http:2026-01-10@sha256:4985d2a91d1edcb2312617be37ebb8a4599c886e714b47227c69dbd15c51b2f9"
44
env_vars = ["IGNORE"]
55

6+
# HTTP Client for health checking.
67
[[activity_wasm]]
7-
# For health checking.
8-
name = "activity_http"
9-
location.oci = "docker.io/getobelisk/test_programs_http_get_activity:2025-09-28@sha256:8131d9cafbdf06dbaf7a3b4e629791c9cf3dc1553df9418b34f25ab900b72929"
8+
name = "activity_http_generic"
9+
location.oci = "docker.io/getobelisk/components_activity-http-generic_activity_http_generic:2026-01-12-2@sha256:230b9a90661470aadd75724ebd9c2f8c914b8fe52b850773725e64f3807a4151"
10+
exec.lock_expiry.seconds = 5
1011

1112
[[activity_wasm]]
1213
name = "activity_obelisk_client"

obelisk-local-postgres.toml

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,14 @@ database.postgres.password = "${POSTGRES_PASSWORD}"
77
database.postgres.db_name = "${POSTGRES_DATABASE}"
88
database.postgres.provision_policy = "auto"
99

10-
log.stdout.enabled = true
10+
[log.file]
11+
enabled = true
12+
target = true
13+
level="info"
14+
directory = "."
15+
prefix = "obelisk.log" # File name prefix
1116

1217
[[activity_wasm]]
13-
# For health checking.
1418
name = "activity_fly_http"
1519
location.oci = "docker.io/getobelisk/components_fly_activity_fly_http:2026-01-10@sha256:4985d2a91d1edcb2312617be37ebb8a4599c886e714b47227c69dbd15c51b2f9"
1620
exec.lock_expiry.seconds = 15
@@ -19,12 +23,11 @@ forward_stdout = "stderr"
1923
forward_stderr = "stderr"
2024
max_retries = 6
2125

26+
# HTTP Client for health checking.
2227
[[activity_wasm]]
23-
name = "http_activity"
24-
location.oci = "docker.io/getobelisk/test_programs_http_get_activity:2025-09-28@sha256:8131d9cafbdf06dbaf7a3b4e629791c9cf3dc1553df9418b34f25ab900b72929"
28+
name = "activity_http_generic"
29+
location.oci = "docker.io/getobelisk/components_activity-http-generic_activity_http_generic:2026-01-12-2@sha256:230b9a90661470aadd75724ebd9c2f8c914b8fe52b850773725e64f3807a4151"
2530
exec.lock_expiry.seconds = 5
26-
forward_stdout = "stderr"
27-
forward_stderr = "stderr"
2831

2932
[[activity_wasm]]
3033
name = "activity_obelisk_client"

obelisk-local.toml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
api.listening_addr = "127.0.0.1:5005"
22
webui.listening_addr = "127.0.0.1:8080"
33

4-
log.stdout.enabled = true
54

65
[log.file]
76
enabled = true
@@ -19,13 +18,11 @@ forward_stdout = "stderr"
1918
forward_stderr = "stderr"
2019
max_retries = 6
2120

21+
# HTTP Client for health checking.
2222
[[activity_wasm]]
23-
# For health checking.
24-
name = "activity_http"
25-
location.oci = "docker.io/getobelisk/test_programs_http_get_activity:2025-09-28@sha256:8131d9cafbdf06dbaf7a3b4e629791c9cf3dc1553df9418b34f25ab900b72929"
23+
name = "activity_http_generic"
24+
location.oci = "docker.io/getobelisk/components_activity-http-generic_activity_http_generic:2026-01-12-2@sha256:230b9a90661470aadd75724ebd9c2f8c914b8fe52b850773725e64f3807a4151"
2625
exec.lock_expiry.seconds = 5
27-
forward_stdout = "stderr"
28-
forward_stderr = "stderr"
2926

3027
[[activity_wasm]]
3128
name = "activity_obelisk_client"

obelisk-oci.toml

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,13 @@
11
api.listening_addr = "127.0.0.1:5005"
22
webui.listening_addr = "127.0.0.1:8080"
33

4-
log.stdout.enabled = true
4+
5+
[log.file]
6+
enabled = true
7+
target = true
8+
level="info"
9+
directory = "."
10+
prefix = "obelisk.log" # File name prefix
511

612
[[activity_wasm]]
713
name = "activity_fly_http"
@@ -12,12 +18,11 @@ forward_stdout = "stderr"
1218
forward_stderr = "stderr"
1319
max_retries = 6
1420

21+
# HTTP Client for health checking.
1522
[[activity_wasm]]
16-
name = "http_activity"
17-
location.oci = "docker.io/getobelisk/test_programs_http_get_activity:2025-09-28@sha256:8131d9cafbdf06dbaf7a3b4e629791c9cf3dc1553df9418b34f25ab900b72929"
23+
name = "activity_http_generic"
24+
location.oci = "docker.io/getobelisk/components_activity-http-generic_activity_http_generic:2026-01-12-2@sha256:230b9a90661470aadd75724ebd9c2f8c914b8fe52b850773725e64f3807a4151"
1825
exec.lock_expiry.seconds = 5
19-
forward_stdout = "stderr"
20-
forward_stderr = "stderr"
2126

2227
[[activity_wasm]]
2328
name = "activity_obelisk_client"
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
package obelisk-components:generic-http-obelisk-ext@0.1.0;
2+
3+
interface http {
4+
use obelisk-components:generic-http/http@0.1.0.{method, headers, request-body, response-body, response, request-error};
5+
use obelisk:types/execution@4.0.0.{execution-id};
6+
use obelisk:types/join-set@4.0.0.{join-set};
7+
use obelisk:types/execution@4.0.0.{await-next-extension-error, get-extension-error};
8+
9+
request-submit: func(join-set: borrow<join-set>, method: method, url: string, headers: headers, body: option<request-body>) -> execution-id;
10+
11+
request-await-next: func(join-set: borrow<join-set>) -> result<tuple<execution-id, result<response, request-error>>, await-next-extension-error>;
12+
13+
request-get: func(execution-id: execution-id) -> result<result<response, request-error>, get-extension-error>;
14+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
package obelisk-components:generic-http-obelisk-schedule@0.1.0;
2+
3+
interface http {
4+
use obelisk-components:generic-http/http@0.1.0.{method, headers, request-body, response-body, response, request-error};
5+
use obelisk:types/execution@4.0.0.{execution-id};
6+
use obelisk:types/time@4.0.0.{schedule-at};
7+
8+
request-schedule: func(schedule-at: schedule-at, method: method, url: string, headers: headers, body: option<request-body>) -> execution-id;
9+
}
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
package obelisk-components:generic-http@0.1.0;
2+
3+
interface http {
4+
enum method {
5+
get,
6+
post,
7+
put,
8+
delete,
9+
patch,
10+
head,
11+
options,
12+
}
13+
14+
type headers = list<tuple<string, string>>;
15+
16+
variant request-body {
17+
text(string),
18+
binary(list<u8>),
19+
}
20+
21+
variant response-body {
22+
text(string),
23+
binary(list<u8>),
24+
}
25+
26+
record response {
27+
status-code: u16,
28+
headers: headers,
29+
body: option<response-body>,
30+
}
31+
32+
variant request-error {
33+
execution-failed,
34+
invalid-url(string),
35+
network-error(string),
36+
io-error(string),
37+
}
38+
39+
request: func(method: method, url: string, headers: headers, body: option<request-body>) -> result<response, request-error>;
40+
}

wit/deps/testing_http-obelisk-ext/testing_http-obelisk-ext.wit

Lines changed: 0 additions & 32 deletions
This file was deleted.

wit/deps/testing_http-obelisk-schedule/testing_http-obelisk-schedule.wit

Lines changed: 0 additions & 15 deletions
This file was deleted.

wit/deps/testing_http/testing_http.wit

Lines changed: 0 additions & 21 deletions
This file was deleted.

0 commit comments

Comments
 (0)