| Age | Commit message (Collapse) | Author |
|
When the Play command executed from the web user interface, there is a
possibility that concurrent requests set the sshConfig field in Awwan
struct at the same time.
In the integration tests for TestAwwan_Play_withLocal and
TestExecLocal_sudo, the data race happens when writing to the same
buffer for stdout and stderr, so we split them into separate buffers.
There is also data race in SSE connection, when handler for ExecuteTail
write to the same buffer with worker keep alive.
This has been fixed on pakakeh.go module.
|
|
|
|
In the test for AwwanLocal, use buffer with lock, so each write and
read is safe.
In the httpServer, the test found data race during ExecuteTail when
accessing [ExecResponse.EndAt].
We fix it by locking the resource during call to end() and when
accessing the EndAt field.
|
|
|
|
In the mkosi 25.3 the environment variable $MKOSI_UID now using subuid,
which return 0 if we have subuid "<user>:100000:65536".
The mkosi.nspawn is not imported to the build directory, so we need to
copy it from source.
|
|
The fieldalignment and shadow is a linter from golang.org/x/tools.
This program actually have an API that can be used.
The pakakeh.go/lib/goanalysis wrap those APIs into a single function
call that can be run inside a main.
This minimize and simplified our tools dependencies.
|
|
The latest mkosi use importctl instead of machinectl to import the
image.
There is an issue in mkosi.conf where build with Format=tar always get
compressed using zstd, but importctl unable to import it, so we need
to set CompressOutput=false.
The home directory mode needs to be set to open 0755, because now its
default to 0700, which makes the test failed to read file on others
user's home.
The pacman mirror changes to public one that is always available,
geo.mirror.pkgbuild.com.
The BUG_REPORT_URL in os-release for Arch changes which we need to
modify because its included in the test-container.
|
|
We are not happy with this linter, it create an illussion of works
rather than fixing real issues.
The golangci-lint does not works on gotip and its become
red herring and subjective rather than correctness.
|
|
|
|
The name "play" imply that the service is to run awwan script, while
the "tour" is to guide the new user to use awwan WUI, since its contains
the tutorial.
|
|
In case we have a script that manage local host and remote server,
calling "play" on "#local" lines only always open the connection to remote
server.
To minimize opening unused connections, let the "#local" command works
on both commands. Its up to user which part of lines that they want
to execute on remote or local.
|
|
This is to allow using different address when running on local, without
conflict with "serve-www" task in Makefile.
|
|
The _ops/awwan-play is the seed for the awwan playground that will
be live on "play.awwan.org" later.
The image name is awwan-play, to allow us to serve play.awwan.local
on local proxy and test it without port number.
It use the _play directory as workspace.
References: https://todo.sr.ht/~shulhan/awwan/4
|
|
The karajo server is live at build.kilabit.info, triggered by github
webhook.
|
|
This is to group all containers into one directory.
|
|
Instead of building the container multiple times, create it one time only
that importable to the system /var/lib/machines.
So future development can enable or start them manually and run the
test-integration or test-all tasks without rebuilding them again.
This changes require moving the image output to /data/awwan because if
the test image is located under the sub directory of the source
directory and we bind the source directory into container it will cause
recursive mount that makes its impossible to use the image inside
/var/lib/machines.
We also set the network zone to "awwan", to allow multiple containers
shared the same subnet on the host later.
|
|
Previously, this scripts is stored on my personal awwan workspace.
As part of dog feeding, we expose how we manage awwan.org here, so
people can see it as example of how awwan works.
|
|
|
|
For regular machine that only need to install awwan using "make install"
we can ignore this task if its failed.
|
|
Changes,
* The "File" tag now highlighted to distinguish with file name.
* The "Execute" action moved to replace the Output, so we have some
additional horizontal space.
* The "Output" tag removed.
* Fix layout on mobile devices where height is set to static.
|
|
|
|
The task "test-all-mkosi" run both unit and integration tests without
manually login inside to container first.
|
|
|
|
|
|
Since we now have website, the directory name "_www" become misleading.
The actual website files is located under "_www/doc", the "_www" directory
is for web-user interface which includes documentation that has the
same content as our websites.
|
|
Using flag "-dev" is more explicit than using environment variable.
|
|
|
|
ESLint help us to make the code consistent and possible errors in the
future changes.
|
|
The "test-integration" run only test with tags "integration", while
the "test-all" run all tests.
This changes also rewrite how we collect test coverage, by storing
them into a single directory "_coverage" and generate the report using
"go tool covdata" and "go tool cover".
|
|
Previously, when building container, the SSH keys for server and user
are generated automatically.
This makes the SSH keys unpredictable when we need to test SSH function
later (the known_hosts for source and authorized_keys in target).
This changes set the host and user SSH keys manually using "mkosi.extra"
skeleton, so every container build, will have predictable keys.
|
|
The release-tip task build the binary on the current tip of main branch
and upload it to external storage to be consumed by public.
|
|
the www-awwan is static web server, built using ciigo, to serve the
website at awwan.org.
|
|
Since adding support for encryption, running test with "-race" become
quite slow.
All of our code is sequential, no goroutine involved except in
HTTP APIs, so there is no need to run the test with "-race" option, for
now.
|
|
|
|
This is the initial setup as experiments.
All of the steps and settings are documented in
https://kilabit.info/journal/2023/using_systemd_mkosi/ .
|
|
The golangci-lint become unusable.
It does not provide any useful hints on how to write better Go code.
This changes replace golangci-lint with go vet, fieldalignment and shadow
from x/tools, and revive.
The fieldalignment tool provide hints on better struct size.
The shadow tool provide hints on overwriting or shadowed variables.
The revive tool provide hints on many code analysis that does not covered
by go vet, fieldalignment, and shadow.
|
|
|
|
What am I thinking?
|
|
|
|
|
|
See https://kilabit.info/journal/2022/gpl for more information.
|
|
Since we run test using -race, we should set CGO_ENABLED=1, because
user may set this to 0 and cause the test not running.
|
|
Previously, we depends external commands to watch, build, and embed the
files in _www directory for development.
This changes simplify all of this into single command.
To compile the TypeScript files and embed them we just run,
go run ./cmd/awwan build
To run the development server that watch any changes on .ts/.js/.html
files inside _www and rebuild them
AWWAN_DEVELOPMENT=1 go run ./cmd/awwan serve ${AWWAN_WORKSPACE}
|
|
|
|
In order to minimize error when developing with JavaScript we include
the "wui" project as git submodule under "_www/wui". The _www/awwan.ts
and _www/main.ts then import all required libraries directly which will
be compiled into single JavaScript under _www/main.js.
|
|
The web-user interface now have button "Save" that save the edited
content of file to storage.
|
|
The serve comman will run a HTTP server that provide web-user interface
to edit and execute script.
Currently, the web-user interface provide the following features,
* Browsing the workspace
* Running the script on local or remote
|
|
The coverage output will be converted to HTML when all test success.
|
|
|
|
* Makefile: make the default task to build the command
|