Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ func run(opts SatelliteOptions, pathConfig *config.PathConfig, shutdownTimeout s
}
})

s := satellite.NewSatellite(cm, criResults, pathConfig.StateFile)
s := satellite.NewSatellite(cm, criResults, pathConfig.StateFile, pathConfig.SyncCredentialsFile, pathConfig.ZotTempConfig)
Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai Bot Mar 17, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1: This new proxy-cache wiring never applies the rebuilt Zot config to the running registry. ProxyCacheSetupProcess only updates ConfigManager in memory, so Zot keeps its original config and proxy-cache mode will not enable extensions.sync.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At cmd/main.go, line 309:

<comment>This new proxy-cache wiring never applies the rebuilt Zot config to the running registry. `ProxyCacheSetupProcess` only updates `ConfigManager` in memory, so Zot keeps its original config and proxy-cache mode will not enable `extensions.sync`.</comment>

<file context>
@@ -306,7 +306,7 @@ func run(opts SatelliteOptions, pathConfig *config.PathConfig, shutdownTimeout s
 	})
 
-	s := satellite.NewSatellite(cm, criResults, pathConfig.StateFile)
+	s := satellite.NewSatellite(cm, criResults, pathConfig.StateFile, pathConfig.SyncCredentialsFile, pathConfig.ZotTempConfig)
 	err = s.Run(ctx)
 	if err != nil {
</file context>
Fix with Cubic

err = s.Run(ctx)
if err != nil {
return fmt.Errorf("unable to start satellite: %w", err)
Expand Down
4 changes: 3 additions & 1 deletion config.example.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,9 @@
"enabled": false,
"registries": ["docker.io"],
"runtimes": []
}
},
"proxy_cache_mode": false,
"sync_poll_interval": "6h"
},
"zot_config": {
"distSpecVersion": "1.1.0",
Expand Down
404 changes: 402 additions & 2 deletions ground-control/go.mod

Large diffs are not rendered by default.

2,766 changes: 2,758 additions & 8 deletions ground-control/go.sum

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion ground-control/internal/database/artifacts.sql.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion ground-control/internal/database/configs.sql.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion ground-control/internal/database/db.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion ground-control/internal/database/groups.sql.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion ground-control/internal/database/login_attempts.sql.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion ground-control/internal/database/models.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion ground-control/internal/database/robot_accounts.sql.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion ground-control/internal/database/satellite_configs.sql.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion ground-control/internal/database/satellite_groups.sql.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion ground-control/internal/database/satellite_status.sql.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion ground-control/internal/database/satellite_token.sql.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

27 changes: 18 additions & 9 deletions ground-control/internal/database/satellites.sql.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion ground-control/internal/database/sessions.sql.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion ground-control/internal/database/users.sql.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

28 changes: 14 additions & 14 deletions ground-control/internal/server/cached_images_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ func TestSyncHandler_WithCachedImages(t *testing.T) {
now := time.Now().UTC().Truncate(time.Second)

// Mock GetSatelliteByName
satRows := sqlmock.NewRows([]string{"id", "name", "created_at", "updated_at", "last_seen", "heartbeat_interval"}).
AddRow(1, "edge-01", now, now, sql.NullTime{}, sql.NullString{})
satRows := sqlmock.NewRows([]string{"id", "name", "created_at", "updated_at", "last_seen", "heartbeat_interval", "mode"}).
AddRow(1, "edge-01", now, now, sql.NullTime{}, sql.NullString{}, "normal")
mock.ExpectQuery("SELECT .+ FROM satellites WHERE name").
WithArgs("edge-01").
WillReturnRows(satRows)
Expand Down Expand Up @@ -108,8 +108,8 @@ func TestSyncHandler_NoCachedImages(t *testing.T) {

now := time.Now().UTC().Truncate(time.Second)

satRows := sqlmock.NewRows([]string{"id", "name", "created_at", "updated_at", "last_seen", "heartbeat_interval"}).
AddRow(1, "edge-01", now, now, sql.NullTime{}, sql.NullString{})
satRows := sqlmock.NewRows([]string{"id", "name", "created_at", "updated_at", "last_seen", "heartbeat_interval", "mode"}).
AddRow(1, "edge-01", now, now, sql.NullTime{}, sql.NullString{}, "normal")
mock.ExpectQuery("SELECT .+ FROM satellites WHERE name").
WithArgs("edge-01").
WillReturnRows(satRows)
Expand Down Expand Up @@ -170,8 +170,8 @@ func TestGetCachedImagesHandler(t *testing.T) {

now := time.Now().UTC().Truncate(time.Second)

satRows := sqlmock.NewRows([]string{"id", "name", "created_at", "updated_at", "last_seen", "heartbeat_interval"}).
AddRow(1, "edge-01", now, now, sql.NullTime{}, sql.NullString{})
satRows := sqlmock.NewRows([]string{"id", "name", "created_at", "updated_at", "last_seen", "heartbeat_interval", "mode"}).
AddRow(1, "edge-01", now, now, sql.NullTime{}, sql.NullString{}, "normal")
mock.ExpectQuery("SELECT .+ FROM satellites WHERE name").
WithArgs("edge-01").
WillReturnRows(satRows)
Expand Down Expand Up @@ -225,8 +225,8 @@ func TestGetCachedImagesHandler(t *testing.T) {

now := time.Now().UTC().Truncate(time.Second)

satRows := sqlmock.NewRows([]string{"id", "name", "created_at", "updated_at", "last_seen", "heartbeat_interval"}).
AddRow(1, "edge-01", now, now, sql.NullTime{}, sql.NullString{})
satRows := sqlmock.NewRows([]string{"id", "name", "created_at", "updated_at", "last_seen", "heartbeat_interval", "mode"}).
AddRow(1, "edge-01", now, now, sql.NullTime{}, sql.NullString{}, "normal")
mock.ExpectQuery("SELECT .+ FROM satellites WHERE name").
WithArgs("edge-01").
WillReturnRows(satRows)
Expand Down Expand Up @@ -264,8 +264,8 @@ func TestSyncHandler_InvalidHeartbeatInterval(t *testing.T) {

now := time.Now().UTC().Truncate(time.Second)

satRows := sqlmock.NewRows([]string{"id", "name", "created_at", "updated_at", "last_seen", "heartbeat_interval"}).
AddRow(1, "edge-01", now, now, sql.NullTime{}, sql.NullString{})
satRows := sqlmock.NewRows([]string{"id", "name", "created_at", "updated_at", "last_seen", "heartbeat_interval", "mode"}).
AddRow(1, "edge-01", now, now, sql.NullTime{}, sql.NullString{}, "normal")
mock.ExpectQuery("SELECT .+ FROM satellites WHERE name").
WithArgs("edge-01").
WillReturnRows(satRows)
Expand All @@ -291,8 +291,8 @@ func TestSyncHandler_BatchInsertArtifactsFails(t *testing.T) {

now := time.Now().UTC().Truncate(time.Second)

satRows := sqlmock.NewRows([]string{"id", "name", "created_at", "updated_at", "last_seen", "heartbeat_interval"}).
AddRow(1, "edge-01", now, now, sql.NullTime{}, sql.NullString{})
satRows := sqlmock.NewRows([]string{"id", "name", "created_at", "updated_at", "last_seen", "heartbeat_interval", "mode"}).
AddRow(1, "edge-01", now, now, sql.NullTime{}, sql.NullString{}, "normal")
mock.ExpectQuery("SELECT .+ FROM satellites WHERE name").
WithArgs("edge-01").
WillReturnRows(satRows)
Expand Down Expand Up @@ -327,8 +327,8 @@ func TestGetCachedImagesHandler_DBFailure(t *testing.T) {

now := time.Now().UTC().Truncate(time.Second)

satRows := sqlmock.NewRows([]string{"id", "name", "created_at", "updated_at", "last_seen", "heartbeat_interval"}).
AddRow(1, "edge-01", now, now, sql.NullTime{}, sql.NullString{})
satRows := sqlmock.NewRows([]string{"id", "name", "created_at", "updated_at", "last_seen", "heartbeat_interval", "mode"}).
AddRow(1, "edge-01", now, now, sql.NullTime{}, sql.NullString{}, "normal")
mock.ExpectQuery("SELECT .+ FROM satellites WHERE name").
WithArgs("edge-01").
WillReturnRows(satRows)
Expand Down
Loading
Loading