Skip to content

Commit

Permalink
set new min version to v0.107.40
Browse files Browse the repository at this point in the history
  • Loading branch information
bakito committed Nov 12, 2023
1 parent 136ea05 commit 450de6e
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 37 deletions.
5 changes: 0 additions & 5 deletions pkg/sync/sync.go
Original file line number Diff line number Diff line change
Expand Up @@ -225,11 +225,6 @@ func (w *worker) syncTo(l *zap.SugaredLogger, o *origin, replica types.AdGuardIn
return
}

if versions.IsSame(rs.Version, versions.IncompatibleAPI) {
rl.With("error", err, "version", rs.Version).Errorf("Replica AdGuard Home runs with an incompatible API - Please ugrade to version %s or newer", versions.FixedIncompatibleAPI)
return
}

if o.status.Version != rs.Version {
rl.With("originVersion", o.status.Version, "replicaVersion", rs.Version).Warn("Versions do not match")
}
Expand Down
23 changes: 0 additions & 23 deletions pkg/sync/sync_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -658,29 +658,6 @@ var _ = Describe("Sync", func() {
cl.EXPECT().Status().Return(&model.ServerStatus{Version: "v0.106.9"}, nil)
w.sync()
})
It("replica version is with incompatible API", func() {
// origin
cl.EXPECT().Host()
cl.EXPECT().Status().Return(&model.ServerStatus{Version: versions.MinAgh}, nil)
cl.EXPECT().ProfileInfo().Return(&model.ProfileInfo{}, nil)
cl.EXPECT().Parental()
cl.EXPECT().SafeSearchConfig().Return(&model.SafeSearchConfig{}, nil)
cl.EXPECT().SafeBrowsing()
cl.EXPECT().RewriteList().Return(&model.RewriteEntries{}, nil)
cl.EXPECT().Services()
cl.EXPECT().Filtering().Return(&model.FilterStatus{}, nil)
cl.EXPECT().Clients().Return(&model.Clients{}, nil)
cl.EXPECT().QueryLogConfig().Return(&model.QueryLogConfig{}, nil)
cl.EXPECT().StatsConfig().Return(&model.StatsConfig{}, nil)
cl.EXPECT().AccessList().Return(&model.AccessList{}, nil)
cl.EXPECT().DNSConfig().Return(&model.DNSConfig{}, nil)
cl.EXPECT().DhcpConfig().Return(&model.DhcpStatus{}, nil)

// replica
cl.EXPECT().Host()
cl.EXPECT().Status().Return(&model.ServerStatus{Version: versions.IncompatibleAPI}, nil)
w.sync()
})
})
})
})
8 changes: 1 addition & 7 deletions pkg/versions/versions.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,7 @@ import "golang.org/x/mod/semver"

const (
// MinAgh minimal adguardhome version
MinAgh = "v0.107.0"
// IncompatibleAPI adguardhome version with incompatible API
// https://github.com/bakito/adguardhome-sync/issues/99
IncompatibleAPI = "v0.107.14"
// FixedIncompatibleAPI adguardhome version with fixed API
// https://github.com/bakito/adguardhome-sync/issues/99
FixedIncompatibleAPI = "v0.107.15"
MinAgh = "v0.107.40"
)

func IsNewerThan(v1 string, v2 string) bool {
Expand Down
2 changes: 0 additions & 2 deletions testdata/e2e/values.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
replica:
versions:
- latest
- v0.107.13
- v0.107.15

0 comments on commit 450de6e

Please sign in to comment.