Commit graph

1287 commits

Author SHA1 Message Date
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
Gabriel
08507ddbf9
Merge pull request #519 from cloudbase/dependabot/go_modules/gorm.io/gorm-1.30.5
Bump gorm.io/gorm from 1.30.3 to 1.30.5
2025-09-09 09:32:18 +03:00
dependabot[bot]
63425a1c24
Bump gorm.io/gorm from 1.30.3 to 1.30.5
Bumps [gorm.io/gorm](https://github.com/go-gorm/gorm) from 1.30.3 to 1.30.5.
- [Release notes](https://github.com/go-gorm/gorm/releases)
- [Commits](https://github.com/go-gorm/gorm/compare/v1.30.3...v1.30.5)

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

Signed-off-by: dependabot[bot] <support@github.com>
2025-09-09 06:13:42 +00:00
dependabot[bot]
94bee21793
Bump golang.org/x/crypto from 0.41.0 to 0.42.0
Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.41.0 to 0.42.0.
- [Commits](https://github.com/golang/crypto/compare/v0.41.0...v0.42.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2025-09-09 06:13:35 +00:00
Gabriel
237397657a
Merge pull request #516 from cloudbase/dependabot/go_modules/golang.org/x/mod-0.28.0
Bump golang.org/x/mod from 0.27.0 to 0.28.0
2025-09-08 11:21:49 +03:00
Gabriel
34046be3b9
Merge pull request #515 from cloudbase/dependabot/go_modules/golang.org/x/sync-0.17.0
Bump golang.org/x/sync from 0.16.0 to 0.17.0
2025-09-08 11:18:18 +03:00
dependabot[bot]
7a654a277b
Bump golang.org/x/mod from 0.27.0 to 0.28.0
Bumps [golang.org/x/mod](https://github.com/golang/mod) from 0.27.0 to 0.28.0.
- [Commits](https://github.com/golang/mod/compare/v0.27.0...v0.28.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2025-09-08 08:09:50 +00:00
dependabot[bot]
80e79cff40
Bump golang.org/x/sync from 0.16.0 to 0.17.0
Bumps [golang.org/x/sync](https://github.com/golang/sync) from 0.16.0 to 0.17.0.
- [Commits](https://github.com/golang/sync/compare/v0.16.0...v0.17.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2025-09-08 08:09:43 +00:00
Gabriel
b45b2767db
Merge pull request #517 from cloudbase/dependabot/go_modules/golang.org/x/oauth2-0.31.0
Bump golang.org/x/oauth2 from 0.30.0 to 0.31.0
2025-09-08 11:06:18 +03:00
dependabot[bot]
b744fe6fa6
Bump golang.org/x/oauth2 from 0.30.0 to 0.31.0
Bumps [golang.org/x/oauth2](https://github.com/golang/oauth2) from 0.30.0 to 0.31.0.
- [Commits](https://github.com/golang/oauth2/compare/v0.30.0...v0.31.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2025-09-08 06:24:36 +00:00
Gabriel
2c7b150a65
Merge pull request #514 from gabriel-samfira/fix-spa-validation
Fix validation for creds and endpoints
2025-09-05 13:07:25 +03:00
Gabriel Adrian Samfira
d6cc20a362 Fix validation for creds and endpoints
This change fixes validation for the add credentials and endpoints modals.

Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
2025-09-05 09:57:47 +00:00
Gabriel
3612bea990
Merge pull request #513 from cloudbase/dependabot/go_modules/gorm.io/gorm-1.30.3
Bump gorm.io/gorm from 1.30.2 to 1.30.3
2025-09-05 10:17:15 +03:00
dependabot[bot]
c8c1d47936
Bump gorm.io/gorm from 1.30.2 to 1.30.3
Bumps [gorm.io/gorm](https://github.com/go-gorm/gorm) from 1.30.2 to 1.30.3.
- [Release notes](https://github.com/go-gorm/gorm/releases)
- [Commits](https://github.com/go-gorm/gorm/compare/v1.30.2...v1.30.3)

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

Signed-off-by: dependabot[bot] <support@github.com>
2025-09-05 06:14:07 +00:00
Gabriel
9ada36f287
Merge pull request #511 from gabriel-samfira/add-runner-div
Add runner div to pools and scalesets
2025-09-04 19:42:06 +03:00
Gabriel Adrian Samfira
315601a171 Add runner div to pools and scalesets
When there are no runners in pools or scale sets, the runners div still needs
to be rendered and subscribed to runner events.

Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
2025-09-04 16:25:10 +00:00
Gabriel
aea9126e59
Merge pull request #510 from cloudbase/dependabot/go_modules/github.com/spf13/cobra-1.10.1
Bump github.com/spf13/cobra from 1.9.1 to 1.10.1
2025-09-03 09:36:52 +03:00
dependabot[bot]
f78ededb16
Bump github.com/spf13/cobra from 1.9.1 to 1.10.1
Bumps [github.com/spf13/cobra](https://github.com/spf13/cobra) from 1.9.1 to 1.10.1.
- [Release notes](https://github.com/spf13/cobra/releases)
- [Commits](https://github.com/spf13/cobra/compare/v1.9.1...v1.10.1)

---
updated-dependencies:
- dependency-name: github.com/spf13/cobra
  dependency-version: 1.10.1
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-09-03 02:12:44 +00:00