<feed xmlns='http://www.w3.org/2005/Atom'>
<title>awwan/testdata/http_server/execute, branch main</title>
<subtitle>Configuration management software, scriptable shell with SSH support.</subtitle>
<id>http://git.kilabit.info/awwan/atom?h=main</id>
<link rel='self' href='http://git.kilabit.info/awwan/atom?h=main'/>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/awwan/'/>
<updated>2026-02-06T00:08:29Z</updated>
<entry>
<title>all: improve the Server-Sent Events (SSE) output</title>
<updated>2026-02-06T00:08:29Z</updated>
<author>
<name>Shulhan</name>
<email>ms@kilabit.info</email>
</author>
<published>2026-02-06T00:08:29Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/awwan/commit/?id=54d395f53e344a3cf3861c0e3d2f82ad14ecc602'/>
<id>urn:sha1:54d395f53e344a3cf3861c0e3d2f82ad14ecc602</id>
<content type='text'>
In the ExecResponse, store the event in the Output instead of message
data, so the server can iterate the Output directly and pass it to
WriteEvent directly.

The event ID now start at 1 with type "begin".
This is to minimize confusion when comparing empty Last-Event-ID from
client, which is equal to 0.
</content>
</entry>
<entry>
<title>all: use space log prefix instead of dummy date</title>
<updated>2026-02-05T20:50:24Z</updated>
<author>
<name>Shulhan</name>
<email>ms@kilabit.info</email>
</author>
<published>2026-02-05T20:50:24Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/awwan/commit/?id=a3c27356bfe3e56809f579b617e02829a7ea0a68'/>
<id>urn:sha1:a3c27356bfe3e56809f579b617e02829a7ea0a68</id>
<content type='text'>
Using dummy date make the test output hard to read in verbose option,
because the program logs mixed with the test logs.
</content>
</entry>
<entry>
<title>all: implement HTTP API to stop local or play execution</title>
<updated>2023-12-21T20:08:04Z</updated>
<author>
<name>Shulhan</name>
<email>ms@kilabit.info</email>
</author>
<published>2023-12-21T19:57:21Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/awwan/commit/?id=aa64efe9e8957da6c122f9decaaa78dca83d14ee'/>
<id>urn:sha1:aa64efe9e8957da6c122f9decaaa78dca83d14ee</id>
<content type='text'>
The HTTP API for stopping execution have the following signature,

	DELETE /awwan/api/execute?id=&lt;string&gt;

If the ID is exist, the execution will be cancelled and return HTTP
status 200 with the following body,

	Content-Type: application/json
	{
		"code": 200,
	}

Otherwise it will return HTTP status 404 with error message.

References: https://todo.sr.ht/~shulhan/awwan/9
</content>
</entry>
<entry>
<title>all: changes default date-time prefix on test</title>
<updated>2023-12-21T09:38:29Z</updated>
<author>
<name>Shulhan</name>
<email>ms@kilabit.info</email>
</author>
<published>2023-12-21T09:38:29Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/awwan/commit/?id=3e1bdaf0cdb3f9087fe36e15da704ace8f38466c'/>
<id>urn:sha1:3e1bdaf0cdb3f9087fe36e15da704ace8f38466c</id>
<content type='text'>
Using "-" as dummy date-time prefix make the test output quite hard
to read, especially since we use the same prefix "===" and "---" with Go
test output.
</content>
</entry>
<entry>
<title>testdata/http_server: fix missing .ssh directory on execute</title>
<updated>2023-12-20T10:23:36Z</updated>
<author>
<name>Shulhan</name>
<email>ms@kilabit.info</email>
</author>
<published>2023-12-20T10:23:36Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/awwan/commit/?id=c2dc32980d138564bf77d5866f1cd3c086bed100'/>
<id>urn:sha1:c2dc32980d138564bf77d5866f1cd3c086bed100</id>
<content type='text'>
The execute directory is used as base directory of awwan during
testing APIExecute.
</content>
</entry>
<entry>
<title>all: write the output as is when sending with server-sent events</title>
<updated>2023-12-03T17:20:30Z</updated>
<author>
<name>Shulhan</name>
<email>ms@kilabit.info</email>
</author>
<published>2023-12-02T17:38:56Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/awwan/commit/?id=775af78cc6c8ebe9e258b81dd9442bbe6b8b36d4'/>
<id>urn:sha1:775af78cc6c8ebe9e258b81dd9442bbe6b8b36d4</id>
<content type='text'>
Previously, if the command output is "line1\n\nline2\n", the web output
it as

  line1
  line2

it should be

  line1

  line2

This fix the empty line not displayed in wui output.
</content>
</entry>
<entry>
<title>all: move wrapping BEGIN and END outside of session</title>
<updated>2023-12-01T06:17:30Z</updated>
<author>
<name>Shulhan</name>
<email>ms@kilabit.info</email>
</author>
<published>2023-11-29T19:50:50Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/awwan/commit/?id=cf9fdc1387b7cf33f16fe95ef4bef55c9c008f80'/>
<id>urn:sha1:cf9fdc1387b7cf33f16fe95ef4bef55c9c008f80</id>
<content type='text'>
</content>
</entry>
<entry>
<title>all: remove script name in the log prefix</title>
<updated>2023-12-01T06:17:30Z</updated>
<author>
<name>Shulhan</name>
<email>ms@kilabit.info</email>
</author>
<published>2023-11-29T16:26:28Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/awwan/commit/?id=fa3683edd2d986a26de85479b8a1c2535d069c15'/>
<id>urn:sha1:fa3683edd2d986a26de85479b8a1c2535d069c15</id>
<content type='text'>
Since each execution now logged in the file with ".log" extension,
there is no need to prefix it with script name again, because its
redundant.
</content>
</entry>
<entry>
<title>all: handle reconnecting when streaming execution</title>
<updated>2023-12-01T06:17:30Z</updated>
<author>
<name>Shulhan</name>
<email>ms@kilabit.info</email>
</author>
<published>2023-11-27T12:11:56Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/awwan/commit/?id=22ad970d426c07bb36c3f71856ba16183377a5f4'/>
<id>urn:sha1:22ad970d426c07bb36c3f71856ba16183377a5f4</id>
<content type='text'>
In "/awwan/api/execute/tail" SSE endpoint, in order for client to be able
to reconnect and start streaming from the last know output, we need to
send the ID for each message that we send.
The ID is the index of Output in slice.
If client does not send Last-Event-ID, we send all Output from beginning,
otherwise, we send only message start from index in Last-Event-ID.
</content>
</entry>
<entry>
<title>all: implement HTTP API to fetch execution output by ID</title>
<updated>2023-12-01T06:17:30Z</updated>
<author>
<name>Shulhan</name>
<email>ms@kilabit.info</email>
</author>
<published>2023-11-26T14:44:10Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/awwan/commit/?id=d46473cf2d8b224443352c6d5f617a64312af793'/>
<id>urn:sha1:d46473cf2d8b224443352c6d5f617a64312af793</id>
<content type='text'>
The new API is "GET /awwan/api/execute/tail" that implement Server-sent
events, not a normal GET request.
Its accept the query parameter "id" with value is the execution ID
from "/awwan/api/execute".

Once called with valid ID, it will streaming the command output
to client.

By using this new API, the WUI can receive the output of command
immediately without waiting for all commands to be completed.

Implements: https://todo.sr.ht/~shulhan/awwan/5
Signed-off-by: Shulhan &lt;ms@kilabit.info&gt;
</content>
</entry>
</feed>
