Commit graph

1304 commits

Author SHA1 Message Date
Gabriel Adrian Samfira
47537fb8b6 Update all dependencies
Update all deps.

Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
2026-01-06 01:13:34 +02:00
dependabot[bot]
3640235eeb Bump golang.org/x/crypto in the go_modules group across 1 directory
Bumps the go_modules group with 1 update in the / directory: [golang.org/x/crypto](https://github.com/golang/crypto).


Updates `golang.org/x/crypto` from 0.43.0 to 0.45.0
- [Commits](https://github.com/golang/crypto/compare/v0.43.0...v0.45.0)

---
updated-dependencies:
- dependency-name: golang.org/x/crypto
  dependency-version: 0.45.0
  dependency-type: direct:production
  dependency-group: go_modules
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-12-12 09:59:22 +02:00
Lionel ORRY
326204d1a6 Fix dpkg lock file conflicts during runner install
Added a loop over installdependencies.sh call so that if a parallel process is using dpkg,
we can wait and try again.

The timeout between attempts is set at 15sec, and the max number of attempts is 5.
2025-11-04 12:32:47 +02:00
dependabot[bot]
dadd497fc7 Bump playwright in /webapp in the npm_and_yarn group across 1 directory
Bumps the npm_and_yarn group with 1 update in the /webapp directory: [playwright](https://github.com/microsoft/playwright).


Updates `playwright` from 1.54.2 to 1.56.1
- [Release notes](https://github.com/microsoft/playwright/releases)
- [Commits](https://github.com/microsoft/playwright/compare/v1.54.2...v1.56.1)

---
updated-dependencies:
- dependency-name: playwright
  dependency-version: 1.56.1
  dependency-type: indirect
  dependency-group: npm_and_yarn
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-10-28 11:57:43 +02:00
dependabot[bot]
a7cf64741b Bump github.com/jedib0t/go-pretty/v6 from 6.6.8 to 6.6.9
Bumps [github.com/jedib0t/go-pretty/v6](https://github.com/jedib0t/go-pretty) from 6.6.8 to 6.6.9.
- [Release notes](https://github.com/jedib0t/go-pretty/releases)
- [Commits](https://github.com/jedib0t/go-pretty/compare/v6.6.8...v6.6.9)

---
updated-dependencies:
- dependency-name: github.com/jedib0t/go-pretty/v6
  dependency-version: 6.6.9
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-10-28 11:56:55 +02:00
Pascal Bachor
edf9901505 drop empty components from runner service name 2025-10-18 10:56:13 +03:00
dependabot[bot]
3f444571ac Bump happy-dom in /webapp in the npm_and_yarn group across 1 directory
Bumps the npm_and_yarn group with 1 update in the /webapp directory: [happy-dom](https://github.com/capricorn86/happy-dom).


Updates `happy-dom` from 20.0.0 to 20.0.2
- [Release notes](https://github.com/capricorn86/happy-dom/releases)
- [Commits](https://github.com/capricorn86/happy-dom/compare/v20.0.0...v20.0.2)

---
updated-dependencies:
- dependency-name: happy-dom
  dependency-version: 20.0.2
  dependency-type: direct:development
  dependency-group: npm_and_yarn
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-10-17 09:08:24 +03:00
Gabriel Adrian Samfira
1ba49ef5b1 Case insensitive HasRequiredLabels
When checking if a pool has required labels, we need to make sure the
search is case insensitive.

Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
2025-10-17 00:49:46 +03:00
dependabot[bot]
28a1dea9f5 Bump happy-dom in /webapp in the npm_and_yarn group across 1 directory
Bumps the npm_and_yarn group with 1 update in the /webapp directory: [happy-dom](https://github.com/capricorn86/happy-dom).


Updates `happy-dom` from 18.0.1 to 20.0.0
- [Release notes](https://github.com/capricorn86/happy-dom/releases)
- [Commits](https://github.com/capricorn86/happy-dom/compare/v18.0.1...v20.0.0)

---
updated-dependencies:
- dependency-name: happy-dom
  dependency-version: 20.0.0
  dependency-type: direct:development
  dependency-group: npm_and_yarn
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-10-12 09:45:51 +03:00
Gabriel Adrian Samfira
b47caa4bf5 Add instance metadata URL
The runner metatada URL is meant to give runner install scripts an
easier way to get instance specific metadata, needed for the setup
process. We can use this URL to easier expand installation metadata as
opposed to having to change the cloud config InstallRunnerParams{}.

Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
2025-10-10 17:14:34 +03:00
Gabriel Adrian Samfira
78856b56b2 Add a metadata URL for garm-agent
Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
2025-10-10 17:14:34 +03:00
Gabriel Adrian Samfira
c1259719ea Fix WebUI tests
Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
2025-10-09 14:46:44 +03:00
dependabot[bot]
e50a36cbca Bump golang.org/x/oauth2 from 0.31.0 to 0.32.0
Bumps [golang.org/x/oauth2](https://github.com/golang/oauth2) from 0.31.0 to 0.32.0.
- [Commits](https://github.com/golang/oauth2/compare/v0.31.0...v0.32.0)

---
updated-dependencies:
- dependency-name: golang.org/x/oauth2
  dependency-version: 0.32.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-10-09 11:21:51 +03:00
dependabot[bot]
44f9446afa Bump golang.org/x/mod from 0.28.0 to 0.29.0
Bumps [golang.org/x/mod](https://github.com/golang/mod) from 0.28.0 to 0.29.0.
- [Commits](https://github.com/golang/mod/compare/v0.28.0...v0.29.0)

---
updated-dependencies:
- dependency-name: golang.org/x/mod
  dependency-version: 0.29.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-10-09 11:12:21 +03:00
dependabot[bot]
2ec1767882 Bump golang.org/x/crypto from 0.42.0 to 0.43.0
Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.42.0 to 0.43.0.
- [Commits](https://github.com/golang/crypto/compare/v0.42.0...v0.43.0)

---
updated-dependencies:
- dependency-name: golang.org/x/crypto
  dependency-version: 0.43.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-10-09 09:41:40 +03:00
Gabriel Adrian Samfira
6361e19821 Disable the web UI tests for now
fixes for the tests will be added in a later PR

Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
2025-10-08 22:22:58 +03:00
Gabriel Adrian Samfira
73b330467b Use tmp storage while uploading, use tx where needed
Use temporary storage while the client is streaming the file to GARM.
This ensures that while uploading, we don't lock the blob database. On slow
connections this would mean that no readers would be able to access the db
while data was being written to it via the upload process.

By saving the file to a temporary location and only after we receive the
entire thing, add it to the DB, we significantly reduce the time we need to
keep the DB locked.

Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
2025-10-08 22:22:58 +03:00
Gabriel Adrian Samfira
db2b908605 Use a sepatare GORM connection for blobs
Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
2025-10-08 22:22:58 +03:00
Gabriel Adrian Samfira
bab85171ee Fix some webapp tests
Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
2025-10-08 22:22:58 +03:00
Gabriel Adrian Samfira
6c46cf9be1 Add API, CLI and web UI integration for objects
This change adds the API endpoints, the CLI commands and the web UI elements
needed to manage objects in GARMs internal storage.

This storage system is meant to be used to distribute the garm-agent and as a
single source of truth for provider binaries, when we will add the ability for GARM
to scale out.

Potentially, we can also use this in air gapped systems to distribute the runner binaries
for forges that don't have their own internal storage system (like GHES).

Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
2025-10-08 22:22:58 +03:00
Gabriel Adrian Samfira
f66f95baff Fix database tests
Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
2025-10-07 21:01:40 +03:00
Gabriel Adrian Samfira
5a93761af7 Make tag searches case insensitive
Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
2025-10-07 21:01:40 +03:00
Gabriel Adrian Samfira
9adb872985 Improve pagination
Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
2025-10-07 21:01:40 +03:00
Gabriel Adrian Samfira
7d53ce79b7 Add database models and functions for file objects
This commit adds the DB models and functions needed to create, read,
search through, update and delete files within sqlite3.

Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
2025-10-07 21:01:40 +03:00
Gabriel Adrian Samfira
76f538ffb3 Switch to uncompressed tools for gitea
Use uncompressed tools for gitea. Gitea compresses using .xz, including for
Windows, which does not have a native, built-in tool to uncompress that
format.

Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
2025-10-05 11:31:41 +03:00
Gabriel Adrian Samfira
1594887d23 Update garm-provider-common
This change updates garm-provider-common to latest main.

Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
2025-10-05 11:31:41 +03:00
Gabriel Adrian Samfira
a36d01afd5 Cache jobs in pool manager
This change caches jobs meant for an entity in the pool manager. This
allows us to avoid querying the db as much and allows us to better determine
when we should scale down.

Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
2025-10-05 00:49:41 +03:00
Gabriel Adrian Samfira
0093393bc3 Update all dependencies
Note: should we ditch vendoring?

Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
2025-09-29 13:30:24 +03:00
Gabriel Adrian Samfira
22fde8d30e Properly return error when checking for fallback
The code that attempts to fetch tools from upstream, must return the error
if the current setting is the upstream repo.

Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
2025-09-29 12:44:10 +03:00
Gabriel Adrian Samfira
3e50ee62f3 Reset tools if metadata URL changes
Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
2025-09-28 13:18:32 +03:00
Gabriel Adrian Samfira
5fdb69ac18 Add the ability to set tools download source (Gitea)
This change adds 2 new options to gitea forge endpoints:

* Tools metadata URL
* Use internal tools URLs

By default, GARM looks in the releases page of the gitea arc_runner
to determine where it can download the runner binary from for a particular
OS/arch. The tools metadata URL option can be set on an endpoint and can point
to a mirror of the upstream repo. The requirement is that the asset names
exactly mirror upstream naming conventions.

The second option disables GARM calling out to the tools metadata URL entirely.
GARM has some hardcoded values for nightly binaries. If this option is checked,
GARM will use those values, without making any kind of outgoing API call to
determine availability. This is useful in air-gapped environments.

Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
2025-09-26 18:59:15 +03:00
Gabriel Adrian Samfira
56618473d1 Allow star CORS
If the user sets "*" as a CORS origin, allow everything.

Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
2025-09-25 16:58:24 +03:00
Gabriel Adrian Samfira
545f042f4d Fix Windows userdata wrapper and scale set metadata
* The Windows userdata wrapper needs to run the real script with parameters
that allow running a downloaded script and in a non-interactive way.
* The metadata endpoint to get the root CA bundle only worked for pools.
This change fixes it for scale sets as well.

Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
2025-09-24 22:39:46 +03:00
Gabriel
4763906780
Fallback for copy content on http (#530)
The clipboard API is only available on https. This adds a fallback.

Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
2025-09-23 18:18:51 +03:00
Gabriel
322155dc6a
Set up docker (#529)
Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
2025-09-23 17:22:59 +03:00
Gabriel
5ef2dda31e
Use self-hosted for image build (#528)
Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
2025-09-23 17:17:55 +03:00
Gabriel
572ebbf2c7
Fix init redirect state (#527)
On init, we were redirected to the proper URL, but the page would not
render properly.

Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
2025-09-23 17:15:04 +03:00
dependabot[bot]
b5ece196b9
Bump gorm.io/datatypes from 1.2.6 to 1.2.7 (#526)
Bumps [gorm.io/datatypes](https://github.com/go-gorm/datatypes) from 1.2.6 to 1.2.7.
- [Release notes](https://github.com/go-gorm/datatypes/releases)
- [Commits](https://github.com/go-gorm/datatypes/compare/v1.2.6...v1.2.7)

---
updated-dependencies:
- dependency-name: gorm.io/datatypes
  dependency-version: 1.2.7
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-09-23 13:47:00 +03:00
Gabriel
23f92bc335
Add runner install template management (#525)
* Add template api endpoints

Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>

* Added template bypass

Pools and scale sets will automatically migrate to the new template
system for runner install scripts. If a pool or a scale set cannot be
migrate, it is left alone. It is expected that users set a runner install
template manually for scenarios we don't yet have a template for (windows
on gitea for example).

Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>

* Integrate templates with pool create/update

Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>

* Add webapp integration with templates

Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>

* Add unit tests

Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>

* Populate all relevant context fields

Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>

* Update dependencies

Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>

* Fix lint

Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>

* Validate uint

Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>

* Add CLI template management

Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>

* Some editor improvements and bugfixes

Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>

* Fix scale set return values post create

Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>

* Fix template websocket events filter

Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>

---------

Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
2025-09-23 13:46:27 +03:00
Gabriel
0ccb9741fe
Merge pull request #524 from cloudbase/dependabot/go_modules/gorm.io/gorm-1.31.0
Bump gorm.io/gorm from 1.30.5 to 1.31.0
2025-09-18 18:49:42 +03:00
dependabot[bot]
bb064452d7
Bump gorm.io/gorm from 1.30.5 to 1.31.0
Bumps [gorm.io/gorm](https://github.com/go-gorm/gorm) from 1.30.5 to 1.31.0.
- [Release notes](https://github.com/go-gorm/gorm/releases)
- [Commits](https://github.com/go-gorm/gorm/compare/v1.30.5...v1.31.0)

---
updated-dependencies:
- dependency-name: gorm.io/gorm
  dependency-version: 1.31.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-09-15 06:36:51 +00:00
Gabriel
57aff41b41
Merge pull request #523 from gabriel-samfira/simplify-logic
Simplify logic
2025-09-14 11:09:50 +03:00
Gabriel Adrian Samfira
616499e715 Simplify logic
This change simplifies the scale down logic a bit. It also make sure we
don't accidentally remove runners that are in the process of being created
when we try to consolidate.

Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
2025-09-14 07:44:45 +00:00
Gabriel
7ae962b438
Merge pull request #522 from gabriel-samfira/build-webui
Rebuild webui
2025-09-10 09:41:42 +03:00
Gabriel Adrian Samfira
aa7021e67d Rebuild webui
Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
2025-09-10 06:41:09 +00:00
Gabriel
8ea32df7dd
Merge pull request #521 from cloudbase/dependabot/npm_and_yarn/webapp/npm_and_yarn-f5c1666f0c
Bump vite from 7.1.1 to 7.1.5 in /webapp in the npm_and_yarn group across 1 directory
2025-09-10 00:05:47 +03:00
Gabriel
244baec288
Merge pull request #520 from gabriel-samfira/cleanup-and-improvements
Cache improvements, db list improvements, cleanup
2025-09-10 00:05:23 +03:00
dependabot[bot]
ed802b68a5
Bump vite in /webapp in the npm_and_yarn group across 1 directory
Bumps the npm_and_yarn group with 1 update in the /webapp directory: [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite).


Updates `vite` from 7.1.1 to 7.1.5
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/main/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v7.1.5/packages/vite)

---
updated-dependencies:
- dependency-name: vite
  dependency-version: 7.1.5
  dependency-type: direct:development
  dependency-group: npm_and_yarn
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-09-09 20:56:32 +00:00
Gabriel Adrian Samfira
66fd0d51a6 Cache improvements, db list improvements, cleanup
This change adds some more cache helper functions, additional tests,
vastly improves memory usage when loading instances and cleans up some
code.

Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
2025-09-09 20:52:01 +00:00
Gabriel
6cd687235f
Merge pull request #518 from cloudbase/dependabot/go_modules/golang.org/x/crypto-0.42.0
Bump golang.org/x/crypto from 0.41.0 to 0.42.0
2025-09-09 09:32:42 +03:00