all: convert the README to use Markdown format I use two remote repositories: GitHub and SourceHut. GitHub support rendering README using asciidoc while SourceHut not. This cause the repository that use README.adoc rendered as text in SourceHut which make the repository page less readable. Also, the pkg.go.dev now render README but only support Markdown. Since we cannot control the SourceHut and go.dev, the only option is to support converting Markdown in ciigo so I can write README using Markdown and the rest of documentation using Asciidoc.
www/karajo: changes the right status For Job with interval or schedule based show the Next run counter in hours, minutes, and seconds. Other Job type (WebHook) will be display the Last time its executed.
Release karajo v0.7.0 (2023-05-10) This release add login feature to Karajo using user name and password that are pre-defined in the user.conf. === Breaking changes * all: remove MaxRunning and NumRunning from JobBase === New features * all: implement login page === Bug fixes * all: fix possible lock on API environment === Enhancements * all: changes on how the job queued using channel
all: implement login page The karajo status page now moved to /karajo/app/, while the old /karajo/ page is used for login. The login page will be display only if Environment.Users is not empty, otherwise user will be redirected to app page automatically.
all: implement HTTP API for authentication with user's name and password The API for auth login, /karajo/api/auth/login, authenticate user using name and password. A valid user's account will receive authorization cookie named `karajo` that can be used as authorization for subsequent request.
all: split the memory FS initialization into separate method This changes also move the public files into separate directory "public" under testdata, to make it more clear and manageable.
all: split Karajo HTTP server into separate file The idea is to make the code more readable and maintainable in the future.
all: add list of User to Environment The Users field contains list of User that can access web user interface with authentication. The Users can be set from code and optionally loaded from $DirBase/etc/karajo/user.conf if the file exist.
all: un-embed the HTTP server inside the Karajo
all: implement session manager The sessionManage manage creation of new session, getting the existing session, and deleting the session.
all: implement user for authentication with web user interface The list of user can be loaded from file, with the following format [user "$name"] password = $bcrypt_hash The password is set as hash of plain text using bcrypt (version $2a$).
all: fix possible data race on HTTP API Environment This is the fix for 14b1aa3f5fef.
all: remove MaxRunning and NumRunning from JobBase A job should be only run once at a time. If we allow the same job run more than once at the same time, there would be race condition in the command or Call that need to be handled by user.
all: changes on how the job queued using channel Previously, a job run using the following flow: * interval/scheduler timer kicking in * send the job finish to finished channel If the job triggered from HTTP request, it will run on its own goroutine. This changes add third channel, startq, to JobBase that queue the Job. When the timer kicking in or HTTP request received in it will pushed to startq. The startq execute the job and signal the completed job using finishq.
all: remove unnecessary set to now
make: add task to deploy karajo to build.kilabit.info
go.mod: set the minimum Go to version 1.19
all: fix possible lock on API environment Sometimes the request to /karajo/api/environment does not return any result. The only explanation is something lock the resource so we cannot lock it and it will wait forever. Until we found the cause, remove the lock but expect for data race, but the data race should be safe since the API only doing read.
lib/tmpfiles.d: do not recursively set owner and group of /var/lib/karajo Even if the /var/lib/karajo is home of karajo user, the content of those directory may have root files, for example build directory for mkarchchroot.
Release karajo v0.6.0 (2023-03-04) This release add Job scheduler, Job as WebHook, loading Job and JobHttp configuration from directory, and HTTP APIs for pausing and resuming Job. === Breaking changes * all: change the API path to execute Job === New features * all: implement job timer with Scheduler * all: implement Job auth_kind * all: implement loading JobHTTP configuration from separate directory * all: implement loading Job configuration from separate directory * all: implement HTTP API to resume the job execution * all: implement HTTP API to pause a job * all: implement interval based Hook === Enhancements * all: set default DirBase to "/" * all: implement UI to trigger hook manually === Bug fixes * all: fix double checking for isPaused * _www/karajo: fix UI rendering empty hook and with status "Running" === Chores _AUR: add package builder script for Arch Linux