Simone Gotti
d3a5fbfe5b
*: update to go 1.16
2021-03-15 15:17:29 +01:00
Simone Gotti
69a5e0fe9b
Merge pull request #258 from sgotti/gitserver_fix_fetchfile_errors
...
gitserver: fix fetchfile error handling
2021-03-15 15:17:13 +01:00
Simone Gotti
f598fd0f4b
gitserver: fix fetchfile error handling
...
since the git command output is redirected to the http response body, the golang
http server automatically adds a 200 status before sending the body. If the git
command fails we cannot return an http error anymore but must close the
connection to let the client know that the request failed.
2021-03-15 13:19:13 +01:00
Simone Gotti
097caaf871
Merge pull request #253 from camandel/remove_waitapprove_if_stopped
...
Remove WaitingApproval for stopped tasks
2021-02-08 10:27:49 +01:00
Carlo Mandelli
45eb092871
Remove WaitingApproval for stopped tasks
2021-02-03 19:45:27 +01:00
Simone Gotti
c3c18e0d2c
Merge pull request #250 from sgotti/fix_example_config_gitserverURL
...
example: fix gitserverURL in example config
2021-01-14 09:13:47 +01:00
Simone Gotti
684216c42e
example: fix gitserverURL in example config
...
The git server needs to be accessed on localhost from the gateway and not from
the host's docker bridge address.
2021-01-13 16:15:51 +01:00
Simone Gotti
e0756d6e61
Merge pull request #249 from ftsell/master
...
add content-type header for /config.js
2020-11-04 00:09:31 +01:00
Finn-Thorben Sell
8cb8973846
add content-type header for /config.js
2020-10-30 19:41:52 +01:00
Simone Gotti
5b9bc38303
Merge pull request #241 from 6543-forks/vendor-gitea-sdk
...
vendor: update gitea sdk v0.11.0 -> 0.12.0
2020-06-10 18:20:13 +02:00
6543
7ffe4fe3be
migrate2
2020-05-22 12:35:05 +02:00
6543
c6f09610f1
migrate
2020-05-22 12:07:53 +02:00
6543
cc52d49d6b
update code.gitea.io/sdk/gitea v0.11.0 -> v0.12.0
2020-05-22 11:49:30 +02:00
Simone Gotti
fa35c77f29
Merge pull request #217 from sgotti/update_to_go_1.14
...
*: update to go 1.14
2020-03-20 22:58:54 +01:00
Simone Gotti
110a0cb5a0
*: update to go 1.14
...
* Update to go 1.14
* Update golangci-lint to v1.23.6 that works with go 1.14
2020-03-20 10:07:46 +01:00
Simone Gotti
486c4b9bcd
Merge pull request #239 from sgotti/config_check_max_config_size
...
config: check max config size
2020-03-20 10:07:23 +01:00
Simone Gotti
8a156b936e
config: check max config size
...
limit config size to 1MiB.
2020-03-17 11:28:25 +01:00
Simone Gotti
23dfbb82e1
Merge pull request #232 from sgotti/starlark_config
...
config: add starlark config support
2020-03-11 10:33:36 +01:00
Simone Gotti
d91ec09d7d
config: add starlark config support
...
Handle `.agola/config.star` files in starlark config format.
To provide a context like done for jsonnet we require that the starlark agola
config file contains a main function that will receive a config context as a
dict.
We also had to implement our own json conversion from a starlark dict since go
starlark removed its own function.
2020-03-10 13:29:20 +01:00
Simone Gotti
714e561c75
Merge pull request #231 from sgotti/run_export_also_ref_type_environment_variable_to_runs
...
run: export also ref type environment variable to runs
2020-03-09 12:09:20 +01:00
Simone Gotti
7094de908b
run: export also ref type environment variable to runs
2020-03-09 10:47:58 +01:00
Simone Gotti
ebf1bdc940
Merge pull request #230 from sgotti/run_export_also_pull_request_id_environment_variable_to_runs
...
run: export also pull request id environment variable to runs
2020-03-09 10:46:11 +01:00
Simone Gotti
627f40987e
run: export also pull request id environment variable to runs
2020-03-09 09:42:51 +01:00
Simone Gotti
ac1b0dcb73
Merge pull request #141 from sgotti/jsonnet_ctx
...
config: provide jsonnet context top level argument
2020-03-06 13:52:52 +01:00
Simone Gotti
1820c0247c
config: provide jsonnet context top level argument
2020-03-06 11:19:49 +01:00
Simone Gotti
bb96418f00
Merge pull request #229 from sgotti/runconfig_disable_password_authentication_in_clone_step
...
runconfig: disable password authentication in clone step
2020-03-06 11:18:16 +01:00
Simone Gotti
e20abf053c
runconfig: disable password authentication in clone step
...
If for some reasons the ssh public key auth fails, avoid the clone step to block
during a git clone waiting for a password.
2020-03-05 16:11:20 +01:00
Simone Gotti
92e509cb3e
Merge pull request #226 from sgotti/runservice_fetcher_correctly_handle_skipped_tasks
...
runservice: correctly handle skipped tasks in fetcher
2020-03-02 17:24:30 +01:00
Simone Gotti
2595bed3d3
Merge pull request #227 from sgotti/github_add_issue_templates_config
...
github: add issue templates config
2020-03-02 14:47:21 +01:00
Simone Gotti
48ba234741
github: add issue templates config
...
Add a config to disable blank issues and show a reference to the Agola community
forum.
2020-03-02 11:04:54 +01:00
Simone Gotti
0e2b01a586
runservice: correctly handle skipped tasks in fetcher
...
skip fetching of tasks with status skipped, not only tasks marked as skip.
This avoid many wrong an noisy logs of type "executor task with id taskid
doesn't exist. This shouldn't happen. Skipping fetching"
2020-03-02 10:40:59 +01:00
Simone Gotti
eb180da914
Merge pull request #225 from sgotti/runservice_fix_handling_of_wrong_executortask_status
...
runservice: fix handling of wrong executortask status
2020-03-02 10:26:32 +01:00
Simone Gotti
4da7c23bb8
Merge pull request #224 from sgotti/executor_use_cancellable_context_in_executetask
...
executor: use cancellable context in executetask
2020-03-02 10:26:16 +01:00
Simone Gotti
382705bde9
Merge pull request #223 from sgotti/executor_fix_stopping_of_not_running_task
...
executor: fix stopping of not running tasks
2020-03-02 09:45:39 +01:00
Simone Gotti
cf8884d43a
Merge pull request #220 from sgotti/runservice_use_all_scheduled_tasks_in_scheduleRun
...
runservice: use all scheduled tasks in scheduleRun
2020-02-28 15:03:39 +01:00
Simone Gotti
19611c18e7
runservice: fix handling of wrong executortask status
...
updateRunTaskStatus should also accept transitions from not started to a
finished state like "success", "failed", "stopped" since we could miss some
status updates from the executor for many reasons.
2020-02-28 13:02:35 +01:00
Simone Gotti
e4507446ed
executor: use cancellable context in executetask
...
Use a cancellable context to handle running task stop.
When the context is done the pod will be stopped.
2020-02-28 10:52:36 +01:00
Simone Gotti
97d145a9d3
executor: fix stopping of not running tasks
...
When a related runningTask doesn't exist and the executor task status is
running just report it as failed ignoring if it's marked to stop.
2020-02-28 10:45:07 +01:00
Simone Gotti
3ac018e6e5
runservice: use all scheduled tasks in scheduleRun
...
rename activeExecutorTasks to scheduledExecutorTasks and don't filter out
finished tasks.
In some logic we need all the scheduled tasks and not only the not finished
ones.
2020-02-28 09:56:12 +01:00
Simone Gotti
a4e280cd7d
Merge pull request #222 from sgotti/executor_fix_reporting_of_stopped_tasks_and_steps
...
executor: fix reporting of stopped tasks and steps
2020-02-28 09:55:40 +01:00
Simone Gotti
ab33bae35f
Merge pull request #221 from sgotti/executor_serialize_task_handling
...
executor: serialize task handling
2020-02-28 09:54:35 +01:00
Simone Gotti
19b8c7f427
executor: fix reporting of stopped tasks and steps
...
In executeTask set the executor task and step phase to stop if task spec Stop is
true.
2020-02-27 17:38:00 +01:00
Simone Gotti
88dbca15a3
executor: serialize task handling
...
taskUpdater will be called serially and won't block. It'll execute a goroutine
for executing the task and for sending the task state to the scheduler.
executeTask will just start task execution, all the logic of choosing if
starting a task is moved inside taskUpdater
In this way we avoid concurrency issues when handling the same executorTask
in parallel
2020-02-27 17:19:42 +01:00
Simone Gotti
268a2b83ea
Merge pull request #218 from sgotti/runservice_minimize_scheduling_of_tasks_that_will_be_queued_by_the_executor
...
runservice: minimize scheduling of tasks that will be queued by the executor
2020-02-27 16:08:48 +01:00
Simone Gotti
145c87b4c0
runservice: minimize scheduling of tasks that will be queued by the executor
...
Since the executor only periodically updates its state we could end up
scheduling much more tasks than the executor ActiveTasksLimit. This will happen
in the case of many parallel tasks that can all start at the same time.
To avoid this also considere the executor tasks saved in etcd that represent
the real view of scheduled tasks.
2020-02-27 11:03:03 +01:00
Simone Gotti
e8fdb8dfae
Merge pull request #219 from sgotti/runservice_mark_not_running_tasks_skipped_when_run_stop
...
runservice: mark not running tasks as skipped when run marked to stop
2020-02-27 09:34:27 +01:00
Simone Gotti
5dd9e587fe
runservice: mark not running tasks as skipped when run marked to stop
...
Currently when a run is marked to stop we are going to stop currently running
tasks and then their childs will be marked as skipped.
But tasks not depending on a stopped task (root task or childs with a finished
parent) that are just waiting for an executor slot, will be scheduled when
there will be a free slot also if the run is marked to stop (and then the
scheduler will stop them after some seconds).
This patch will mark all not started tasks as skipped when the run is marked to
stop.
2020-02-26 16:45:09 +01:00
Simone Gotti
3e611f6cd1
Merge pull request #215 from sgotti/gateway_move_auth_api
...
gateway: move authentication apis to /api/v1alpha/auth
2020-02-20 09:53:52 +01:00
Simone Gotti
eb48e73a54
gateway: move authentication apis to /api/v1alpha/auth
...
Move the various authentication apis to /api/v1alpha/auth since they should be
versioned like other apis.
2020-02-19 10:48:14 +01:00
Simone Gotti
42785a1aee
Merge pull request #213 from sgotti/update_deps
...
go.mod: update dependencies
2020-02-18 22:49:32 +01:00